Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engine crashes with multiple Story objects in memory! #18

Open
dimanjy opened this issue Oct 14, 2021 · 3 comments
Open

Engine crashes with multiple Story objects in memory! #18

dimanjy opened this issue Oct 14, 2021 · 3 comments

Comments

@dimanjy
Copy link

dimanjy commented Oct 14, 2021

I'm using an Array of Story objects. One Story for each NPC in my game. Each Story initialization takes place only when I'm starting my conversation with next NPC. But when I'm returning to the previous NPC (switching the pointer of the Story Array to the previous array index) - the Engine crashes with Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000000

mono_2_0_sgen
UE4Editor_Ink!UMonoBaseClass::MonoInvoke<bool>() [d:\unreal\exampleprojects\blank\plugins\unrealink\source\ink\private\monobaseclass.h:47]
UE4Editor_Ink!UStory::CanContinue() [d:\unreal\exampleprojects\blank\plugins\unrealink\source\ink\private\story.cpp:121]
UE4Editor_Ink!UStory::execCanContinue() [d:\unreal\exampleprojects\blank\plugins\unrealink\intermediate\build\win64\ue4editor\inc\ink\story.gen.cpp:281]
UE4Editor_CoreUObject
UE4Editor_CoreUObject
...

Is there any way to manage more than one Story object at the same time?

@warrencouvillion
Copy link

I'm also seeing this problem. I was hoping for each NPC to have its own story describing its interaction with the player. When there are multiple NPCs with Story objects in a map, the Unreal editor crashes.
For me, it was throwing an exception from MonoInvoke when I was trying to add an observer callback.

@mrcsbmr
Copy link

mrcsbmr commented Mar 11, 2022

How long are your Ink stories? Are you using multiple StoryAssets or one large StoryAssets? We found out that loading long stories multiple times leads to crashes, maybe exceeding the stack size in Mono. Using multiple, smaller StoryAssets might be a solution.

@warrencouvillion
Copy link

How long are your Ink stories?
Not too long. The longest .ink file is only 200 lines long, with a lot of comments and blank lines.

Are you using multiple StoryAssets or one large StoryAssets?
Multiple StoryAssets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants