Search Results

Search found 504 results on 21 pages for 'stacktrace'.

Page 1/21 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • I have a stacktrace and limit of 250 characters for a bug report

    - by George Duckett
    I'm developing an xbox indie game and as a last-resort I have a try...catch encompassing everything. At this point if an exception is raised I can get the user to send me a message through the xbox however the limit is 250 characters. How can I get the most value out of my 250 characters? I don't want to do any encoding / compressing at least initially. Any solution to this problem could be compressed if needed as a second step anyway. I'm thinking of doing things like turning this: at EasyStorage.SaveDevice.VerifyIsReady() at EasyStorage.SaveDevice.Save(String containerName, String fileName) into this (drop the repeated namespace/class and method parameter names): at EasyStorage.SaveDevice.VerifyIsReady() at ..Save(String, String) Or maybe even just including the inner-most method, then only line numbers up the stack etc. TL;DR: Given an exception with a stacktrace how would you get the most useful debugging infromation out of 250 characters? (It will be a .net exception/stacktrace)

    Read the article

  • Why not to use StackTrace to find what method called you

    - by Alex.Davies
    Our obfuscator, SmartAssembly, does some pretty crazy reflection. It's an obfuscator, it's sort of its job to do things in the most awkward way possible. But sometimes, you can go too far. One such time is this little gem from the strings encoding feature: StackTrace stackTrace = new StackTrace(); StackFrame frame = stackTrace.GetFrame(1); Type ownerType = frame.GetMethod().DeclaringType; It's designed to find the type where the calling method is defined. A user found that strings encoding occasionally broke on x64 systems. Very strange. After some debugging (thank god for Reflector Pro, it would be impossible to debug processed assemblies without it) I found that the ownerType I got back was wrong. The reason is that the x64 JIT does tail call optimisation. This saves space on the stack, and speeds things up, by throwing away a method's stack frame if the last thing that it calls is the only thing returned. When this happens, the call to StackTrace faithfully tells you that the calling method is the one that called the one we really wanted. So using StackTrace isn't safe for anything other than debugging, and it will make your code fail in unpredictable ways. Don't use it!

    Read the article

  • Hooking a Stacktrace in Delphi 2009

    - by Jim McKeeth
    The Exception class in Delphi 2009 received a number of new features. A number of them are related to getting a stacktrace: property StackTrace: string *read* GetStackTrace; property StackInfo: Pointer read FStackInfo; class var GetExceptionStackInfoProc: function (P: PExceptionRecord): Pointer; class var GetStackInfoStringProc: function (Info: Pointer): string; class var CleanUpStackInfoProc: procedure (Info: Pointer); Has anyone used these to obtain a stack trace yet? Yeah, I know there are other ways to get a stack trace, but if it is supported natively in the Exception class I would rather leverage that. Update: There is an interest blog post about this. Covers it in a lot of depth.

    Read the article

  • Add stacktrace to every log in log4net

    - by tiagodias
    Hi all... I'm using Log4Net to log a multilayered enterprise application. I know that when i log with exception Log4Net automatically exposes the exception StackTarce, but i want to log the stacktrace for every log even if those are not exception throws. Why i need that?... Simply, i want to know the call origin of the log (drilldown the layers...) Thank all... Tiago Dias

    Read the article

  • How to generate a stacktrace when my gcc C++ app crashes

    - by KPexEA
    When my c++ app crashes I would like to generate a stacktrace. I already asked this but I guess I needed to clarify my needs. My app is being run by many different users and it also runs on Linux, Windows and Macintosh ( all versions are compiled using gcc ). I would like my program to be able to generate a stack trace when it crashes and the next time the user run's it, it will ask them if it is ok to send the stack trace to me so I can track down the problem. I can handle the sending the info to me but I don't know how to generate the trace string. Any ideas?

    Read the article

  • C# Reflection StackTrace get value

    - by John
    I'm making pretty heavy use of reflection in my current project to greatly simplify communication between my controllers and the wcf services. What I want to do now is to obtain a value from the Session within an object that has no direct access to HttpSessionStateBase (IE: Not a controller). For example, a ViewModel. I could pass it in or pass a reference to it etc. but that is not optimal in my situation. Since everything comes from a Controller at some point in my scenario I can do the following to walk the sack to the controller where the call originated, pretty simple stuff: var trace = new System.Diagnostics.StackTrace(); foreach (var frame in trace.GetFrames()) { var type = frame.GetMethod().DeclaringType; var prop = type.GetProperty("Session"); if(prop != null) { // not sure about this part... var value = prop.GetValue(type, null); break; } } The trouble here is that I can't seem to work out how to get the "instance" of the controller or the Session property so that I can read from it.

    Read the article

  • Using the StackTrace Class in a production environment to get calling method info

    - by andy
    hey guys We have a "log" class which uses Relection.MethodBase to send current class info to the log. The reflection.MethodBase stuff happens in the class itself. However, I'd like to move that stuff to a single external "log" singleton type class. In this scenario the external log class needs to get the CALLING info, not the current method info. I'm using stacktrace to do this, which isn't in the Reflection namespace. Can I guarantee that "that" specific information (calling method) will be there in a production environment? var stackTrace = new StackTrace(); return LogManager.GetLogger(stackTrace.GetFrame(1).GetMethod().DeclaringType); cheers!

    Read the article

  • How to get the stacktrace in a mobile device?

    - by Daniel Moura
    I'm getting a NullPointerException in a Nokia S40. I want to know what is causing this exception. The device shows: NullPointerException java/lang/NullPointerException This error only occurs in the device, running in the emulator the application works fine. I use microlog to debug my application. But the application works fine if the log is enabled. Is there a way to get the stack trace when I get this NullPointerException? I don't need all details like the line number just which method cause this exception. UPDATE: I installed the same application in another Nokia S40 and the same error didn't occur. Nokia 2660 - error Nokia 6131 - no error UPDATE 2: Somehow I find what was causing the NullPointerException. import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Graphics; public class OuterClass extends Canvas { private Config config; public OuterClass() { this.config = new Config(); } public void paint(Graphics graphics) { HelperClass helper = new HelperClass(this.config); helper.doStuff(); } public void dispose() { this.config = null; } public class Config implements IConfig { public int getSomething() { // ... } } } public class HelperClass { private IConfig config; public HelperClass(IConfig) { this.config = config; } public doStuff() { config.getSomething(); // Here is thrown NullPointerException } } In some situations a thread is started and call the OuterClass.dispose() before the helper.doStuff() causing the NPE. I think when I enabled the log it made the thread slower and helper.doStuff() was called when I expected it to be called.

    Read the article

  • Preserving original StackTrace/LineNumbers in .NET Exceptions

    - by Sam
    Understanding the difference between throw ex and throw, why is the original StackTrace preserved in this example: static void Main(string[] args) { try { LongFaultyMethod(); } catch (System.Exception ex) { Console.WriteLine(ex.StackTrace); } } static void LongFaultyMethod() { try { int x = 20; SomethingThatThrowsException(x); } catch (Exception) { throw; } } static void SomethingThatThrowsException(int x) { int y = x / (x - x); } But not in this one: static void Main(string[] args) { try { LongFaultyMethod(); } catch (System.Exception ex) { Console.WriteLine(ex.StackTrace); } } static void LongFaultyMethod() { try { int x = 20; int y = x / (x - 20); } catch (Exception) { throw; } } The second scenario is producing the same output as throw ex would? In both cases, one expects to see the line number where y is initialized.

    Read the article

  • Asp.Net error reporting with stacktrace

    - by Helo
    I have an Asp.Net web site set up to log errors using Log4Net (in global.asax) and redirect users to a custom error page (set up in web.config with: ). On this error page the users have the opportunity to write about what they did when the error occurred and post the description back to us to help fix the problem. My question is this: How do i connect the error stacktrace to the users error report? It appears that .Net has handled the error when it was written to the log file and the custom error page has no information about the stacktrace. If only I could see the stacktrace from the custom error page code-behind my problem would be solved.

    Read the article

  • How to get stack trace of a running process from within a Visual Studio add-in?

    - by Jack
    I am writing a Visual Studio add-in in C# which will run while I am debugging a process in the same Visual Studio window and I need access to that the process' stack trace from within my add-in. I tried putting this code into my add-in but it returns the add-in's stack trace, not the process I am debugging. System.Diagnostics.StackTrace stacktrace = new System.Diagnostics.StackTrace(true); System.Diagnostics.StackFrame stackframe = stacktrace.GetFrame(0); Any help would be appreciated.

    Read the article

  • How to get stack trace of a running process from a Visual Studio add-in?

    - by Jack
    I am writing a Visual Studio add-in in C# and I need access to the currently running process' stack trace. I tried putting this code into my add-in but it returns the add-in's stack trace, not the process I am debugging. System.Diagnostics.StackTrace stacktrace = new System.Diagnostics.StackTrace(true); System.Diagnostics.StackFrame stackframe = stacktrace.GetFrame(0); Any help would be appreciated.

    Read the article

  • Stack Trace Logger [migrated]

    - by Chris Okyen
    I need to write a parent Java class that classes using recursion can extend. The parent class will be be able to realize whenever the call stack changes ( you enter a method, temporarily leave it to go to another method call, or you are are finsihed with the method ) and then print it out. I want it to print on the console, but clear the console as well every time so it shows the stack horizantaly so you can see the height of each stack to see what popped off and what popped on... Also print out if a baseline was reached for recursive functions. First. How can I using the StackTraceElements and Thread classes to detect automatically whenever the stack has popped or pushed an element on without calling it manually? Second, how would I do the clearing thing? For instance , if I had the code: public class recursion(int i) { private static void recursion(int i) { if( i < 10) System.out.println('A'); else { recursion(i / 10 ); System.out.println('B'); } } public static void main(String[] argv) { recursion(102); } } It would need to print out the stack when entering main(), when entering recursion(102) from main(), when it enters recursion(102 / 10), which is recursion(10), from recursion(102), when it enters recursion(10 / 10), which is recursion(1) from recursion(10). Print out a message out when it reaches the baseline recursion(1).. then print out the stacks of reversed revisitation of function recursion(10), recursion(102) and main(). finally print out we are exiting main().

    Read the article

  • Get stacktrace from stuck python process

    - by piquadrat
    I have to run a legacy Zope2 website and have some grievance with it. The biggest issue is that, occasionally, it just locks up, running at 100% CPU load and not answering to requests anymore. While the problem isn't reproducible on a regular basis, one page containing 3 dynamic graphs triggers it sometimes, so I suspect some kind of race condition that leads to an endless loop or a stuck busywait. The problem is, I have not yet found a way to debug this thing. There's nothing in the Zope logs and nothing in the system logs. I tried the suggestions from this question to get a stacktrace, but the only signal that has any effect is SIGKILL. Is there another possibility to find out where exactly the process is when it gets stuck?

    Read the article

  • Reading Stacktrace in Objective-C?

    - by yar
    I don't like real-time debugging much, but if it's necessary I'll do it. Is there any way to figure out what line of code a StackTrace in Objective-C refers to? What about the variable it refers to? For instance: 2010-05-13 19:39:11.673 Thingers[21003:207] *** -[NSCFString count]: unrecognized selector sent to instance 0x3b0ebb0 2010-05-13 19:39:11.674 Thingers[21003:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString count]: unrecognized selector sent to instance 0x3b0ebb0' 2010-05-13 19:39:11.675 Thingers[21003:207] Stack: ( 29303899 ... 11130 ) I see that we're talking about sending a count message to something that doesn't have it (maybe it's a NSCFString?), but is there any way to figure out what a/the named reference to that instance (0x3b0ebb0) refers to?

    Read the article

  • How to obtain the native stacktrace from native exceptions caught in managed code

    - by aaa
    I have some managed code that calls to a method inside some native DLL(i have the appropriate symbol files). Sometimes, that native method throws an exception which I catch in my managed code. However, when i print the stacktrace from my caught exception, I see only managed code (the last frame is the call to the native code .. but it don't see the stacktrack within the native code). How can I obtain the native callstack as well? *When i'm debugging the code, i am able to step into the native code, and see the actuall call stack.

    Read the article

  • I don't see any stacktrace running webapp with JBoss

    - by anna
    hi everyone. I have some very annoying trouble with jboss. I'm developing simple web-app using richfaces and I'm facing the problem that when I deploy and run application in browser jboss shows just following message: This page contains the following errors: error on line 12 at column 16: internal error Below is a rendering of the page up to the first error. And that's all. No stacktrace! It's so uneasy to search for a source of problem. Could anyone help me to "turn on" stacktracing?

    Read the article

  • Print stacktrace from C code with embedded lua

    - by Matt H
    If I understand this correctly, Lua by default will call the debug library "debug.traceback" when an error occurs. However, when embedding Lua into C code like done in the example here: Simple Lua API Example We only have available the error message on the top of the stack. i.e. if (status) { /* If something went wrong, error message is at the top of */ /* the stack */ fprintf(stderr, "Couldn't load file: %s\n", lua_tostring(L, -1)); /* I want to print a stacktrace here. How do I do that? */ exit(1); } How do I print the stack trace from C after the initial error?

    Read the article

  • Android app after update: crashes on Motorola Cliq with weird stacktrace

    - by sandis
    So after updating my app on the market I am getting reports from motorola cliq-users that my app crashes on start. The stacktrace is below, and is not very helpful since it does not go trough my app! Unfortunately I have no access to a motorola cliq-phone by myself, and I have changed too many things in this update to know what is causing the trouble. Have anyone of you guys run into the same problem? I would very much appreciate help with this problem! 05-26 11:44:06.521 I/PacketReader( 116): Got the features element 05-26 11:44:06.941 W/WindowManager( 86): No window to dispatch pointer action 0 05-26 11:44:07.381 W/WindowManager( 86): No window to dispatch pointer action 1 05-26 11:44:07.691 W/ActivityManager( 86): Launch timeout has expired, giving up wake lock! 05-26 11:44:07.931 W/ActivityManager( 86): Activity idle timeout for HistoryRecord{43714db8 {my.package/my.package.Main}} 05-26 11:44:08.531 E/AndroidRuntime( 565): Uncaught handler: thread main exiting due to uncaught exception 05-26 11:44:08.541 E/AndroidRuntime( 565): java.lang.RuntimeException: Unable to start activity ComponentInfo{my.packageC/my.package.Main}: java.lang.NullPointerException 05-26 11:44:08.541 E/AndroidRuntime( 565): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2297) 05-26 11:44:08.541 E/AndroidRuntime( 565): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2313) 05-26 11:44:08.541 E/AndroidRuntime( 565): at android.app.ActivityThread.access$2000(ActivityThread.java:115) 05-26 11:44:08.541 E/AndroidRuntime( 565): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1721) 05-26 11:44:08.541 E/AndroidRuntime( 565): at android.os.Handler.dispatchMessage(Handler.java:99) 05-26 11:44:08.541 E/AndroidRuntime( 565): at android.os.Looper.loop(Looper.java:123) 05-26 11:44:08.541 E/AndroidRuntime( 565): at android.app.ActivityThread.main(ActivityThread.java:3977) 05-26 11:44:08.541 E/AndroidRuntime( 565): at java.lang.reflect.Method.invokeNative(Native Method) 05-26 11:44:08.541 E/AndroidRuntime( 565): at java.lang.reflect.Method.invoke(Method.java:521) 05-26 11:44:08.541 E/AndroidRuntime( 565): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782) 05-26 11:44:08.541 E/AndroidRuntime( 565): at com.android.internal.os.ZygoteI

    Read the article

  • How to get stack trace information for logging in production when using the GAC

    - by Jonathan Parker
    I would like to get stack trace (file name and line number) information for logging exceptions etc. in a production environment. The DLLs are installed in the GAC. Is there any way to do this? This article says about putting PDB files in the GAC: You can spot these easily because they will say you need to copy the debug symbols (.pdb file) to the GAC. In and of itself, that will not work. I know this article refers to debugging with VS but I thought it might apply to logging the stacktrace also. I've followed the instructions for the answer to this question except for unchecking Optimize code which they said was optional. I copied the dlls and pdbs into the GAC but I'm still not getting the stack trace information. Here's what I get in the log file for the stack trace: OnAuthenticate at offset 161 in file:line:column <filename unknown>:0:0 ValidateUser at offset 427 in file:line:column <filename unknown>:0:0 LogException at offset 218 in file:line:column <filename unknown>:0:0 I'm using NLog. My NLog layout is: layout="${date:format=s}|${level}|${callsite}|${identity}|${message}|${stacktrace:format=Raw}" ${stacktrace:format=Raw} being the relevant part.

    Read the article

  • Exceptions stacktrace

    - by f4
    What's the best way to implement an exception stack trace? I found some kind of a solution using uncaught_exception() but it requires to add some code to every function. I need something working on gcc under linux and windows

    Read the article

  • Stack Trace in error in Webpage in ASP not in my code?

    - by MarceloRamires
    I'm new to web-development in ASP, and I'm experiencing a problem where I try to access a certain page through a link and I get an error, the first part says it's an exception, then tips on debugging and then the stacktrace. What happens is that this code isn't on my application, I've had errors like this before, and the peace of code that appeared usually helped me a lot.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >