Gamestudio Links
Zorro Links
Newest Posts
FXCM => AVA Trade Plugin???
by JeyKey II. 11/25/26 09:53
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (Quad, TipmyPip, JeyKey II, Dbat), 7,527 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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