davewx7 / citadel

A turn based strategy game based on the Anura engine
Other
99 stars 25 forks source link

Anura crashing at start "custom_object_type.cpp:938 ASSERTION FAILED" #267

Open GSchuemann opened 3 years ago

GSchuemann commented 3 years ago

Hi,

I don't know if this is still actively maintained, the servers are now down for quite a while X.X.

Anyway when I build on the newest Anura Engine, the game instantly crashes at start with:

CRITICAL: custom_object_type.cpp:938 ASSERTION FAILED: Could not find file for object 'storyline_base'

CRITICAL: 
---
CRITICAL: stack trace:
CRITICAL:   ./anura : ()+0xbc8dc0
CRITICAL:   ./anura : ()+0xbcd1b4
CRITICAL:   ./anura : ()+0xbc4900
CRITICAL:   ./anura : ()+0xbc8a54
CRITICAL:   ./anura : ()+0xbcd1b4
CRITICAL:   ./anura : ()+0xbc4900
CRITICAL:   ./anura : ()+0xbc8a54
CRITICAL:   ./anura : ()+0xbcd1b4
CRITICAL:   ./anura : ()+0x75d503
CRITICAL:   ./anura : main()+0x64c4
CRITICAL:   /lib/x86_64-linux-gnu/libc.so.6 : __libc_start_main()+0xe7
CRITICAL:   ./anura : ()+0x18d65a
CRITICAL: ---

So since I had the game succesfully running on 2bbb5cb and the only change to Anura/src/custom_object_type.cpp after that is 464b3ea, I guess that is the commit at fault. Note: I also use the patch by Spixi for the server log save location: https://github.com/spixi/anura-overlay/blob/master/games-engines/anura/files/anura-9999-server-log-locations.patch (I never followed if it was merged or not, but it's probably not related anyway)

galegosimpatico commented 3 years ago

Can confirm!

I bisected that with the help of my macOS host, with the following results:

Looks consistent with what you wrote.

galegosimpatico commented 3 years ago

Interestingly, reverting https://github.com/anura-engine/anura/commit/464b3ea1f30 seems to make Argentum Age boot normally.

However that change must be there for a reason because Frogatto, so we shouldn't just reverse the change but find a way to accomodate the two games in one common code.

Or declare Argentum Age as not top edge Anura trunk anymore, which is consistent with the recent opening of branch argentum-age.

DDR0 commented 3 years ago

It's caused by ~anura/src/custom_object_type.cpp:1717's CustomObjectType::get(*obj_type_str), which is being fed a prototype - I guess you can have sub-objects in the prototype which aren't prototypical or something.

DDR0 commented 3 years ago

The assert was added because we wanted to do a sanity check on whether objects being marked non-serializable were being serialized because they were stored as a property of a serializable object.

DDR0 commented 3 years ago

Unfortunately, I can't catch an error here - it may just ABORT() without throwing an error, so that's off the table. :thinking: I can't find a function to test if a string refers to an object, or to a prototype, either of which would be fine. I'm sure there is one somewhere. (@davewx7, would you be able to help here?)

galegosimpatico commented 2 years ago

I don't know if this is still actively maintained, the servers are now down for quite a while X.X.

@GSchuemann https://github.com/davewx7/citadel/issues/269