Gamestudio Links
Zorro Links
Newest Posts
Windows permission issues
by HellThunder
Yesterday at 21:51
CSVToHistory.c
by Dalla
Yesterday at 20:42
Position Close not possible
by MatPed
Yesterday at 18:49
Options trading questions
by Zheka
Yesterday at 17:36
Published Gamestudio Games?
by jumpman
Yesterday at 08:05
New Zorro version 1.88
by DdlV
09/24/18 20:32
Possible to extend assetHistory with own source?
by jcl
09/24/18 16:32
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
15 registered (Jason_Rogers, alibaba, dmac, AndrewAMD, HellThunder, StefanS, Dalla, jumpman, 3 invisible), 504 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
cepturion, Mon3y, vincitytaymo, just, XJohnny_Hoffmann
18057 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: 26488
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: 26488
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: 773
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 | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de