- Home /
Question on incorrect checksum for freed object
Hi there, I've been experiencing weird crash issues that I am still investigating. I am hoping that any of you would have any ideas regarding the cause of this crash. Or where I should be looking into first.
Basically, I have a prefab that controls loading between the unity scenes (regardless of the scene type, whether it be cinematics, or actual levels). This loading prefab is set to not get destroyed upon load, as we load several scenes (sometimes additively, or even via additive async) before getting to the 'target' scene. The flow in my case is:
Main Menu [scene]
Press on Stage 1 level 1 [user action]
Instantiate Loader Prefab [code]
Loader sets DontDestroyOnLoad() on self.
Loader initiates loading animation (animation done by code, so no animation component actually used) [code]
Loader loads an empty level for flushing [code]
Loader loads a cinematic scene if applicable [code]
Upon loading of cinematic scene, loader prefab invokes Reset() and SetActiveRecursively(false) on self
Upon finish of cinematic scene, cinematic controller invokes SetActiveRecursively(true) on Loader
Loader reinitiates loading animation (obviously the animation was reset, so our GUITextures' positions are reset to default at this point)
CRASH right before invoking Application.LoadLevel(level)
I've attached a screenie of what I see in Xcode (I've tried to understand, but having had no experience on this crash before, I fail miserably).
Additionally, this is the error I see on the console:
malloc: *** error for object 0x2229a04: incorrect checksum for freed object - object was probably modified after being freed.
I have a hunch that it could be when the GUITexture objects are animated right during the second loading sequence (right after the cinematic). If any of you could confirm this or wouild have any other leads, I would most greatly appreciate it. Thank you.
Added a device crash log:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3616e32c 0x3615d000 + 70444
1 libsystem_c.dylib 0x34a1af54 0x349cd000 + 319316
2 libsystem_c.dylib 0x34a13fe4 0x349cd000 + 290788
3 myGameName 0x00744e50 mono_handle_native_sigsegv + 276
4 myGameName 0x007595c8 sigabrt_signal_handler + 100
5 libsystem_c.dylib 0x34a25532 0x349cd000 + 361778
6 libsystem_c.dylib 0x34a1af54 0x349cd000 + 319316
7 libsystem_c.dylib 0x34a13fe4 0x349cd000 + 290788
8 libsystem_c.dylib 0x34a26c46 0x349cd000 + 367686
9 libsystem_c.dylib 0x34a26c62 0x349cd000 + 367714
10 libsystem_c.dylib 0x349d305a 0x349cd000 + 24666
11 libsystem_c.dylib 0x349d1466 0x349cd000 + 17510
12 libsystem_c.dylib 0x349d04e8 0x349cd000 + 13544
13 libsystem_c.dylib 0x349d41ac 0x349cd000 + 29100
14 GLEngine 0x3649c1fa gleCreateTextureObject + 54
15 GLEngine 0x364a7668 gleBindTexture + 92
16 GLEngine 0x364a754c glBindTexture_Exec + 72
17 OpenGLES 0x314ed0e4 glBindTexture + 24
18 myGameName 0x00404f38 GfxDeviceGLES20::SetTexture(int, TextureID, TextureDimension) (GfxDeviceGLES20.cpp:1290)
19 myGameName 0x004105a4 UploadTexture2DGLES2(TextureID, TextureDimension, unsigned char*, int, int, unsigned long, int, bool, int) (TexturesGLES20.cpp:208)
20 myGameName 0x00404ce8 GfxDeviceGLES20::UploadTexture2D(TextureID, TextureDimension, unsigned char*, int, int, unsigned long, int, bool, int, TextureUsageMode) (GfxDeviceGLES20.cpp:1617)
21 myGameName 0x004bec70 Texture2D::UploadTexture(bool) (Texture2D.cpp:493)
22 myGameName 0x004be394 Texture2D::IntegrateLoadedImmediately() (Texture2D.cpp:172)
23 myGameName 0x004e30c0 PreloadManager::UpdatePreloadingSingleStep() (PreloadManager.cpp:365)
24 myGameName 0x004e317c PreloadManager::WaitForAllAsyncOperationsToComplete() (PreloadManager.cpp:463)
25 myGameName 0x004e12fc PlayerLoop(bool, bool) (Player.cpp:1247)
26 myGameName 0x003e2adc UnityPlayerLoop() (LibEntryPoint.mm:456)
27 myGameName 0x00004774 -[AppController Repaint] (AppController.mm:623)
28 myGameName 0x00004744 -[AppController RepaintDisplayLink] (AppController.mm:615)
29 QuartzCore 0x31baf41c 0x31b5b000 + 345116
30 QuartzCore 0x31baf372 0x31b5b000 + 344946
31 IOMobileFramebuffer 0x31b04f8c IOMobileFramebufferVsyncNotifyFunc + 76
32 IOKit 0x3574388a 0x35740000 + 14474
33 CoreFoundation 0x33b6af3c 0x33ae8000 + 536380
34 CoreFoundation 0x33b7554c 0x33ae8000 + 578892
35 CoreFoundation 0x33b754ee 0x33ae8000 + 578798
36 CoreFoundation 0x33b7433c 0x33ae8000 + 574268
37 CoreFoundation 0x33af74d6 0x33ae8000 + 62678
38 CoreFoundation 0x33af739e 0x33ae8000 + 62366
39 GraphicsServices 0x35737fc6 0x35734000 + 16326
40 UIKit 0x34c3c73c 0x34c0b000 + 202556
41 myGameName 0x0000573c main (main.mm:21)
42 myGameName 0x000030f0 start + 32
I really hope someone can at least point me to what could be causing this random crash :/
I've experienced another crash at the exact same point, however, this time it was with a fairly different error. Here is a link to a screenie of the what I see in Xcode when the game crashed (note that this was after 25 or so tries in a span of 1 and a half hours in trying to get the error to trigger again): http://img442.imageshack.us/img442/2653/screenshot20120110at731.png
Your answer
![](https://koobas.hobune.stream/wayback/20220613062833im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Get a portion of a Texture2D to another Texture2D 1 Answer
Animated GIF as a texture on Iphone 3 Answers
Load texture at full resolution when using quality settings 0 Answers
Texture image compression issue 3 Answers
Assigning script-generated textures 0 Answers