Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,631 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Debugging dodgy crashes #296771
11/02/09 21:38
11/02/09 21:38
Joined: Mar 2009
Posts: 23
S
Siegewolf Offline OP
Newbie
Siegewolf  Offline OP
Newbie
S

Joined: Mar 2009
Posts: 23
I have trouble with lite-c crashing. I am trying to pinpoint the location of the crash by adding printfs around, but as I narrow down the search, suddenly it stops crashing. As if the problem jumped out of my printf bracket; when I remove printfs it crashes again.

How should I go on debugging such problems?

Re: Debugging dodgy crashes [Re: Siegewolf] #296782
11/02/09 22:39
11/02/09 22:39
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Stick at it. Its just one of those things Ive found sometimes happen.
I will be interested to hear other peoples suggestions though.

I do it by putting in printf's or diag_var's from the start of the function,
with one before and after every 'significant' line or if-block.
If the printf you just inserted makes the crashes stop, then remove one of the
previous ones and the crash will usually return.
If it doesnt, then move it down line-by-line until the crash returns, or you
get data out of the printf that tells you what has gone wrong.

My usual problem is with badly-sized Malloc blocks.
I love making them one byte too small for some reason....

Best of luck


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Debugging dodgy crashes [Re: EvilSOB] #296784
11/02/09 22:42
11/02/09 22:42
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
@EvilSOB, tl;dr sorry ^^

@Siegewolf if it works with printf you probably forget a wait somewhere.

Last edited by Quadraxas; 11/02/09 22:43.

3333333333

Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1