c#,windows-phone-8,crash,grid,scrollviewerRelated issues-Collection of common programming errors


  • ecruz3
    c# java file-io
    How do I invoke a child process from C# with UseShellExecute set to false and allow file deletion?The child process is a java program creates a 0 byte file, transfers it to a remote server, and deletes it. This functionality works when I execute the java program from the Windows command line.If I invoke the java program from C# using a System.Diagnostics.Process instance with StartInfo.UseShellExecute set to false, the child process does not delete the file. In fact, processing stalls and noth

  • Wasif Hossain
    c# xml parsing
    <html> <font color=#FF0000>Gaurang</font> <font color=#00FF00>Bhavesh</font> <font color=#FF0000>Bhupesh</font> <font color=#FF0000>AAditya</font> </html>I want to parse the above string as xml in C#. When I try it give error such as ‘#’ is an unexpected token. The expected token is ‘”‘ or ”’.

  • Akshinthala ???? ???????
    c# timer filesystemwatcher
    I have this strange, yet maybe very simple problem..I have a timer1 in my program that should start when I for example click a button. which it does..However when I use the FileSystemWatch it does not trigger timer1 for some reason I can’t seem to figure out.. is there something special that prevents the timer from being triggered?Starting time works here:private void toolStripMenuItem2_Click(object sender, EventArgs e){timer1.Start();}but here it does not..private void fsw_SS_Created(object sen

  • Sergey Berezovskiy
    c# builder test-data
    The business object is Foo.csWhat if Foo`s properties run custom logic? Would it then not a bad idea to create Foo objects which could change the data inside the Foo object and it returns values I do not expect?!public class FooBuilder {private string bar = “defaultBar”;private string baz = “defaultBaz”;private string bling = “defaultBling”;public FooBuilder Bar(string value){bar = value;return this;}public FooBuilder Baz(string value){baz = value;return this;}public FooBuilder Bling(string valu

  • CramerTV
    c# static-methods local-variables
    I have a question about the variables inside the static method. Do the variables inside the static method share the same memory location or would they have separate memory?Here is an example.public class XYZ {Public Static int A(int value){int b = value;return b;} }If 3 different user calls execute the method AXYZ.A(10); XYZ.A(20); XYZ.A(30);at the same time. What would be the return values of each call?XYZ.A(10)=? XYZ.A(20)=? XYZ.A(30)=?

  • Soner Gönül
    c# response threadabortexception
    This question already has an answer here:Is Response.End() considered harmful?9 answersI’m using the following code to to download files, but I’m face that Response.End always causes Exception. Is This cost for my application behavior? if yes how can get an alternative way to download files. I tried to use Thread.ResetAbort() to handle the exception but this result unwanted additional data to be added to the file try{DownloadFiles(); Response.End(); }catch

  • BanksySan
    c# .net unit-testing mocking moq
    If I have the codepublic Response Foo(Request request) {return _someObject.Bar(request); }I can mock _someObject and I want to assert that the object has not changed before being returned. e.g.:public Response Foo(Request request) {var response = _someObject.Bar(request);return response.SomeProperty.SomeOtherProperty + 1; }I know I can walk through every member on the DTO, but that’s allot of typing for any DTO of any real size or depth.Is hashing the objects the best solution, or is there a be

  • Gerald Trost
    c# encoding utf-8 binary data-conversion
    In c# I can encode binary data by Encoding.UTF8.GetString() and later convert it back by binary = Encoding.UTF8.GetBytes().I expect that the result should be my original binary data in any case – no exception.But is it true in any case?Or does it depend on the specific behaviour of the UTF8 character set?Or should I better use Encoding.ASCII.GetString() and Encoding.ASCII.GetBytes()?If anybody knows what Encoding exactly does (how it treats special characters or special bytes) then, please, giv

  • Skoder
    c# performance exception try-catch
    Possible Duplicate:Do try/catch blocks hurt performance when exceptions are not thrown? Hey everyone, Just a quick question about try..catch blocks. I’ve heard they’re expensive to use and shouldn’t be used as part of a program’s flow. However, in order to validate email addresses, I’m using the following code.try{MailAddress checkEmail = new MailAddress(testEmail);return true;}catch{return false;}Due to prior validation, I don’t many exceptions to be caught unless it’s an attempt to bypass val

  • JLFerrari
    c#
    Datatable dtProduto; (Filled)int cdProduto = Convert.ToInt16(dtProduto.Rows[0][“cdProduto”]); int cdReferencia = Convert.ToInt16(dtProduto.Rows[0][“cdReferencia”]);The syntax dtProduto.Rows[i][Column] always returns an object, which one is the best way to convert’em to integers?Regards, Jorge.

  • user2301570
    c# xaml windows-phone-8
    I want to display my phone contacts in LongListMultiSelector. Earlier I was using a list box to display the phone contacts… My implementation was like: xaml<ListBox Name=”ContactResultsData” ItemsSource=”{Binding}” Height=”331″ Margin=”12,0″ ><ListBox.ItemTemplate><DataTemplate><StackPanel Orientation=”Horizontal” ><Border BorderThickness=”2″ HorizontalAlignment=”Left” VerticalAlignment=”Center” BorderBrush=”{StaticResource PhoneAccentBrush}” ><Image Source=”{

  • Richard
    c# xml xml-parsing windows-phone-8 linq-to-xml
    I got this error while Parse an string to XDocument after edit and save it. But anyone can help me locate error position – The Line 1, position 10475. How can i get that position ??? System.Xml.XmlException: Unexpected XML declaration. The XMLdeclaration must be the first node in the document, and no white spacecharacters are allowed to appear before it. Line 1, position 10475.if (storage.FileExists(“APPSDATA.xml”)) {var reader = new StreamReader(new IsolatedStorageFileStream(“APPSDATA.xml”, Fil

  • FriendlyGuest
    xaml windows-phone-8 longlistselector
    I have a LongListSelector control on a page in my Windows Phone 8 app. For this control I set a GroupHeaderTemplate and a ItemTemplate and both contain a TextBlock. If I align the TextBlock controls to center I have some weird behavior (maybe not weird but unexplainable to me at the moment). When I open the page on my phone the centered text moves ca. 5px to the right. The move is visible to the user (it’s happening after the page is loaded). I tried to solve this problem but all margin changes

  • Mayank
    c# asynchronous windows-phone-8
    StreamSocket _connection = AsyncCreateConnection(); // In constructorprivate async void receive(){ DataReader reader = new DataReader(_connection.InputStream); DataWriter writer = new DataWriter(_connection.OutputStream);try{reader.InputStreamOptions = InputStreamOptions.Partial;uint sizeFieldCount = await reader.LoadAsync(sizeof(uint)); // <<– Explosionif (sizeFieldCount != sizeof(uint)){return;}// Read the string.uint stringLength = reader.ReadUInt32();uint actualStringLength = await r

  • Pauly Glott
    c# rest windows-phone-8 httpwebrequest
    I am building a WindowsPhone 8 application that calls a bunch of REST service. Services are tested and everything is OK, I also have some logs from my IISExpress server as I am here testing everything on my workstation.My issue pops up when I’m trying to repeat a bunch of PUT requests. As I am testing, those requests are the same every time. The first answers OK. The second is meant to answer 401 UnAuthorized and according to the logs, it is OK.2014-02-11 14:29:24 169.254.80.80 PUT /api/UserData

  • Seva Alekseyev
    windows-runtime windows-phone-8
    Windows Phone 8 C# project (MyApp), migrated from WP7.1. I’ve added a native Windows Runtime component library (AppLib) to the solution, created a reference. There’s a public sealed ref class (MyClass) in it. There’s a reference to it in the C# code (in OnLoaded of the main XAML page). The whole thing compiles – meaning the metadata of the component is being generated.When I’m trying to run, the project fails with the exception or type TypeLoadException with the following message:Typename or Nam

  • Scott Smith
    windows-8 windows-phone-8 portable-class-library
    I have a static library written in C++ that I want to make available to Windows 8 and Windows Phone 8 applications written in .NET.I’d like to minimize the number of separate projects to maintain by setting up my solution something like the following:Attempt #1: Only UI projects are platform-specificMySolution.sln | +- Library (virtual folder to group projects below) | | | +- LegacyLib.vcxproj Static Library project – Platform-independant, native C++ code using STL &am

  • Jay
    c# windows xaml windows-phone-8
    using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Navigation; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; using PhoneApp4.Resources; using Microsoft.Phone.Tasks; using System.Windows.Media; using System.Windows.Media.Animation; using Windows.Storage.Pickers; using Windows.Storage.FileProperties; using System.IO; using Windows.Storage; using Windows.Storage.Streams;namespa

  • Iulian
    c# c++ facebook facebook-c#-sdk windows-phone-8
    I try to reference facebook.dll – wp8 branch – within an app of type “Windows Phone Direct3D App (Native only)” project under Visual C++ VS2012, and I get the error:a reference to [dllname] cannot be added because the two projectstarget different runtimes.The restriction is that I cannot change the architecture of the application, so the main entry-point must be in the C++ project, and from here to call somehow the code written in C# for facebook.Based on http://msdn.microsoft.com/en-us/library/

  • WP8-Beginner
    c++ windows-runtime cross-platform windows-phone-8 static-libraries
    I’ve searched the web and StackOverflow a lot, but can’t seem to find a definitive answer to my following questions.Context:I am looking to port a group of C++ helper libraries for use with the Windows Phone 8 (WP8) platform. Historically, these libraries are built as static libs (rather than DLLs).I have successfully written the WP8-specific code, so that the libraries are compatible and building against ARM, using the APIs available to WP8 (using the WP API QuickStart doc as a reference point)

  • hoss
    android exception crash android-studio
    I was working on a project in Android Studio and was regularly compiling the code running it on my device to make sure everything was in working order. Suddenly the main activity crashes, several times after compiling several separate times. I checked the logcat and the error was reported as being due to failure to recognize the layout. I didn’t understand why, as I hadn’t changed any of the code in the main activity.In fact the only thing that had changed over the course of those few days was t

  • Harlandraka
    windows-7 ssd crash bsod
    I have a Windows 7 computer with this hardware:Asus P8P67 PRO Intel i7 2600k 8GB RAM AMD Radeon HD 6970 2TB HDD (used for storing data) 128GB SSD OCZ Vertex III (used for the OS)The PC works fine but Windows crashes after some time (sometimes after an hour, sometimes after 4 hours, etc). I can see it because when I open an application, it hangs and doesn’t open, and if I click on the start button, explorer crashes. After that, if I wait it goes to blue screen and re-crashes (never reboots): I ha

  • Psycogeek
    power-supply freeze crash gpu htpc
    Subject says most of it. My HTPC will occasionally be found in this hard-locked/crashed state when nothing of note was being done. The past couple times, it has been while the screensaver was running over top of the Steam client (not Big Picture, just the normal client) and nothing else of note was running. I’ve not experienced this crash when watching TV via Windows Media Center, nor when playing Steam games like Dark Souls. Checking Event Viewer has been fruitless, as no BugChecks or other err

  • Dynde
    windows-7 hard-drive boot ssd crash
    I’ve been having some weird random crashes that I can’t seem to locate, and I’m unsure if it’s windows or hardware related.It’s a brand new computer and very powerful. I’ve run into a couple of these random crashes, now I don’t know what causes them, as it happens during the night, when I’m sleeping. When I wake up, all I see is a boot manager screen that says Exception: 0xc00000e “Boot device inaccessible”. A simple restart doesn’t fix the problem – it seems to struggle locating my primary hdd

  • the_mandrill
    windows-7 crash shutdown
    I’ve got a problem with a Win7 machine that up until now has been very reliable. During the boot it will just power off — no warnings or BSOD. Sometimes it gets as far as the login screen but shuts down on login, other times during the splash screen. System repair and System Restore don’t make any difference. I can boot into safe mode or onto a boot disk, which suggests it’s not a CPU overheating problem. I wondered if it was some kind of disk corruption, but I wouldn’t have thought it wou

  • Alexis Li
    mavericks retina-macbook-pro google-chrome crash hang
    I bought rMBP around November last year. As I open Chrome, it crash without log. I can’t move the mouse, and the mms stream player keep working.The only solution is to restart it with power button.I can’t find the report by chrome://crashes and ~/Library/Logs/.I think the kernel_task doesn’t make it.Are there anyone else got the same problem and solution? How to identify the unexpected shutdown by power button in shutdown_monitor.log or /var/log/system.log?Version:10.9.1(13B3116) Chrome Version

  • boldnik
    wireless lenovo thinkpad crash
    Just a few days ago I installed new wifi driver and everything seemed to work fine on Lenovo ThinkPad S440. But now I experience a problem with wifi: the speed slows down to zero that no page could load in web browser. The second problem (not sure if they are connected but maybe) is system crashes unexpectedly. this is a pastebin of dmesg output so you could see what’s happening. When the system crashes, X and all other programs crash. I can’t even switch to tty and restart X. Can’t be reproduce

  • Julio Gorgé
    xcode crash iphone uitabview
    Using XCode 4, with the iPhone iOS 4.2Hey everyone, I’m using a tabBar interface for my new app that I’m trying to finish. I have declared the UILabels and as soon as I connect them in the interface builder to the actual labels, the whole app will crash upon selection of its tab at runtime, in the simulator and on my iphone. I’m hoping there’s a really simple answer out there, but I really have no idea where to look (I am a novice). Thanks in advance,

  • Jonathan Leffler
    c++ linux crash recovery
    I have an application written in C++ in a Linux environment. The app dynamically loads library (shared object) during runtime. (Application gets the user command and it will do the logic to dynamically load the required shared library.)Is there any way to prevent the application from crashing and exiting when a crash or segfault occurs in the shared library?I want my application to be active and report the crash to the user.

  • user2586553
    build crash jenkins
    When I do a Jenkins build it crashes and the console says:No such file: /var/lib/jenkins/jobs/milkcraft/builds/2013-07-15_07-54-56/logAny ideas? Here is the script:rm -r builds mkdir builds python runtime/recompile.py python runtime/reobfuscate.py cd reobf/minecraft zip -r -D -9 $WORKSPACE/builds/milkcraft_$BUILD_NUMBER * cd ../..(Yes, Minecraft modding)

  • KCP
    zend-framework grid jqxgrid jqxwidgets
    I am using zend with jqxgrid.While navigating to the page(eg: test.com/employee) containing jqxgrid, the grid simply works and loads the required data to the grid.But when I try to navigate the same page by passing the parameter(eg: test.com/employee/id/1), the grid doesnot load. I’ve used loadError on the dataAdapter as below and printed the errorvar dataadapter = new $.jqx.dataAdapter(source,{ loadError: function (xhr, status, error) { alert(‘Status=’+status+’, Error=’+error); } });The result

  • H.B.
    wpf delete grid row
    I have a Grid whose Rows & cols are populated dynamically. T odelete a row I use the following code :seivesTorGrid.RowDefinitions.RemoveAt(rowIndex+1);Everything is done manually only. The results of the operations after deleting the row is not satisfactory :Defination of Grid in xml is :<Grid Name=”seivesTorGrid” ShowGridLines=”False” Margin=”10, 0, 10, 0″Width=”Auto” Height=”Auto” ><Grid.ColumnDefinitions> </Grid.ColumnDefinitions><Grid.RowDefinitions><RowDefinit

  • skaffman
    grid eclipse-rcp
    My question : I have a nebulla Grid (org.eclipse.nebula.widgets.grid.Grid) control in my view in Eclipse RCP. I can make the RowHeader of this grid visible by this code : Grid grdTable = new Grid(compParent, SWT.BORDER | SWT.H_SCROLL);grdTable.setRowHeaderVisible(true); so that, at runtime it displays rownumbers like following photo :Now, my requirement is that I want to display a text/char on the RowHeader Column, like other column headers eg. Full Name, Designation, etc. How can i achieve this

  • Chirag
    grid silverlight-5.0 gridsplitter
    i have a one image control in grid and one grid splitter in the grid also one List<imgobject>, imgobject contains 3 images img48, img32, img24 how can i change the image according to with of grid cell,List<imgobject> is bind with on stack panel which is inside the grid cell width >= 100 then 64 Width <= 70 and >= 50 then 32 else 24 When i move gridsplite left side then grid cell width was change according to spliter movement at that time wants to change image in image cont

  • HyGy
    json grid extjs4
    What is the correct way to make a grid in ext designer, which gets its column definition trough a remote json query?

  • Simon
    xaml binding grid
    We cannot make a binding to property so we use ItemsControl<Grid><Grid.Children><ItemsControl ItemsSource={Binding Collection …}/><Grid.Children /> <Grid />I want to draw some rectangles to the grid and this code works when binding is Source to grid. I mean if the “Collection” has some value binding draws this rectangles to the grid.But ie. in an event (MouseDown) i draw rectangle to the grid with code then this rectangle doesn’t bind to the collection.Here is my

  • Jason Marcell
    linq grid datasource devexpress
    I have a DevExpress grid (DevExpress.XtraGrid.GridControl 8.2) with a datasource set at runtime like so:private DataContext db = new DataContext(“connection string”); gridControl.DataSource = from t in db.sometableselect new{Field1 = t.Name,Field2 = t.Email,Field3 = t.City};This means that the view has no idea what the data is going to look like at design time. I like being able to set a LINQ query as the datasource, but I’d also like to specify what the view will look like at design time.Is the

  • Sandeep
    internet-explorer dojo grid refresh store
    I am working on dojo1.7. I have an EnhancedGrid which I need to refresh with latest data.var gridStore = new dojo.data.ItemFileWriteStore({url:”,data:result,urlPreventCache: false});grid.store=gridStore;grid._refresh(); I am fetching some data in required format var result = {“identifier”: “id”,”items”: [] //jsonobject};The above code works fine on firefox however on IE I am getting an error ‘null is null or not an object’. I am not sure what is going wrong in IE. Is there any other way of ch

  • Phat Phuc
    c# wpf winforms treeview grid
    I am looking for a WinForms or WPF grid that is able to display different controls (textboxes and comboboxes for now) in the same column. It must have treelist/treeview functionality too, so that the hierarchy between rows (nodes) is visible. I need to be able to add a control at runtime to a cell and change row heights and column widths programmatically. I’ve been searching for a while but no luck so far. Any suggestions? Help is greatly appreciated.

  • MountainRock
    grid cocos2d cocos2d-iphone tile
    Hello guysI have a small problem while designing a iphone game with a grid using cocos2d. The game needs a 10×10 grid in the middle of the screen (it is not covering the entire screen). A line is drawn at runtime where the user touches two points in the grid. Question: would tilemap be ideal for this problem? As i need to verify the co-ordinates do belong to the grid or not when the user touches a point would tilemap be useful?Question: Is there any better way of solving this in cocos2d. Pleas

  • viky
    c# wpf treeview scrollviewer vertical-scroll
    I am using a Wpf TreeView, in which I am adding nodes at runtime. Some times tree goes bigger and ScrollViewer comes into picture(that is part of TreeView’s ControlTemplate). But everytime I add a node, I can not see it, cos it is outside the page area, I need to drag the vertical ScrollBar’s thumb down in order to see it. so I want the vertical ScrollBar to automatically drag to the point where the node is added so that I can see the node while adding it.Any help please!!

  • Dave Clemmer
    wpf scrollviewer
    Background:I am generating the UI for a settings page. The settings are stored within a Dictionary as the settings will be different for each object in question.Problem:The ScrollableHeight of a ScrollViewer is not acurate to the size of the content. When the content of the ScrollViewer changes the ScrollableHeight is not reset, but appends the height of the new content.When:I am generating content within a Grid, which is a child element within the ScrollViewer. The content being RowDefinitio

  • H.B.
    wpf xaml styles scrollviewer expander
    I have an expander with a custom template:<ControlTemplate TargetType=”{x:Type Expander}”><Grid><Grid.RowDefinitions><RowDefinition Height=”Auto” /><RowDefinition Height=”*” /></Grid.RowDefinitions><Border Grid.Row=”0″><DockPanel><ToggleButton DockPanel.Dock=”Right” Template=”{DynamicResource ExpanderToggle}” /><ContentPresenter DockPanel.Dock=”Right” ContentSource=”Tag” /><ContentPresenter DockPanel.Dock=”Left” ContentSource=”Header

  • Tom
    wpf textbox controltemplate scrollviewer snoop
    I’m having problems customizing the ControlTemplate for a TextBox. The idea is to automatically print text neatly on lined paper with as little user interaction as possible, while remaining as flexible as possible with regard to text length, font size, etc.To that end one setting is text height relative to a printed line (how close to/far above the line it appears on paper). Since changing TextBox LineHeight adds space below text and not above it, I’ve been using Padding on the top of the text

  • user1498611
    c# windows-phone-8 crash grid scrollviewer
    I am creating game for WP 8 and I am using ScrollViewer and Grid with Buttons for game board.The problem is when game board is too lardge. Then application crashes with no exception.Output is:ScrollViewer content size: 2400,2400 //my debug output The program ‘[3420] TaskHost.exe’ has exited with code -528909961 (0xe0797977).Here is XAML code:<Grid x:Name=”ContentPanel” Grid.Row=”1″ Margin=”12,0,12,0″><ScrollViewer x:Name=”ContentPanelScroll” HorizontalScrollBarVisibility=”Auto”><G

  • cspare
    silverlight windows-phone-7 scrollviewer
    I’ve got a page with a ScrollViewer control. I’m trying to implement an endless-scrolling method which lazy loads content from a webservice when the user has scrolled down to the end of the content.This seemed like a trivial task, but the most obivious event to handle (ManipulationCompleted) does not work correctly for my requirements. The event seems to fire when the user stops touching the screen. But usually the scrollviewer keeps scrolling after that, because it uses kinetic scrolling. As a

  • meds
    c# silverlight scrollviewer
    I’m trying to get the maximum amount a scrollviewer can scroll in the vertical and horizontal direction but I need to be doing this in a layout updated callback. This is what I’m currently doing:viewer.ScrollToRight( );doublehmax = viewer.HorizontalOffset;viewer.ScrollToBottom( );double vmax = viewer.VerticalOffset;But this casues an error: “Unhandled Error in Silverlight 2 Application Layout cycle detected. Layout could not complete.”Is there a way I can get the max horizontal and vertical off

Web site is in building