Gamestudio Links
Zorro Links
Newest Posts
Can't go to FALSEGOTO:DOUBLE?
by Turrican
Today at 00:34
Chamferbox Lucky Pack, once a year chance, 90% OFF limited deals
by Chamferbox
Yesterday at 21:10
How detect 200 bars after trade was opened?
by Tuguldur717
Yesterday at 13:58
Data quality and accuracy of test results
by brax
Yesterday at 13:44
Can be changed the header in Zorro?
by tomaslolo
Yesterday at 12:12
Price difference between last tick and previous.
by JRA
Yesterday at 11:47
Zorro on Linux
by alb
02/21/18 20:47
AUM Magazine
Latest Screens
Forgotten Tales - Demo version
RPG PARTY
Triton Wing now available on Steam
AckCon'17: Lotter vs The World
Who's Online
17 registered (dmac, Hredot, Cheulmen, BlackJack, MatPed, Kartoffel, alibaba, AndrewAMD, 3 invisible), 475 Guests and 9 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
tomaslolo, dmac, alb, may, piddle61
17896 Registered Users
Topic Options
Rate This Topic
#469323 - 11/10/17 22:22 Crash with function hour() in Zorro 1.66.5
fran Offline
Newbie

Registered: 10/24/17
Posts: 25
Hi,
The next line of code makes Zorro crash:
printf("Hour=%d",hour());

I get the next error:
"Error 111: Crash in script: run()"

Is this a bug right?


Edited by fran (11/10/17 22:23)

Top
#469334 - 11/11/17 13:07 Re: Crash with function hour() in Zorro 1.66.5 [Re: fran]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26227
Loc: Frankfurt
I see no bug in that line. Correct C syntax, although I would add a line feed. So the crash happens elsewhere.

Top
#469345 - 11/11/17 23:16 Re: Crash with function hour() in Zorro 1.66.5 [Re: jcl]
fran Offline
Newbie

Registered: 10/24/17
Posts: 25
The bug is not in the code, the bug is in the hour() function. If I comment the line or change hour() by second() it works, so I assume the problem is the hour() function. Maybe it depends on the MT version I have, I do not know.

Top
#469355 - 11/12/17 10:23 Re: Crash with function hour() in Zorro 1.66.5 [Re: fran]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26227
Loc: Frankfurt
Bugs are not as simple as that. You must really look for and fix them. That it immediately crashes when you print the hour will help finding it, but a bug in the hour function is not really likely. And it's not your MT version either.

First find out which line crashes, by the method with _POS described in the manual. If it is really the printf line, outcomment systematically code parts until it does not crash anymore. If only the printf remains and still crashes, last hiding place of the bug is your price data - maybe it contains nonsense instead of valid time stamps.

Back to work!

Top
#469357 - 11/12/17 13:46 Re: Crash with function hour() in Zorro 1.66.5 [Re: jcl]
pascalx Offline
Junior Member

Registered: 08/15/17
Posts: 58
There is a simple way to verify the suspected cause:
Create a new script and only put the printf("Hour=%d",hour()); in there and see if it crashes.

Top
#469358 - 11/12/17 14:33 Re: Crash with function hour() in Zorro 1.66.5 [Re: pascalx]
Spirit Offline
Moderator

Registered: 09/02/03
Posts: 739
If you have a crash that no one else has, maybe its a damaged file? If all else fails, try installing it again.

Top
#469366 - 11/13/17 10:58 Re: Crash with function hour() in Zorro 1.66.5 [Re: Spirit]
johnnyp Offline
Newbie

Registered: 08/12/17
Posts: 40
If your script is HUGE (like some of mine for exporting data to csv) then that alone can cause an Error 111.

Top
#469381 - 11/13/17 20:28 Re: Crash with function hour() in Zorro 1.66.5 [Re: johnnyp]
fran Offline
Newbie

Registered: 10/24/17
Posts: 25
I do not get the crash know, I think this was because of the data price as jcl said. Thanks for your help.

Top



Gamestudio download | chip programmers | Zorro platform | shop | resources | magazine | manual | support faq | bugs

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) 3dgamestudio.net