There are no references shown in UE by the deleteded Spline Actor. Even removing just some spline points causes the Shipped Build on Android to crash. On Windows, that crash does not happen.
logcat reports Null Pointer Dereference. The Packaging completes successful though.
A null pointer is a null pointer.
It means that something stored in memory went null and is trying to be accessed.
Likely, the spline you deleted, but not that necessarily.
This could be due to a default variable or something similar being left with the stored value of the spline you deleted.
Usually it’s just bad coding.
If you validate variables before you use them you’ll seldom run into similar issues…
I am used to check references before deletion (manually). If during deletion of the actor, UE finds a dependencies, it will ask whether to “force delete” or “replace the references”, and I made sure that there are no references before deletion! Second, I have narrowed down the issue to if the Actor has nothing in Construction Script and Event Graph, and has no Variables, and nothing is referencing to that Actor: After deleting just a single Spline Point, the packaging creates Build with Null Pointer Dereference. This issue does not occur in a Non-World-Partition. On Windows, neither the Game Crashes nor the Log reports anything regarding this Actor (at least no issues).
What I have done so far in order to make sure that nothing is referencing it:
- Searched in all blueprints whether this Actor is referenced (with Reference Viewer and additional searching for its Class Name)
- Searched in the Log, if during packaging there is just a mention of that Actor
- Made sure that no Warnings during Packaging are related to any Actor (especially that one Actor for which there is no definition, would be strange if there would pop up anything in this regard)
- Tested having that Actor still there “as is” and tested with removing a bunch of the Spline Points
(“as is” works on both platforms, Removing a few Spline Points works on Windows, on Android we get the Crash) - Tested creating that Actor and Deleting it in a Non-World-Partition works, in a World-Partition references are somehow kept for Android, but not for Windows?
The biggest issue I am facing is, that the dereference mentions libc.so and some other but nothing about the World or its Actors.
It has to be noted that the Spline Actor was a big Actor, covering multiple Cells in the World Partition, and when deleting it only one specific Directory in ExternalActors got modified/deleted. Dunno whether that is expected behaviour.
After you remove the actor and before you package, are you clicking the rebuild button ?
Also, with world comp it is a bit more complex. You may literally need to use the revuild button on all the maps.
If it keeps on happening the best thing you can do is to make copies of the levels in a different folder and move it out of the /content for safe keeping.
After that, make a clean folder with a clean persistent and re-import your tiles with the proper tile paint (which i suppose you may need to export first).
Then you can manually move a level at a time and transfer actors without transferinf the spline.
It’ll take a good 8hours to do it on a world comp of 20x20 tiles. But it’s pretty much guaranteed to get rid of any reference.
Ps: world comp and android don’t really go well together.
Generally speaking there shouldn’t be any need for it either. World origin shifting on mobile is kind of a bad idea.
Not impossible or anything , but taxing on the mobile environment.
Pps: other possible thing to check the presence of the spline for would be any array or similar for terrain deformation or virtual texturing.
I don’t think you can rely one bit on the unreal reference find tools but I have also never witnessed them blatantly lie.
Maybe searching from visual studio would be a better option…
I am sorry but I will definitely not redo the map just because the Engine is unable to detect the reference on its own. I rather keep the spline and name it to “Engine Related Bug” and make use of it somehow until there is a working solution from Epic.
If World Partition and Android does not go well together, it would mean either there will be a patch for this issue, or we will have the incompability on Android (which i dont think is an option for Epic as well). if world Partition wouldnt be supported for Android, then they lose the crossplatform compabitility (meaning on some platforms it ll work on some it is not available). I think we can expect as Developers the same behaviour between Windows and Android in this specific Issue. If there are no Null Pointer Dereference mentioned on Windows , we should expect same for Android (as Developers) as the Code for Android is generated, we are not written that “for Android” specifically. Thats the general idea of Cross-Platform-Distribution. And if sth isnt supported or not expected to be working on the other platform, Engine should give a Warning or even an Error, as it does e.g. for Materials, Lighting, etc.
There’ll never be a patch for anything.
First of all epic doesn’t give a ■■■■ (about anything except lining their pockets and faking interest with mega grants).
Second of all, they have been claiming that world composition is to be discontinued for over a year, so even in the remove eventuality that someone at epic may care, the eggheads above will tell them not to do anything.
As far as the issue.
It’s probably related to your custom project and not to something the engine is doing.
There’s a billion ways that a reference could be stuck and cause a null.
Try a clean build on Android. Delete everything related to the project (usually just a dmg unistall) and re-attempt to publish.
The reason that world comp and any mobile don’t go well together is the amount of memory needed for map load - not the fact they cannot.
You are device bound to smaller tile sizes to get things to work. And your LODs have to be even more aggressive than usual to allow for decent performance.
In 99.9% of cases you are also better off not using landscapes at all - on mobile or on anything else (bake levels from world comp, delete the landscape levels. Re-create using only the impostor meshes).