Page 1 of 1
editor crash
Posted: Sun Nov 15, 2015 8:44 pm
by AndakRainor
What kind of problems can cause the editor to crash with no trace in the grimrock.log file ?
Re: editor crash
Posted: Mon Nov 16, 2015 8:00 am
by Isaac
*The long way around, for if you can't find it soon:
I've had this happen to me, but I do not recall the causes; it's been rare, and I always keep a [minutes old] back up to revert to in case of strange problems.
If you don't have custom assets, it's probably in your script entities; if you do have custom assets, try making a copy of your mod folder, and export that one without the custom assets ~see if it crashes.
It's probably scripts; very easily an error in hooked functions, if you have them. Working on the debug copy of your project folder, start with disabling the asset hook functions... test, and then move on to the regular script objects. You can use multi-line comments to disable chunks of script and once it doesn't crash, you might have an idea of the asset or script responsible. Once you narrow it down to that, it should be easy isolate it.
When I had an error like this during the ORRR2, it was an asset on the map (a floor tile, it turned out).
That's likely not related to what you have, but the way I found it was that in the end, I duplicated my mod, and took the duplicate apart 50% at a time. Once I knew that it wasn't scripts, I removed half of everything else on the map, exported it, and tested it out in the game. If it crashed, then it was still on the map in the other half; and I deleted half of that next. I did this until I had two objects on left the map, and I found that the inclusion of one of them would crash the game. I deleted and the problem was gone.
(This object was not noticeably unique; it must have been, but I never found out why. I had a dozen of them on the map.)
If it comes to it, my advice is delete (in the copy) until it doesn't crash, and then figure out what you deleted before it stopped crashing.
Re: editor crash
Posted: Mon Nov 16, 2015 9:22 am
by minmay
If the problem is with one of your scripts, it's MUCH faster to just run the game from the command prompt. It will print the error cause (if it's one of your scripts, this will probably be a Lua panic) when it crashes.
Re: editor crash
Posted: Mon Nov 16, 2015 10:02 pm
by Azel
The most common root cause for these types of problems is: electrons

Re: editor crash
Posted: Mon Nov 16, 2015 11:02 pm
by AndakRainor
Azel wrote:The most common root cause for these types of problems is: electrons

How do I debug electrons ?
I will start to see what I can get with the console command, next the dichotomy method

But when you get random bugs with no way to reproduce them or trace them, well... electrons !!!
Re: editor crash
Posted: Wed Nov 18, 2015 12:01 am
by AndakRainor
Oh great... I have the steam version of the game... So as in
this thread, i don't get anything but a "jit disabled" line in the output. Any way to enable it ?
Re: editor crash
Posted: Wed Nov 25, 2015 2:38 pm
by AndakRainor
Ok this weird bug with no trace does not trigger anymore, but it is only luck this time and I don't know if it won't come back later as i did not find what it was exactly.
I just decided to begin to cut some memory usage of my mod and started with removing some of the grimrock 1 ported monsters, as I tried all of those. The first I removed was the skeleton with shield and spear, because it is so noisy I could not stand it anymore while testing ! I was surprised to see the bug no longer triggered randomly after removing them.
That said, I would really appreciate if I could get the same version of grimrock2.exe as others on this forum and not be punished for having bought it through steam. I was planning on using some of the tools shared here by Minmay, and it requires activated traces... Also I could need it to track others things eventually requiring bigger logs than a few lines.
If the Almost Human devs see this, could you please let me get the same tools as non steam users to continue modding ? Or could someone just send me a copy of the grimrock2.exe file since I already payed for it ???
Re: editor crash
Posted: Wed Nov 25, 2015 10:22 pm
by Isaac
Honestly the easiest way to this is to watch GoG, they have been putting the whole LoG series on a ridiculous sale price off & on all month.
The original release from Almost Human [direct] included a free Steam Key; so for future purchases, it's good to check out the available vendor's offering before deciding which vendor to buy from.
I was in the same situation ~reversed, with Grimrock; I purchased it from GoG (as I tend to do), before there was an editor tool... and so was left out when the tool was beta tested on Steam. I bought the AH direct version to get the Steam key to get early access to the beta editor; even though I knew that the GoG version would have received it eventually.
Re: editor crash
Posted: Mon Nov 30, 2015 3:13 pm
by AndakRainor
Thank you Isaac for your advice. I think at some point I will need those logs...
By copying and deleting parts of my mod as you suggested I finally found the true culprit for this random crash with no trace. It was not the grimrock 1 skeleton after all, I just thought it was because the problem did not trigger for a while after I removed it (for memory purposes).
It comes from a modified poison cloud I use to make a poisoned zone (if the crash tests are to be believed). It is handled by a couple objects and should be rebuild differently I think, currently it uses an object on each poisoned tile with a timer who spawns a poison cloud, with an interval corresponding to the cloud duration. It is spawned this way because it can be cleaned by the party so it must restart sometime after the party is gone. Maybe I should try to disable/enable components instead of destroying/spawning objects...