- Home /
unity crash Why can't I see the engine code? WHY??
2022-03-19 06:45:30.763 6222-6289/com. E/CRASH: #00 pc 005a25c5 /data/app/com.-1/lib/arm/libunity.so (__wrap_abort) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.763 6222-6289/com. E/CRASH: #01 pc 00dbac45 /data/app/com.-1/lib/arm/libunity.so (DiagnosticsUtils_Bindings::ForceCrash(DiagnosticsUtils_Bindings::ForcedCrashCategory, ScriptingExceptionPtr*)+156) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.763 6222-6289/com. E/CRASH: #02 pc 0055441d /data/app/com.-1/lib/arm/libunity.so (Remapper::IncreaseHighestInstanceIDAndCrashInCaseOfOverflow(int)+92) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.763 6222-6289/com. E/CRASH: #03 pc 00554715 /data/app/com.-1/lib/arm/libunity.so (Remapper::GetOrGenerateInstanceID(SerializedObjectIdentifier const&)+82) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.764 6222-6289/com. E/CRASH: #04 pc 0054430f /data/app/com.-1/lib/arm/libunity.so (PersistentManager::LocalSerializedObjectIdentifierToInstanceID(int, LocalSerializedObjectIdentifier const&, int&, PersistentManager::LockFlags)+134) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.764 6222-6289/com. E/CRASH: #05 pc 00544281 /data/app/com.-1/lib/arm/libunity.so (PersistentManager::LocalSerializedObjectIdentifierToInstanceID(LocalSerializedObjectIdentifier const&, int&, PersistentManager::LockFlags)+16) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.764 6222-6289/com. E/CRASH: #06 pc 000ffaf3 /data/app/com.-1/lib/arm/libunity.so (void TransferPPtr<StreamedBinaryRead>(int&, StreamedBinaryRead&)+156) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.764 6222-6289/com. E/CRASH: #07 pc 001874cb /data/app/com.-1/lib/arm/libunity.so (void StreamedBinaryRead::TransferSTLStyleArray<dynamic_array<PPtr<Object>, 0u> >(dynamic_array<PPtr<Object>, 0u>&, TransferMetaFlags)+58) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.764 6222-6289/com. E/CRASH: #08 pc 00187329 /data/app/com.-1/lib/arm/libunity.so (void AssetBundle::Transfer<StreamedBinaryRead>(StreamedBinaryRead&)+52) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.764 6222-6289/com. E/CRASH: #09 pc 0017ff39 /data/app/com.-1/lib/arm/libunity.so (AssetBundle::VirtualRedirectTransfer(StreamedBinaryRead&)+24) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.764 6222-6289/com. E/CRASH: #10 pc 00550a5b /data/app/com.-1/lib/arm/libunity.so (SerializedFile::ReadObject(long long, ObjectCreationMode, bool, TypeTree const**, bool*, Object&)+482) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.765 6222-6289/com. E/CRASH: #11 pc 005455ab /data/app/com.-1/lib/arm/libunity.so (PersistentManager::ReadAndActivateObjectThreaded(int, SerializedObjectIdentifier const&, SerializedFile*, bool, bool, PersistentManager::LockFlags)+202) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.765 6222-6289/com. E/CRASH: #12 pc 00544ec9 /data/app/com.-1/lib/arm/libunity.so (PersistentManager::ReadObjectThreaded(int, PersistentManager::LockFlags)+180) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.765 6222-6289/com. E/CRASH: #13 pc 001894b3 /data/app/com.-1/lib/arm/libunity.so (AssetBundleLoadFromAsyncOperation::Perform()+886) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.765 6222-6289/com. E/CRASH: #14 pc 00189b49 /data/app/com.-1/lib/arm/libunity.so (AssetBundleLoadFromAsyncOperation::IntegrateImmediately()+16) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.765 6222-6289/com. E/CRASH: #15 pc 00c87535 /data/app/com.-1/lib/arm/libunity.so (DownloadHandlerAssetBundle::GetAssetBundle()+44) (BuildId: 9fd26b2d7fdc0fe6fae2c60f5455f09ca72a3d25)
2022-03-19 06:45:30.765 6222-6289/com. E/CRASH: #16 pc 001ebc55 /data/app/com.-1/lib/arm/libunity.so (DownloadHandlerAssetBundle_Get_Custom_PropAssetBundle(ScriptingBackendNativeObjectPtrOpaque*)+60) (BuildId: 9fd26
unity 2019.4.31f Repeatedly load,unload a scene using addressable crashes.
If you look at the backtrace, it is all engine code. It's C++, not C# I know that Unity doesn't publish the C++ engine code. What should I do in this situation? Shouldn't the scene be called?
Answer by Bunny83 · Mar 19 at 10:49 AM
How many objects does the scene contain? The engine shuts down because of
IncreaseHighestInstanceIDAndCrashInCaseOfOverflow
So Unity tries to allocate a new instance id for an object, but the id overflows. That could only happen when the ids exceed 2 billion (signed integer max value). So how on earth did you manage to create (and destroy) that many objects?
Just focus on the actual method names in the stacktrace. The stacktrace bubbles out. So the initial method is at the bottom and the one which caused the exception / crash is at the top.
DiagnosticsUtils_Bindings::ForceCrash
Remapper::IncreaseHighestInstanceIDAndCrashInCaseOfOverflow
Remapper::GetOrGenerateInstanceID
PersistentManager::LocalSerializedObjectIdentifierToInstanceID
PersistentManager::LocalSerializedObjectIdentifierToInstanceID
void TransferPPtr<StreamedBinaryRead>
void StreamedBinaryRead::TransferSTLStyleArray<dynamic_array<PPtr<Object>, 0u> >
void AssetBundle::Transfer<StreamedBinaryRead>
AssetBundle::VirtualRedirectTransfer
SerializedFile::ReadObject
PersistentManager::ReadAndActivateObjectThreaded
PersistentManager::ReadObjectThreaded
AssetBundleLoadFromAsyncOperation::Perform
AssetBundleLoadFromAsyncOperation::IntegrateImmediately
DownloadHandlerAssetBundle::GetAssetBundle
DownloadHandlerAssetBundle_Get_Custom_PropAssetBundle
As you can see the engine is forcing a crash. Why? see the next method up the hierarch (so look at the next line). Here it tries to allocate a new instance ID (by simply increasing the highest by 1) and if that operation overflows it crashes. Since we know your game crashed, that's what happened. When you go down the list you would know why an instance ID was actually allocated.
What we can not deduce from the crash is why you run out of instance IDs. Though you probably doing something crazy like loading assetbundles / addressables every frame or something like that. This is something you have to debug on your side. So the stacktrace tells you exactly the reason why the engine crashed. However the cause why you run out of instance IDs can not be found anywhere here. That's something you have figure out yourself in your code.
You're right, but all I'm doing is loading and unloading two scenes. No other code exists. asset 500 in scene