Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Quite stopping of program?

Author
Message
HowDo
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Dec 2010 20:14
Anyone got any hints, ideas on how to check why my code quietly stops running with no error shown, check code to see if I have any end statements in it but have found none.

1. Is there a quick way to put some code in that would make it that the user will have to stop the program from running.

2. something that might be able to show were in the code it stopped.

I used to be able to let the code run for days and be ok apart from the cpu over heating and shutting down, but have found this is not always the case, as I had something else running when my program stopped, but the other one was still going which would not have happened if there had be a reboot.

can sometimes happen in and hours our 6, 7, 8, hours later.

Dark Physics makes any hot drink go cold.
thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 8th Dec 2010 20:28
What kind of "stopping" are we talking about? It won't compile? The program exits?

Also, we need code or at least an idea of that you're doing in order to really be able to help... is it a server?


DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 8th Dec 2010 20:49
Tough one to solve if it can take 8 hours to do it. You could try saving a text file every so often with all your variables and such in it. So it will give you the last saved stats before the crash. It may help, it may not. Depends what is causing it.

http://s6.bitefight.org/c.php?uid=103081
HowDo
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Dec 2010 20:52
the later the program exits, it large bit of code that it talking to a one wire weather station, been working fine for years.

Now it could be the latest update to 7.5 that might be doing it but where and how, could not say.

I some times leave it to run overnight so I can see how low the temperature gets, but most of the time I come back to it in the morning only to find its just stopped, meaning the window it was running in has close.

I know if it was missing an image it would stop and say so, but this just stops with nothing being reported.

Dark Physics makes any hot drink go cold.
thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 8th Dec 2010 20:54
I'd suggest the same as DVader, making it save a text file with the current variables and the time. That way, you could see exactly when it crashes, and if there is a pattern. can you show any code?


HowDo
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Dec 2010 21:00
can link you to the old thread, but this code I am using has some 8000 lines to it and about fifty+ images.

might have a go at making it save the run time as this will show how long it was running before it throttled itself.

read there a console thingy in matrix utilities am I right about this.

Dark Physics makes any hot drink go cold.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Dec 2010 21:49
That won't help - the console will close when your program does.

You can use the logging commands to write to a log instead - I suggest using the OPEN LOG DEBUG command, along with debugview.

HowDo
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Dec 2010 21:57
cheers IanM may try that later.

Trying a wait key after the loop and before the end command just to see if something is making it jump out side of the loop.

Dark Physics makes any hot drink go cold.
HowDo
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 9th Dec 2010 10:14
found my problem was using an exit that was not inside a repeat or while loop like I thought it was, but in the main do loop so of course it would shut down when the if condition was met.

Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2026-07-21 19:19:04
Your offset time is: 2026-07-21 19:19:04