- Home /
Loading multiple Assetbundles causes a Crash
Good evening,
I have the following problem: when I load an assetbundle, and then i unload everything from it and load another one and so on, mabye i only switch between 2 assetbundles the app after a while 20-30 trys on nexus 10 and a bit more on Nexus 5 crashs... but I have no Idea why....
First i thought it could be the Memory.. but i checked everything with the profiler and it looks ok. I get a Signal 11! This is a small part of it:
#01 pc 003c9b38 /data/app-lib/com.xx.xx-1/libunity.so (std::basic_string<char, std::char_traits<char>, stl_allocator<char, (MemLabelIdentifier)45, 16> >::operator=(char const*)+20)
#02 pc 003ca314 /data/app-lib/com.xx.xx-1/libunity.so (MemoryProfiler::RegisterRootAllocation(void*, BaseAllocator*, char const*, char const*)+108)
#03 pc 000b2958 /data/app-lib/com.xx.xx-1/libunity.so (set_root_allocation(void*, MemLabelId, char const*, char const*)+72)
#04 pc 001e0454 /data/app-lib/com.xx.xx-1/libunity.so (WWW::FeedUnityWebStream(bool)+480)
#05 pc 004b4d34 /data/app-lib/com.xx.xx-1/libunity.so (AndroidWWW::ReadCallback(void*, void*, int, void*, int)+200)
Thanks
i tryed to reproduce this with 2 assetbundles with a cube and a sphere, but there after 200-300 trys nothing happend.
It crashs using 10-15mb big Assetbundles with shader, materials, textures and meshes with gameojbects and so on.
I'm using Unity 4.2.0f4 and a Android 4.4.2
Are you properly unloading and garbage collecting everything? If you're just using a straight loop, you may have to throw a System.GC.Collect() in there to force it to clear up leftover assets.
Thanks a lot for your tipp. Im not using collect yet, i will post a snippet of my routine and try to use collect. Thanks a lot
i tried to add the Collect, but it is still crashing. Im Loading the Assetbundle in a Courutine... but that shoudent be the problem. Thanks anyway
This is the error i get on my Nexus 10 Device at the moment the Application crashes... no Fingertip.. no signal 11 just this:
D/ExynosCameraHAL2( 122): (m_sensorThreadFunc): scp frame drop1 request_scp(1 t o 0) W/CameraService( 122): Disconnecting camera client 0xb8431550 since the binder for it died (this pid 122) W/InputDispatcher( 442): channel '41d26150 com.xxxxxxx.xxxxxxxx/com.qualcomm.Q CARUnityPlayer.QCARPlayerNativeActivity (server)' ~ Consumer closed input channe l or an error occurred. events=0x9 E/InputDispatcher( 442): channel '41d26150 com.xxxxxxxx.xxxxxxxx/com.qualcomm.Q CARUnityPlayer.QCARPlayerNativeActivity (server)' ~ Channel is unrecoverably bro ken and will be disposed! I/Activity$$anonymous$$anager( 442): Process com.xxxxxxxx.xxxxxx(pid 22777) has died. I/WindowState( 442): WIN DEATH: Window{41d26150 u0 com.xxxxxxxx.xxxxxxxxx/com.qu alcomm.QCARUnityPlayer.QCARPlayerNativeActivity} W/InputDispatcher( 442): Attempted to unregister already unregistered input cha nnel '41d26150 com.xxxxxxxx.xxxxxxxx/com.qualcomm.QCARUnityPlayer.QCARPlayerNati veActivity (server)' E/Surface ( 122): queueBuffer: error queuing buffer to SurfaceTexture, -32 W/Activity$$anonymous$$anager( 442): Force removing ActivityRecord{41c9cda0 u0 com.xxxxxxx .xxxxxxx/com.qualcomm.QCARUnityPlayer.QCARPlayerNativeActivity t71}: app died, no saved state
Answer by Simbraska · Dec 17, 2014 at 08:28 AM
Had exact same issue on our game. We were loading/unloading about 15MB of assetbundle per level, and unity client crashes frequently(depending one device, galaxy s4 lasts about 15 levels, nexus 7 lasts about 35 levels). Log indicates "signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000" and . Spent almost 100 engineering hours trying to find the issue. It finally comes down to replace "new WWW() " with "WWW.LoadFromCacheOrDownload()". It's apparently a Unity bug but they refused to fix it.
Your answer
Follow this Question
Related Questions
Android crash when using www load/unload frequently 0 Answers
crash on android devices (unity 4.6f1) 2 Answers
Unity3D Android plugins and SIGSEGV 0 Answers
webplayer crash when use www download assetbundle 0 Answers
[ANDROID] signal 11 (SIGSEGV) ON ANDROID 8.0/8.1 WHEN PLAYING GOOGLE INTERSTITIAL/VIDEO AD 2 Answers