A purchased plugin from the marketplace crashes UE5 when calling some functions

Hi all. I just recently bought the plugin a couple of days ago and everything worked great.
Authentication, queries to the Firestore database, and cloud storage worked until today.

But at one point, when testing Firestore requests and launching a game in the project, UE5 simply crashed and closed. Now queries and listening don’t work.

The plugin worked well for two days and stopped working today. UE5 simply crashes when the game starts if the Request or listen should be done in “EventBeginPlay”, or “EventConstruct”. And if you put the Firestore request launch on the button, then the game will start and when you press the button, both the game and UE5 will launch.

Authentication still works fine, for some reason only queries and database listening stopped working.

In the VS Code log I saw such an error just before the fall of UE5, and only when calling any functions from your plugin, except authentication

[2023-12-12T02:22:52.754Z]LogJson: Warning: Field firebase_url was not found.

[2023-12-12T02:22:52.754Z]LogJson: Error: Json Value of type 'Null' used as a 'String'.

An exception was thrown at 0x00007FFBB5AEC2CD (UnrealEditor-FBP.dll) in UnrealEditor.exe: 0xC000001D: Illegal Instruction.

Unhandled exception at 0x00007FFBB5AEC2CD (UnrealEditor-FBP.dll) in UnrealEditor.exe: 0xC000001D: Illegal Instruction.

I checked Cloud Storage - Download File, it also works fine, the files are downloaded.

Adding or editing documents also does not work.

Problems only with Firestore DataBase, with recording, listening, adding, editing.

The project was rebuilt, new empty projects were created, and the UE files were checked.
Everything is fine with the database, it has been working fine for a year now, but in other applications.

The error remains, I ask you for help, I no longer know what the problem could be.
The most interesting thing is that the plugin worked at first, I made about 10-15 test queries and database listens.

Hey there @Diligenste! Preface: I haven’t used the plugin, so this is just working with the info we have here. So it looks like it’s trying to find the firebase_url and failing, which likely directly leads to null values being pulled and causing the hard crash. Could you take a look at where the URL is entered for the plugin and verify it’s not being wiped or rewritten? I’ve seen a similar issue with a DB plugin that the user had set the API request URL in 2 places and wiping their original one one frame after the last.

Unfortunately, the plugin does not take the Url anywhere and does not output it anywhere.
It looks like the Url is somewhere inside the plugin library.
We can all set the path to the collection by entering the name, as in the screenshot, but this does not affect anything.
The plugin also requires google-services.json, it loads and works perfectly, as evidenced by working authentication and uploading and writing to cloud storage.
There is no firebase_url field in the json itself and the file does not change while the functions are running.
The most interesting thing is that access to the database was possible after installing the plugin, but after about two days something went wrong, and the ready-made and tested BP stopped working

There must be some sort of config file in the form of a json file inside of the plugin.
Inside of it there should be a field called firebase_url with the corresponding url address.

So it could be something like this

"config": {
"firebase_url":"https://myPluginFirebaseConfigPath" 
}

The structure tree may vary but the part that should be there a 100% is
"firebase_url":"https://myPluginFirebaseConfigPath" OFC the path should be to your real url.

Try adding the firebase_url to the google-services.json json config file.

Hello @3dRaven unfortunately in the plugin folder along the way
C:\Program Files\Epic Games\UE_5.2\Engine\Plugins\Marketplace\FBP
there is not one json))

The video shows the config process with the google services json step

Here is the web page version

The google services needs to go into your main project directory not the plugin dir.

I know it all works, all you need to do is download json and put it in a folder.

google-services.json has nothing to do with it. I was looking in the plugin folder for something separate built into the plugin. Maybe the plugin also accesses its json.

google-services.json works! Authentication, cloud storage is working. The BP database functions simply stopped working.
The Firestore database and Firebase itself have also been working great for over a year in other non-UE applications. I also wrote a development on Github, I’m just not sure that he will answer or at least answer in the near future

Oh that makes this a great deal harder to work with. In a fresh project targeting the same DB does it work again at the beginning?

Unfortunately no. I created two more empty projects and when I try to write, read or listen to the database, UE5 crashes.

Ahh unfortunate, that does seem to suggest something with the plugin itself failing. Was the attempt to contact the developer fruitless?

unfortunately does not respond not on the store page, not on Instagram, not on Github

I noticed they had somewhat recently (the 4th) responded to the questions on the store page, but none since then. I’d drop a line there, and in the mean time I’ll take a look at the support agreement.

I have already written on the store page, on GitHub, and on Instagram. The developer does not respond and the email is not valid, you cannot send a message to it.

I’ve been tired of solving the problem for several days now and my project is not moving because of this. In the next message I will copy what @3dRaven wrote in a private message, not much progress has been made.

But I have already requested a refund, that would be good.
I’d rather buy another plugin, with good documentation and support

So the error is not related to json. The Firebase_Url that it is looking for turns out to be associated with a real-time database that I do not use. I don’t know why not check this in code.
I created a realtime database and replaced google-services.json just in case.
Now there is no error related to Json.
But UE5 continues to crash with an error after running the Firestore database access function “An exception was thrown at 0x00007FFBB5AEC2CD (UnrealEditor-FBP.dll) in UnrealEditor.exe: 0xC000001D: Illegal Instruction.”

The error occurs in all functions accessing the database, writing, deleting, reading, listening.

For example:
Here is a piece of code that starts to be executed to access the database and request document ()

void UFBPFirestore::FBPGetDocument(const TArray<FString> DocumentPath, const FOnDocumentRetrieved& OnDocumentRetrieved, const FOnFailToRetrieveDocument& OnFailToRetrieveDocument)
{
	#if PLATFORM_WINDOWS || PLATFORM_ANDROID || PLATFORM_IOS || PLATFORM_MAC
	
	bool isDocumentPath = UFBPFirestoreUtilities::FBPIsDocumentReference(DocumentPath);
	if(!isDocumentPath)
	{
		OnFailToRetrieveDocument.ExecuteIfBound("Path is not pointing to a document.");
		return;
	}
	const firebase::firestore::Firestore *Firestore = UFBPFirestore::FBPGetFirestore();
	if(UFBPFileUtilities::HasGoogleFile)
	{
		firebase::firestore::DocumentReference FirebaseDocument = UFBPFirestoreUtilities::FBPGetDocumentReference(Firestore, DocumentPath);
		FirebaseDocument.Get().OnCompletion(
			[FirebaseDocument, OnDocumentRetrieved, OnFailToRetrieveDocument](const firebase::Future<firebase::firestore::DocumentSnapshot>& Result)
			{
				if(Result.error())
				{
					OnFailToRetrieveDocument.ExecuteIfBound(FString(Result.error_message()));
				}
				else
				{
					FDocumentSnapshot DocumentSnapshot = FDocumentSnapshot();
					const FString DocumentId = FString(FirebaseDocument.id().c_str());
					DocumentSnapshot.Id = DocumentId;
					DocumentSnapshot.Data = UFBPFirestoreUtilities::FBPGenerateDocumentMap(Result.result()->GetData());
					OnDocumentRetrieved.ExecuteIfBound(DocumentId, DocumentSnapshot);
				}
			});
	}
	#else
		GEngine->AddOnScreenDebugMessage(-1, 30.f, FColor::Red, TEXT("[FBP] Firestore is not available for the current OS you are using. See documentation for more info."));
	#endif
}

Unless we provide the document path through the standard UE “Make Array” function. then everything ends well and the program does not crash. code stop here

{
	OnFailToRetrieveDocument.ExecuteIfBound("Path is not pointing to a document.");
	return;
}

If a path is specified, a breakpoint in VS skips the async code and moves on (I’ve marked with comments where)

firebase::firestore::DocumentReference FirebaseDocument = UFBPFirestoreUtilities::FBPGetDocumentReference(Firestore, DocumentPath);
FirebaseDocument.Get().OnCompletion(

#breakpoint skip that 

	[FirebaseDocument, OnDocumentRetrieved, OnFailToRetrieveDocument](const firebase::Future<firebase::firestore::DocumentSnapshot>& Result)
	{
		if(Result.error())
		{
			OnFailToRetrieveDocument.ExecuteIfBound(FString(Result.error_message()));
		}
		else
		{
			FDocumentSnapshot DocumentSnapshot = FDocumentSnapshot();
			const FString DocumentId = FString(FirebaseDocument.id().c_str());
			DocumentSnapshot.Id = DocumentId;
			DocumentSnapshot.Data = UFBPFirestoreUtilities::FBPGenerateDocumentMap(Result.result()->GetData());
			OnDocumentRetrieved.ExecuteIfBound(DocumentId, DocumentSnapshot);
		}
	});

In VS in local, we see this


Next, there is a transition to another file and only the line from the code I marked is executed

DEFINE_FUNCTION(UFBPFirestore::execFBPGetDocument) is executed
{
P_GET_TARRAY(FString,Z_Param_DocumentPath);
P_GET_PROPERTY_REF(FDelegateProperty,Z_Param_Out_OnDocumentRetrieved);
P_GET_PROPERTY_REF(FDelegateProperty,Z_Param_Out_OnFailToRetrieveDocument);
P_FINISH;
P_NATIVE_BEGIN;
#Run that line
UFBPFirestore::FBPGetDocument(Z_Param_DocumentPath,FOnDocumentRetrieved(Z_Param_Out_OnDocumentRetrieved),FOnFailToRetrieveDocument(Z_Param_Out_OnFailToRetrieveDocument));
#
P_NATIVE_END;
}

Next, we move for a long time through the ScriptCore.cpp file up and down.
Then an error occurs

An exception was thrown at 0x00007FFBB5AEC2CD (UnrealEditor-FBP.dll) in UnrealEditor.exe: 0xC000001D: Illegal Instruction.

Unhandled exception at 0x00007FFBB5AEC2CD (UnrealEditor-FBP.dll) in UnrealEditor.exe: 0xC000001D: Illegal Instruction.

Error after executing the code from the ScriptCore.cpp file right after the line I marked

if (!bUsePersistentFrame)
{
	// Destroy local variables except function parameters.!! see also UObject::CallFunctionByNameWithArguments
	// also copy back constructed value parms here so the correct copy is destroyed when the event function returns

#UE5 crashes immediately after executing this line for (FProperty*

	for (FProperty* P = Function->DestructorLink; P; P = P->DestructorLinkNext)
	{
		if (!P->IsInContainer(Function->ParmsSize))
		{
			P->DestroyValue_InContainer(NewStack.Locals);
		}
		else if (!(P->PropertyFlags & CPF_OutParm))
		{
			FMemory::Memcpy(P->ContainerPtrToValuePtr<uint8>(Parms), P->ContainerPtrToValuePtr<uint8>(NewStack.Locals), P->ArrayDim * P->ElementSize);
		}
	}
}

Next I was asked to use fix the illegal instructions error

sfc /scannow

and check the ssd disk.

but nothing seems to help

The issue is closed, I got my money back for the plugin. Thank you all for your help!

@SupportiveEntity Should I mark this post as resolved?

1 Like

Great! I think we can go ahead and mark this as a resolution, but I’ll manually leave the thread open for replies just in case your information helps another user of that plugin and they can piece together a fix.