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

Plugin crashes #8

Open
metamorphium opened this issue Apr 11, 2021 · 2 comments
Open

Plugin crashes #8

metamorphium opened this issue Apr 11, 2021 · 2 comments

Comments

@metamorphium
Copy link

Hi David,
thanks a lot for this plugin. I am encountering infrequent desktop crashes originating in the plugin.
The crashes are in UStory::ChoosePathString while invoking MonoInvoke:

inline void MonoInvoke<void>(FString MethodName, void** params)
{
	FInkModule& Ink = FModuleManager::GetModuleChecked<FInkModule>("Ink");

	MonoObject* Exception;
	mono_runtime_invoke(Methods[MethodName], Instance, params, &Exception);
	Ink.MaybeThrowMonoException(Exception);
}

I was trying to track down the crash and eventually, it leads me to think that it might be UE4 Garbage Collector, collecting
probably(?) TMap, which is not marked as UPROPERTY() This would explain to me the randomness in which the class crashes.

I was going through the Minidump, but couldn't pinpoint the issue better than this.

Any idea, if Methods could be marked for non-deletion or UPROPERTized?

I thought of wrapping MonoMethod into USTRUCT so it could be markable, but I am not sure if this would be the right way.

Thanks,
Jan

@Peppercat3120
Copy link

Hello! Did you find a solution for this?

@KadynCBR
Copy link

I also suffered from the same symptoms of seemingly-random crashes. This did seem to come from the TMap being cleared, but it looks like the UCLASS that held the TMap was being garbage collected.

I had something like

UCLASS()
class UStoryDriver {
...
UStory* story;
...
};

After placing a UPROPERTY() above the UStory member variable, I stopped having issues.

So for the wandering travelers also experiencing this, I'd say check this first.

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