Frictional Games Forum (read-only)
Interesting BlackBox crash... - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Interesting BlackBox crash... (/thread-53430.html)

Pages: 1 2


Interesting BlackBox crash... - Robby - 12-28-2016

So, I'm experiencing an interesting problem with my custom story. Now, the custom story in itself is OK, works fine, but the issue I'm getting is baffling to me.

So, for some reason, when I'm playing through the custom story in a straight run, it's mostly fine, except sometimes, when changing between levels, I get a BlackBox crash that tells me nothing useful. If I look in the hpl.log afterwards, it mentions details of the map loading, either making or loading it's cache, but then it cuts off at "loading complete". That's it.

Reloading from the closest save available is ok, and the crash doesn't seem to happen again after that.

Now for some inside details.
  • The maps average between 1 to 2MB. One of them reaches 3MB.
  • Reinstalled Amnesia, cleaned out my profile data, tried a new profile, with and without debug menu. No change.
  • The problem occurs randomly right as the first frame is rendered of the loading screen after it's done loading. Never anyhow else.

Any potential ideas? Much appreciated in return Smile
P.S Currently on my phone. I may not respond quickly.


RE: Interesting BlackBox crash... - Romulator - 12-28-2016

Posting the log would be a good idea nonetheless (when you get the chance, as you said, you're on your phone, which is alright!) as if there was something happening in the previous level, it may cause some issues on the load.

One error I can think of off the top of my head is if you have multiple timers which are potentially exceeding 65535 steps?


RE: Interesting BlackBox crash... - DanielRand47 - 12-28-2016

(12-28-2016, 05:14 AM)Robby Wrote: So, I'm experiencing an interesting problem with my custom story. Now, the custom story in itself is OK, works fine, but the issue I'm getting is baffling to me.

So, for some reason, when I'm playing through the custom story in a straight run, it's mostly fine, except sometimes, when changing between levels, I get a BlackBox crash that tells me nothing useful. If I look in the hpl.log afterwards, it mentions details of the map loading, either making or loading it's cache, but then it cuts off at "loading complete". That's it.

Reloading from the closest save available is ok, and the crash doesn't seem to happen again after that.

Now for some inside details.
  • The maps average between 1 to 2MB. One of them reaches 3MB.
  • Reinstalled Amnesia, cleaned out my profile data, tried a new profile, with and without debug menu. No change.
  • The problem occurs randomly right as the first frame is rendered of the loading screen after it's done loading. Never anyhow else.

Any potential ideas? Much appreciated in return Smile
P.S Currently on my phone. I may not respond quickly.

Can you provide the information inside the hpl.log file so we can see what the issue is? I or someone else might know what it is. I will say that the map size shouldn't cause a crash, unless you have a bunch of particles in your map which can take up processing power and cause it to crash.


RE: Interesting BlackBox crash... - Robby - 12-28-2016

Exceeding 65535 steps? You mean triggering more than that many times?

I'll be playing through the custom story later today again, if I get the problem again, I'll attach the log.


RE: Interesting BlackBox crash... - Romulator - 12-28-2016

(12-28-2016, 05:41 AM)Robby Wrote: Exceeding 65535 steps? You mean triggering more than that many times?

Yes so; in the possibility of say:

Timer 1 loops 65535 times, = crash on next map load.
or
Timer 1 loops 40000 times
Timer 2 loops 10000 times
<Map Change>
Timer 3 loops 18000 times = crash on next map load.

I only ask because it has been an issue in the past


RE: Interesting BlackBox crash... - Robby - 12-28-2016

I have a good handful of timers. That could be the problem, now that I think about it. I'll see if I can make some changes to those when I can.

So after reading through the thread, I now realize that the timers would be the cause. I use a good amount of them, would eventually breach the 65535 steps. OK, looks like I know what to change then. Too bad the second level completely relies on timers...


RE: Interesting BlackBox crash... - Mudbill - 12-28-2016

I've added some info to this wiki page about performance because it previously mentioned timer loops being a possible issue.

https://wiki.frictionalgames.com/hpl2/amnesia/performance#avoid_fast-looping_timers

Perhaps there are alternatives to your second level? Can you perhaps restrict when the timers run so they aren't looping constantly?

MrBehemoth had to deal with this issue when he made The Second Dimension, and he managed to develop a work-around by modifying the Amnesia.exe file. Not sure how he did that, and that is absolutely not an applicable solution here, but I figured I'd mention it.


RE: Interesting BlackBox crash... - Robby - 12-28-2016

I don't want to spoil, but the second level is a reference to FNAF. That level completely relies on timers, reducing them is possible, but the other levels also use enough timers that it apparently goes beyond 65535 steps. But I can't remove the timers without redoing the maps involved in the story, and with my German language courses starting soon, I just won't have the time to do that.

I will try to fix this, but it might not be completely possible. At least the custom story will have a warning message now xD


RE: Interesting BlackBox crash... - Robby - 12-28-2016

I thought I posted, but it either got deleted or it didn't get posted. But anyway.

I changed as many timers as I could, which seems to have delayed my problem. I ended up doing a "long" run of about 1h05m, start to finish, no devtools and all, and the BlackBox issue didn't seem to occur, but it used to before I made any changes. That's not to say it might not occur at all, because I know it will if I would've played for long enough. How much that is, however, is unknown to me. So yeah, that 65535 steps thing seems to have been the problem.

I guess that's another lesson for me then. Thx everyone for the responses/help! Smile


RE: Interesting BlackBox crash... - Mudbill - 12-29-2016

Another thing about the indexing is that it is only relevant during a single session of the game running. Once you restart it, the index is reset as well, so it's only an issue if it exceeds 65k in one sitting.