Gamestudio Links
Zorro Links
Newest Posts
Future of ZorroHFT
by TipmyPip. 11/16/25 13:52
COT Download with Quandl does not work
by Petra. 11/15/25 09:35
Training with the R bridge does not work
by Petra. 11/15/25 09:31
Zorro 2.70
by jcl. 11/15/25 08:43
Camera always moves upwards?
by NeoDumont. 11/14/25 16:32
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (TipmyPip, Grant, Ayumi, ozgur, Quad), 7,400 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
tritom, sheliepaley, Blueguy, blobplayintennis, someone2
19178 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 Online
Senior Expert
Quad  Online
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