[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

fxruby + threads + ctrl-c != stacktrace

martinus

2/11/2005 8:30:00 AM

Hi! I am writing an fxruby application, but unfortunately sometimes,
somewhere there has to be an infinite loop. (CPU 100%, taking more and
more memory). When I press Ctrl+C I expect to get a stack trace, but
this does not work with fxruby, I just get the position where the run
method of the FXApp instance is called. This makes it very difficult to
find the bug. Any ideas how I could get to a correct stacktrace?

martinus

2 Answers

Brian Schröder

2/11/2005 9:22:00 AM

0

On Fri, 11 Feb 2005 17:35:02 +0900
"martinus" <martin.ankerl@gmail.com> wrote:

> Hi! I am writing an fxruby application, but unfortunately sometimes,
> somewhere there has to be an infinite loop. (CPU 100%, taking more and
> more memory). When I press Ctrl+C I expect to get a stack trace, but
> this does not work with fxruby, I just get the position where the run
> method of the FXApp instance is called. This makes it very difficult to
> find the bug. Any ideas how I could get to a correct stacktrace?
>
> martinus
>
>
You probably already now this and it is not exactly an answer to you question, but one thing that helps a lot when debugging threads is to put

Thread.abort_on_exception = true

at the beginning of your program.

regards,

Brian Schröder



martinus

2/11/2005 9:30:00 AM

0

> Thread.abort_on_exception = true
I know this, and this should definitely be the default setting for any
application :-)

martinus