forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

debugger crash

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Fri Apr 18, 2008 8:14 am    Post subject: debugger crash Reply with quote

Please remind me one thing I always forget with time. How to return back to debugger during the run of the program under sdbg ?

Also, I am fighting now whole day with some obscure bug which causes code and debugger to crash not leaving me any info about what line causes it. I see or the message that illegal floating point instruction took place or logarithm function is negative. Or degugger switches to assembler mode with no info at which subroutine this happen. Any ideas how to make debugeer be normally working?

I have tried many switches, increased the stack to almost 2 GB but this happen. Most probabe reason is iverflow of some single precision variable somwhere, but I have 50 thousand of them Sad and the code is huge, so step by step execution will take hours...
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Fri Apr 18, 2008 3:49 pm    Post subject: Reply with quote

You should ensure that all of your code is compiled using /checkmate (or something similar). Then load your program into SDBG and click on the run button. It should then halt at the point in the code where the problem arises.

Chances are that you have omitted to use debugging options in some of your routines.

You should get a interactive dialog box when the program is just number crunching.
Back to top
View user's profile Send private message AIM Address
Robert



Joined: 29 Nov 2006
Posts: 445
Location: Manchester

PostPosted: Fri Apr 18, 2008 9:52 pm    Post subject: Reply with quote

Does the debugger crash as the program loads or when the floating point exception happens?
Back to top
View user's profile Send private message Visit poster's website
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Sat Apr 19, 2008 7:46 am    Post subject: Reply with quote

Wow...I think this was Salford own problem. The program crashed at

call scale_font@(SizeFontXaxis)

SizeFontXaxis was equal 1.2 and after 150 calls the font went to crazy size (and I did not see it, it was out of screen scale) and crashed compiler...
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Sat Apr 19, 2008 8:04 am    Post subject: Reply with quote

scale_font@ takes the dimensions of the existing font for the drawing surface and scales it up or down depending on the argument.

If you call this routine repeatedly with an argument greater than one then the font will continue to grow. The exception is probably raised during a resulting call to a Windows API function.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Sat Apr 19, 2008 9:04 am    Post subject: Reply with quote

Thanks all for the suggestions.
One thing, please remind me this debugger feature: how to return back to debugger during the run of the program ? I mean, how to interrupt the run of the program (when it is in windows mode made with Clearwin+) and go back to the debugger ?
Back to top
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 445
Location: Manchester

PostPosted: Sat Apr 19, 2008 1:10 pm    Post subject: Reply with quote

The best way is to alt-tab back to the debugger and press the 'pause' button (or break in Visual Studio).
Back to top
View user's profile Send private message Visit poster's website
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Mon Apr 21, 2008 2:21 am    Post subject: Reply with quote

I remember there was a key combination for this. Pressing on "Pause" button almost always causes the debugger fall into the assembler and crash - (weakest point of the sdbg)
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Mon Apr 21, 2008 7:24 am    Post subject: Reply with quote

You will end up in assembler if the break point is in code that has not be compiled with one of the FTN95 (or SCC) debugging options. This could be your own code or someone else's DLL.

You should still be able to see the call stack to see where you are.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Tue Apr 22, 2008 6:53 am    Post subject: Reply with quote

No, I always compile all subroutines with /check when debug.
BUT I AFRAID TO PUSH "Pause" button on the debugger,
you never know if debugger will crash into assembler (basically, completely, you have to drop this and start new debugger session after that) or not.

The key combination (anyone knows it ?) though always returned me to from running code to debugger without crash but I again forgot it...What is it, folks ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group