stack-trace

How to get stack trace of a thread

风流意气都作罢 提交于 2019-12-08 16:24:39
问题 I have a multithreaded application. Several messages are coming to the application and are processed in separated threads. For this I am using classes ThreadPoolExecutor and FutureTask from package java.util.concurrent. Occasionally I have some deadlocks in the application. When a deadlock occurs I want to interrupt the blocking thread and I want to log the stack trace of this thread so that I can later resolve the deadlock. Is there any way how can we find the stack trace of a thread outside

GetStackTrace in Delphi 7?

巧了我就是萌 提交于 2019-12-08 15:45:07
问题 Using Delphi 7, how can I get a string representing the stack-trace from an Exception ? try SomethingDodgy(); except on E:Exception do begin // print stack trace Log.Write(/* ??? */); end; end; I hear there's a GetStackTrace function in the latest delphi, but I can't find anything for delphi 7. No, upgrading is not an option :) 回答1: You could try using madExcept, a wonderful Exception handling framework. madshi has heaps of sample code in there; I'm sure I've used the stack-trace stuff in

Do not print stack-trace using Pool python

ぃ、小莉子 提交于 2019-12-08 11:37:51
问题 I use a Pool to run several commands simultaneously. I would like to don't print the stack-trace when the user interrupt the script. Here is my script structure: def worker(some_element): try: cmd_res = Popen(SOME_COMMAND, stdout=PIPE, stderr=PIPE).communicate() except (KeyboardInterrupt, SystemExit): pass except Exception, e: print str(e) return #deal with cmd_res... pool = Pool() try: pool.map(worker, some_list, chunksize = 1) except KeyboardInterrupt: pool.terminate() print 'bye!' By

Line numbers missing from exception stack trace when ASP.NET impersonation enabled

删除回忆录丶 提交于 2019-12-08 08:34:51
问题 An ASP.NET 2.0 web application has been compiled with PDB symbols, deployed to a server running IIS 6. In the web.config, user impersonation is enabled: <identity impersonate="true" /> When an Exception is thrown, the stack trace is missing line numbers, making it very difficult to determine exactly where the exception is emanating from. eg. System.NullReferenceException: Object reference not set to an instance of an object. at MyApp.ReportingServices.WebForm.DA.AmoRepository.GetDimensions

How to show a stack trace reports of unhandled exceptions in WPF

给你一囗甜甜゛ 提交于 2019-12-08 07:27:32
问题 I using this EventHandler to catch all unhandled exceptions. public App() : base() { this.Dispatcher.UnhandledException += OnDispatcherUnhandledException; } void OnDispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) { ... } I want to show the stack trace of the exeption (except the error message) like in this picture: How can I do that? 回答1: I might not have understood this question because to my understanding, it seems to be quite a

C#/WPF app throwing a ObjectDisposedException; why am I not able to catch or get a stacktrace?

时光毁灭记忆、已成空白 提交于 2019-12-08 07:10:59
问题 I have a C# WPF UI app, and when I close it, I always get a windows application-crash dialog ("UIDemo has encountered a problem and needs to close."). The error report indicates that it's a System.ObjectDisposedException which indicates that somewhere a method's being called on a disposed object. That's fine, I do understand that part. And I would love to fix it. I just can't get a stacktrace on the bastard. That exception is evading all of the following: my DispatcherUnhandledException

Get object call hierarchy

戏子无情 提交于 2019-12-08 02:15:01
问题 Lets say I have 3 classes: class A { void do_A() { //Check object call hierarchy } } class B { void do_B() { A a; a.do_A(); } } class C { void do_C() { B b; b.do_A(); } } And then I call: C c; c.do_C(); How can i get the object call hierarchy from within A's do_A() ? I mean I want to get the references of object in a.do_A() (can be easily attained by this ), the reference of object b that called a.do_A() , and the reference of object c that called b.do_B() . I think this should be possible,

traceback.print_stack() using IPython's ultratb

雨燕双飞 提交于 2019-12-07 18:46:28
问题 For debugging/logging purposes, I would like to write the full stack to a file (such as in this question). I can do this using traceback.format_stack(). However, I would like it to look like the more verbose tracebacks that IPython outputs, for example, formatting with IPython.core.ultratb.VerboseTB. It appears the classes and methods in IPython.core.ultratb require information on exceptions, as they are designed for tracebacks. But I have no exception: I just want to display the stack in a

C#/WPF app throwing a ObjectDisposedException; why am I not able to catch or get a stacktrace?

谁说胖子不能爱 提交于 2019-12-07 15:58:28
I have a C# WPF UI app, and when I close it, I always get a windows application-crash dialog ("UIDemo has encountered a problem and needs to close."). The error report indicates that it's a System.ObjectDisposedException which indicates that somewhere a method's being called on a disposed object. That's fine, I do understand that part. And I would love to fix it. I just can't get a stacktrace on the bastard. That exception is evading all of the following: my DispatcherUnhandledException handler my try/catch surrounding the entire contents of the Exit event handler clicking "Debug" in that

Getting the Exception object in a try..catch to include FULL stacktrace, currently its truncated

不羁的心 提交于 2019-12-07 10:58:38
问题 can anyone help? I am trying to get the full stacktrace when within a catch of try..catch. Currently its truncated to include only the current method where the error is.... Let me explain.. Currently i my stacktrace includes the method "Third" where the error happens but First and Second isn't included, i believe this is by design. private void First() { this.Second(); } private void Second() { this.Third(); } private void Third() { try { throw new SystemException("ERROR HERE!"); } catch