Page 1 of 1

"Crashed" but no Restart

Posted: Mon Dec 09, 2013 7:37 am
by Danni
I was wondering about the "onCrashClient" function. For that purpose I read these Threads:

http://www.solarstrike.net/phpBB3/viewt ... hed#p52801
http://www.solarstrike.net/phpBB3/viewt ... ash#p50905

But it is still not really working for me. :roll:

Sometimes after a while, specially when I am working with a "loop" function, my Rom Client stop working / "not responding".
After a while or often I have to manually close it by clicking on the "red cross", Windows give a new window telling me to "force close" the Rom Client.
When this happen... Is that a "crashed game client" ? :?:

If it is, MM does not recognize it as one. :? It just show:
The game client did not crash.
8:25pm - ...-Lenovo/Desktop/micromacro ROM/scripts/rom/functions.lua:739: bad ar
gument #1 to 'memoryReadByte' ((null))
Am I doing something wrong? Or is the function to "restart" Rom again not working? :?:

Re: "Crashed" but no Restart

Posted: Mon Dec 09, 2013 8:06 am
by rock5
If the game hangs and freezes because of a badly written loop then the code needs to be fixed. It wont count as a crash because the client is still running and the crash dialog doesn't appear. onClientCrash only runs if the crash dialog is detected. But even then, it can't be fool proof. The check for the client crash happens in a registered timer so it could be anywhere in the bot code when it detects the crash. Depending on where it is in the code, you might get unexpected results.

So if it crashes often, it's expected that eventually it wont recover.

Re: "Crashed" but no Restart

Posted: Mon Dec 09, 2013 9:07 am
by Danni
I see. :o Too bad. ;)

But I just tried now manually doing a Crash by using this method:
start a waypoint such as rbassist and enter "/script GetCraftItem(5,6,177)
I get the crash dialogue , but than the game freeze again, which is followed by the same error.
... my Rom Client stop working / "not responding".
After a while or often I have to manually close it by clicking on the "red cross", Windows give a new window telling me to "force close" the Rom Client.
Only different is: MM now shows this message:
9:57pm - ...esktop/micromacro ROM/scripts/rom/classes/objectlist.lua:14: bad argument #1 to 'memoryReadUIntPtr' ((null))
Is this normal, that it doesn't recover? :?: Or like you said:
So if it crashes often, it's expected that eventually it wont recover.
But I don't have that many crashes yet.

Re: "Crashed" but no Restart

Posted: Mon Dec 09, 2013 10:03 am
by rock5
It's possible there could be more than one type of crash dialog. The one the game can handle at the moment is the one called "Crash report". Is that the one you got? If it is a different dialog, I don't see why we couldn't add a check for that dialog too.

Re: "Crashed" but no Restart

Posted: Mon Dec 09, 2013 10:07 am
by rock5
I just tested it using that command and it is a "Crash report". How did you test it though? The bot would have to be running when you enter that command.

Re: "Crashed" but no Restart

Posted: Mon Dec 09, 2013 1:08 pm
by Bill D Cat
What about catching this kind of crash?

Re: "Crashed" but no Restart

Posted: Mon Dec 09, 2013 1:53 pm
by Danni
@rock5

I just started a WP of mine and wrote the command
/script GetCraftItem(5,6,177)
into a macro. As soon I pressed/activated it, a new window , which I never saw before, showed up. I think, that would be the "Crash Report"... I would have post a picture, but I don't now how to do that :? Like Bill D Cat example ;)

:!: But I normally get the window , which Bill D Cat posted :!:

If it is possible to catch that kind of Crash, it would solve the problem.... probably :? Is it possible to catch it? :?:

Re: "Crashed" but no Restart

Posted: Mon Dec 09, 2013 1:59 pm
by BlubBlab
I have taken a look into the windows crash report in the past. It's not impossible but difficult because fist they differ from each windows version, second the parent PID isn't necessary ROM and third I found only a C API to interface for it, no batchfile

Some infos:
http://en.wikipedia.org/wiki/Windows_Error_Reporting
http://en.wikipedia.org/wiki/Windows_Action_Center

Re: "Crashed" but no Restart

Posted: Tue Dec 10, 2013 1:31 am
by rock5
Maybe the "Crash Report" is sent from the game so it's parent PID matches the game but the other error messages are from Windows so they don't. That would make it difficult. Especially if different versions of Windows use different error reporting.

Re: "Crashed" but no Restart

Posted: Tue Dec 10, 2013 2:52 am
by Danni
mhm... :geek:

damn it :P

it would be so great if it is possible ;)

one might open a vote, and try to find out what kind of Windows each member here is using. But my guess would be Vista, 7, 8. 8-)

The language wouldn't be difficult. English and German , is my guess. :lol: Or let say the most major ones.

Re: "Crashed" but no Restart

Posted: Tue Dec 10, 2013 2:54 am
by kuripot
w8