Gamestudio Links
Zorro Links
Newest Posts
rMomentum always returns 0 when checking for peak/valley
by jcl
Today at 17:38
a little help here?
by 3run
Today at 16:38
How to set a pair trading order right
by jcl
Today at 11:46
Dual Momentum Algorithm - The way Zorro would have done it
by Hredot
Today at 05:21
HIgh FRequency Trading Script -- Highly Profitable
by Yosh
Yesterday at 19:27
Linear Regression in objective function
by jcl
11/22/17 15:40
MT4 vs Zorro
by pascalx
11/22/17 14:00
AUM Magazine
Latest Screens
RPG PARTY
Triton Wing now available on Steam
AckCon'17: Lotter vs The World
Triton Wing
Who's Online
14 registered (Lobo, Hredot, painkiller, 3run, alibaba, Kartoffel, FLD, RealSerious3D, Jerome8911, 1 invisible), 169 Guests and 4 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
ech87, Lobo, Andy60, AzzoCorp, franzz
17813 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: 23
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 Online

Chief Engineer

Registered: 07/22/00
Posts: 25939
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: 23
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 Online

Chief Engineer

Registered: 07/22/00
Posts: 25939
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: 55
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: 730
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: 38
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: 23
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