With a new crop of testers having come on over the past few days, I’ve received a new set of crash reports. I want to quickly mention all the ones which have been reported at least twice, along with their status:
1. A crash if you close the NPC info window or change tabs on it while setting a new target for a quest
Status: Fixed in the next build. (0.14.29)
This one was pretty commonly reported, but only happened if you used the mouse to close the window or switch tabs; if you used
[escape]to close the window, everything worked properly.
When the quest editing interface went away, we weren’t telling the cursor to stop trying to set a new quest target. This crash was the quest editing subsystem wildly waving its arms in the air to get my attention, alerting me that the cursor was still trying to set a new quest target, when there wasn’t a quest selected to set the target for.
We now correctly disable that cursor mode, when the quest editing interface goes away.
2. A crash while recalculating the “convenience” rating for certain paths.
Status: Believed to be fixed in the next build. (0.14.29)
This was the most common crash report in build 0.14.28. I’ve been unable to actually get it to happen for me, but I think I’ve figured it out what must have been happening.
In the game, we pre-calculate the “length” between each waypoint on a path. As paths must always have at least two waypoints (and there isn’t really a “length” between fewer than two points), we don’t bother to do this calculation for any paths with fewer than two waypoints. There shouldn’t be any paths with fewer than two waypoints anyway; the path creation tool refuses to make them, and even if there was a bug in that, the path itself will throw an assertion if it gets created with fewer than two waypoints. However, if a path did somehow come into existance with just one waypoint, it would cause a crash which looks exactly like this one, as the game tried to check the “length” of the path and discovered that there was no precalculated length data. So… I started with the assumption that that must be what had happened somehow.
While investigating, I found a way that it could have happened. A path couldn’t be created with fewer than two waypoints, but a user might have been able to accidentally convert it from multiple-waypoints into a single-waypoint path, due to a subtle bug in the code which splits a path into two, when joining a new path onto an old one, if they try to connect the new path to the very start or end of an existing path, but not actually on the intersection itself.
I haven’t managed to actually do this; the path creation tool is pretty enthusiastic about snapping path start/end points onto intersections if any are nearby, but this seems like the most likely explanation for the crash report. And so I have fixed that theoretical problem in the ‘Split Path’ functionality which could have converted an existing path into a one-waypoint path, and I have also fixed things such that we shouldn’t crash any more even if we do somehow wind up with a 1-waypoint path. So I believe this crash should be fixed now, in two different ways.
3. Two different crashes while saving: One during the initial “gather the data that we’re going to save” phase, and one during the actual saving of that gathered data.
Status: Fixed in next build (0.14.29)
This took a lot of time (and some special debugging tools!) to track down, but I believe I’ve found it; when players gain a level and out-level some of their quests, they destroy those out-levelled quests. (No point doing them any more, right? They aren’t worth as much any more!) However, they also separately were keeping track of what quest they’d most recently been working on, and that pointer to the “most recent quest” wasn’t being cleared when the out-levelled quest it was pointing to had been destroyed.
When a save occurred, and that player was trying to save out information about the quest they’d most recently worked on (which no longer actually existed), they were accessing random, garbage data. This led to all sorts of bad stuff happening; sometimes (but not always) producing a crash.
I’ve simply removed that variable; nothing was actually using it for anything; it was just a remnant of the old MMORPG Tycoon 1.1 days, when each player could only hold on to one quest at a time.
4. Crash if two saves are going at once.
Status: Fixed in next build (0.14.29)
There was a multi-threading problem if you started a new save while an earlier save was still being written to disk. This is actually pretty tricky to do, since saves tend to complete pretty quickly… but the easiest way to do it is to take a really big game, do one manual save, and then immediately exit back to the main menu (thus triggering a second save). Do it fast enough and you wind up with two different save processes happening at the same time, and subtly tromping over each other. This is now fixed, so both saves complete successfully.
(Nobody actually reported this one, but it’s something that I always suspected would show some bad behaviour if you managed to do it. Found a way to do it, and then fixed the problems with doing it.)
There were a couple other save-related crash bugs reported, but none were reported more than once and their logs didn’t make much sense, so my assumption right now is that they’re weird side-effects of reading invalid memory while saving caused by bug #3, above. But I’ll be keeping my eyes open to see if they get reported again in v0.14.29 or later.
There were a few other crash bugs reported too, once each:
a. After assigning points while gaining a minor version number.
b. While a region was trying to decide its maximum population capacity (checking for extra servers connected to the game network)
c. While finishing a network cable. (specifically, while creating the geometry which turns into the blue overlay on the map showing what area that cable would feed bandwidth to)
I haven’t been able to reproduce any of these last three issues, or even guess how they’d occur, but I’ve added some extra debugging information around them to the log, in case anybody gets them again.
Big thanks to all the new testers who’ve been sending trouble reports! Now I’m going to get back to game features.