- Home /
The question is answered, right answer was accepted
malloc :*** error for object 0 x xyz : pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug [Iphone][Unity]
I keep getting this error at a specific point in my game. I can see this only in Iphone build whereas everything else(editor and Android) works perfectly fine. I also know when exactly does this happen in the game. Although it is quite obvious that some part of memory that was not allocated is called to become free, I cannot determine what part of code to check. All my development is on C# side and I'm absolutely making no calls to Xcode part of the code. How do I debug this ? None of the errors I see in Xcode is helpful. Also, I'm a li'l new to Xcode.
You can't debug it even if you could, because that a native error. File a bug report in this. In Unity, under top right menu (help?)
Answer by kushG · Jun 27, 2017 at 02:12 AM
The error is because of the WebcamTexture being accessed after it has been destroyed using Stop(). Calling stop is not marking the object as NULL but the memory is cleared. More on this here https://forum.unity3d.com/threads/ios-crashing-after-using-webcamtexture.299306/
Follow this Question
Related Questions
Question on incorrect checksum for freed object 0 Answers
Ads show up in editor but not during play test on iPhone 1 Answer
Moving a button out of screen in iPhone 1 Answer
Switching the streaming video off when using Unity Remote 3 Answers
Can Unity Remote be installed without an App Store License? 2 Answers