Line numbers in Silverlight stack trace - silverlight

I'm trying to get line numbers to display in my silverlight stack trace - for this I need the pdb files deployed with the xap. I've tried including them in the Xap file (xap file stops working), and deploying them on the web server (with appropriate mime type set for pdbs), but nothing seems to work. I can get IL offset of the failure, but would prefer to get the full line number when debugging issues outside of production.
Does anyone have any suggestions? Is this possible?

Related

In Android Studio my arrays.xml file that contains multiple string arrays gives a mergeDebugResources FAILED exception

xml file named arrays.xml which contains multiple string arrays. When I try to compile Android Studio gives an Execution failed for task ':app:mergeDebugResources'. Here's my file what is wrong with it? I'm sure this file is he problem I tried every other resource in a different project only when I included this file problem occured.
I can't add my file to here as a code sample because it exceeds character limits.
I uploaded it to google drive
https://drive.google.com/file/d/1d_LiL4YopDNySYuCjOB-O5TnAcr_k3K8/view?usp=sharing

theme.res file does not open anymore, codename one themes

Themes.res file is not opening.
What do i do ?
However, the app is working.
The exception that I am getting on the console while opening the file is:
java.lang.NullPointerException
at com.codename1.ui.util.Resources.createImage(Resources.java:936)
at com.codename1.ui.util.EditableResources.createImage(EditableResources.java:2332)
at com.codename1.ui.util.Resources.loadFont(Resources.java:1119)
at com.codename1.ui.util.EditableResources.loadFont(EditableResources.java:1932)
at com.codename1.ui.util.EditableResources.openFileWithXMLSupport(EditableResources.java:426)
at com.codename1.designer.ResourceEditorView$LoadResourceFileAction.exectute(ResourceEditorView.java:4112)
at com.codename1.ui.resource.util.BlockingAction.run(BlockingAction.java:88)
at java.lang.Thread.run(Unknown Source)
Is there any way I can recover this file / data ?
First verify that the file isn't a 0 size file, if it got corrupted to that level you will need to restore from backup. This hasn't happened for us in years as far as I know but its always a risk.
Next make sure you didn't remove/rename any ttf fonts that might be used by the theme, this is a common cause for failures in the designer.
Next we need to see the actual error and to do that we need to run the designer from command line using:
java -jar ~/.codenameone/designer_1.jar
(code for Mac/Linux replace ~ with your home directory and reverse the slashes for Windows).
Now try to open the resource file and see if you get an exception in the console. Assuming you do we will know more about it and might be able to help you recover your data.
We are currently migrating to new XML based format which should become the default soon.

How to edit a SQL Server trace file?

I want to change a particular entry in a trace file. How can I do it?
I have received a set of trace files which were run on the prod server. From these I was trying to get a set of RML files to replay the load on a different environment. To change the .trc files to RML files I ran readtrace.exe
However, readtrace did not output RML files. Looking at the logs I see the following error
06/06/12 15:43:20.914 [0X0000060C] SPID: 118 Seq: 50736293 [Error: 110003][State: 0][Abs Char: 233][Seq: 0] SYNTAX ERROR: String is
missing proper closing quote near (Char Pos: 0x139 Byte Pos: 0x272)
It then clearly shows the entry which is causing this error. While I have sent the bug to the dev team and the fix will go out in the next release, I need to use the current trace file to generate and replay the load. Thus I want to fix the particular entry in the trace file which is causing this error.
Is it possible? I tried opening the trace file in wordpad but wordpad crashed, not surprising that given the trace file is 250MB. Trying to install Vim and see if I can open and change the trace file there, but was wondering if anyone knew of an easier method to do this.
I could not find a way to do this, so finally going the expected way of requesting for a new server side trace, which is taken after the fix has been put.
Before that I did try to load the trace files into a table, then load in profiler and then change the values which I needed and generate a new trace file, but crticial events needed for RML generation are lost when you load to profiler. I also opened a smaller trace file in wordpad and found that I could not edit the contents as there was binary content as well and it wasnt clear what text editing would achieve.
Thus in the end, the only way to get a trace which can generate RML files was to fix the bad query in the code and push the fix and then take the trace once again.

Silverlight XAP File not being downloaded

Wow. The feature that shows related questions WHILE making the questions is very nice. Unfortunately, none of the questions addressed my problem, nor did any of my searches worked. I did find several questions with the same problem I'm having, but none of the solutions have worked for me.
My development laptop is WinXP with IIS 5.1. I'm developing a Silverlight 4 application. Everything was working 100% perfectly, even without registering MIME Types in IIS. Last Thursday, VS.NET stopped debugging my application and the area where Silverlight was supposed to show was being left blank and there were no java errors shown by Internet Explorer 8. I got the same behavior in Firefox 4. If I right-clicked on the blank area, the usual Silverlight context menu showed up and I could see the settings.
Using Fiddler I noticed that the browser makes the request to the correct file, but it looked like the server either hangs or did not respond with the file stream. With this information I browsed my virtual directory using the browser and tried downloading the file with a right-click/save-as, but the browser just hanged waiting for a response from the server.
Tweaking the source code I noticed that, if I comment some code (any code at random, no code specifically, as long as no compile time error shows up), the application starts showing the log-in page correctly and I can download the XAP file correctly again. If I un-comment the code, the log-in stops working again and I cannot download the XAP file anymore.
I already tried registering MIME types in IIS (and double and triple checking I was writing the entries correctly), double and triple checking that the XAP file address was correct, tried changing the XAP extension to ZIP, and reinstalling Silverlight 4 Tools for VS.NET 2010.
At some time I thought it might be something about the XAP file size, which sits at 512K working or not. So I placed a 30MB file in the same directory as the XAP file. However, when I try to download the 30MB file, the download starts successfully.
For example, using directory browsing, the file shows 523587 bytes in length. This can be downloaded normally. If I un-comment whatever code I commented, the file shows 524194 bytes and the download stops working.
One last thing, I checked the Even Viewer and noticed an error thrown by ASP.NET. "aspnet_wp.exe (PID: 2100) stopped unexpectedly." Googled about this error and most hits took me to a virus and several tools for its removal. Tried the tools as well and all of them reported not finding any indication of the virus.

Error "There is no source code available for the current location."

I added the AjaxControlToolKit's sample DLL file as a reference to my web application. I used Mask text boxes on my pages.
While debugging the application, it first asked me to open MaskedEditExtender.cs file. So I just search it from my physical location and copied it in the Bin folder of the solution. Well ... now it is not asking for opening that file. But while debugging, after the content page, it debugs the master page as expected, but after just finishing debug of the master page, the debugger traverses to the MaskedEditExtender.cs file...
That is not much of an issue. That's fine (I am curious why this happening), but while debugging the MaskedEditExtender.cs file, it pop ups the message
There is no source code available for the current location."
with two buttons, "OK" and "Disassembly". What is this error? Why is it arriving? How do I avoid it?
You're missing the PDB file (program debug database) of the assembly where the exception occurs.
Open the Breakpoints window, locate the breakpoint, and delete it. This helped me...
You have arrive at a section of your program for which the debugger cannot associate a source code file. Either this is some third-party software for which you do not have the source code.
Or you have the source, but the debugger cannot associate the debugged code to that source file, since you are missing the debug symbols file (the PDB file). This file contains the mapping between the lines in the text source files and the memory address assigned by the compiler to your methods and members.
It could help if you would specify what method you are trying to drill down into when you get this message.

Resources