Crashing in certain area

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Donfrow
Posts: 308
Joined: Thu May 14, 2020 1:34 pm

Crashing in certain area

Post by Donfrow »

After reviewing some of the issues with my mod I seem to have some across one that didn't happen back when I first made it, or if it did at least not with the frequency I'm seeing now. It seems that Exult itself is always crashing right at my end game area.

While I've fixed some various issues with my usecode that was causing some issues I'm at a loss for this one and the crash. I don't think it's directly related to my usecode as just being in the area causes the crash, but it's quite possible it's something I've done to that area that's triggering it.

A couple things I've noticed in stderr.txt.

1. The crashing is occurring in map2. As soon as you teleport to this map, this is written to the file: "Ifix file '/map02/u7ifix4d' not found.". This file does seem to be missing from the folder for some reason.

2. A bunch of the following starts getting written as soon as you enter the area, and just before it crashes: "Shape::store_frame: framenum >= frames_size (16 >= 3)"

Not sure what could be causing this, but given what I suspect it's some sort of shape and frame that's having the issue? Could it somehow be related to u7ifix4d? This missing file/error message does not seem to have any impact on playing as everything continues to work fine, other than the crash at a certain area. It's in the area around 360, 249 (on map2).

Is there anything I can do to try and figure out what's causing this crash, and indeed if it's a shape or object I have in the general area?

Thanks
Donfrow
Posts: 308
Joined: Thu May 14, 2020 1:34 pm

Re: Crashing in certain area

Post by Donfrow »

And in typical fashion, I think I figured out what was causing my issue.

I had a few NPC's in the area that were a shape without all the movement frames. I think as they moved it was trying to go to a frame that didn't exist, and was causing the crash. This would also explain why sometimes it would crash sooner or later than others.
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Crashing in certain area

Post by Knight Captain »

Exult can at times poorly handle NPCs from loaded save games where the usecode file has changed.
Donfrow
Posts: 308
Joined: Thu May 14, 2020 1:34 pm

Re: Crashing in certain area

Post by Donfrow »

I think this one was completely on me. I was trying to make some "moving" stars with NPC's and it didn't have enough frames. I never noticed it because it was one of the last things I did, but when they started to wander around it looks like they were trying to use frames that didn't exist for the shape, and then causing the crash.

Lesson learned about moving NPC's at least. Always have enough frames!
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Crashing in certain area

Post by Knight Captain »

What frame numbers were missing?
Donfrow
Posts: 308
Joined: Thu May 14, 2020 1:34 pm

Re: Crashing in certain area

Post by Donfrow »

The object I had set the NPC to had only 3 frames (custom shape). What I think was happening is as soon changed it to a regular NPC shape that had the frames a wandering NPC uses the crashing stopped. Which, guessing from the error I was getting is 16 frames.
Locked