Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Quad, TipmyPip, degenerate_762, AndrewAMD, Nymphodora), 997 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Crash with function hour() in Zorro 1.66.5 #469323
11/10/17 21:22
11/10/17 21:22
Joined: Oct 2017
Posts: 25
F
fran Offline OP
Newbie
fran  Offline OP
Newbie
F

Joined: Oct 2017
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?

Last edited by fran; 11/10/17 21:23.
Re: Crash with function hour() in Zorro 1.66.5 [Re: fran] #469334
11/11/17 12:07
11/11/17 12:07
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
I see no bug in that line. Correct C syntax, although I would add a line feed. So the crash happens elsewhere.

Re: Crash with function hour() in Zorro 1.66.5 [Re: jcl] #469345
11/11/17 22:16
11/11/17 22:16
Joined: Oct 2017
Posts: 25
F
fran Offline OP
Newbie
fran  Offline OP
Newbie
F

Joined: Oct 2017
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.

Re: Crash with function hour() in Zorro 1.66.5 [Re: fran] #469355
11/12/17 09:23
11/12/17 09:23
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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!

Re: Crash with function hour() in Zorro 1.66.5 [Re: jcl] #469357
11/12/17 12:46
11/12/17 12:46
Joined: Aug 2017
Posts: 58
P
pascalx Offline
Junior Member
pascalx  Offline
Junior Member
P

Joined: Aug 2017
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.

Re: Crash with function hour() in Zorro 1.66.5 [Re: pascalx] #469358
11/12/17 13:33
11/12/17 13:33
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
If you have a crash that no one else has, maybe its a damaged file? If all else fails, try installing it again.

Re: Crash with function hour() in Zorro 1.66.5 [Re: Spirit] #469366
11/13/17 09:58
11/13/17 09:58
Joined: Aug 2017
Posts: 40
J
johnnyp Offline
Newbie
johnnyp  Offline
Newbie
J

Joined: Aug 2017
Posts: 40
If your script is HUGE (like some of mine for exporting data to csv) then that alone can cause an Error 111.

Re: Crash with function hour() in Zorro 1.66.5 [Re: johnnyp] #469381
11/13/17 19:28
11/13/17 19:28
Joined: Oct 2017
Posts: 25
F
fran Offline OP
Newbie
fran  Offline OP
Newbie
F

Joined: Oct 2017
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.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1