OSX Builds fail to run with 'Unhandled NULL Exception'

After upgrading to Unity3D 4.6.0b17 our OSX x64 builds no longer load and cause a pretty bad looking crash. Both release and development builds fail. See below for a log of a development build.

Anyone else getting the same issue?

Can you please log a bug with repro project.

I intend to try. However I fear how long it’ll take for me to cut up our project into a reasonable size for you and still have a reproducible bug.

Would you like me to post the bug report number here too or shall we let it go through the QA team?

Post it here. Looking at the logs I can’t see anything obvious so I unfortunately would need to get it to happen locally to fix :frowning:

I have submitted a bug report here: http://fogbugz.unity3d.com/default.asp?628554_adj40gt3oqaao356
I attached an archive of our project vastly cut down. I confirmed the bug is still present. Email me if you require anything else.

1 Like

Hello Tim C,
I’m a mate of strich and I can add something to this matter.
For a user trying to run our OSX build an OSX crashreport was generated as well.
This crashreport I attach to this post.
Thank you for taking a look!

1750134–110591–OSXbugreport.txt (77 KB)

I’m having (apparently) the same problem on Linux with Unity 4.5+ (log attached). When using 4.3.4 the crash goes away. I’m happy to provide additional logs (strace, library info, you name it) if it’s helpful.

1760939–111515–wfto-debug.txt (13.9 KB)

Hey Tim. Wondering what the status is of this bug at the moment? Have your team had a chance to review and independently confirm it on your end?

Not yet, it’s still making it’s way through the QA process I would guess. As the beta is open we are getting flooded with bug reports (many of them dupes) and it’s taking us a lot of time to process them all.

2 Likes

No worries Tim. Its great to hear from you guys even if its ‘No comment’. Thanks for the update. :slight_smile:

Hey guys,

I don’t know if this helps at all, but I encountered this problem when upgrading to Photon. I ran the Photon conversion wizard, and on the first build after fixing all the bugs, I got a crash with this “Symbol file LoadedFromMemory doesn’t match image” error. This specifically happens when I try to connect to Photon using PhotonNetwork.ConnectUsingSettings()

Hey dgerb,
we are not using Photon but uLink. Thanks for the hint anyway.
We can not use any Unity version 4.5+ to build for OSX & Linux until it is fixed.
I’m looking forward to an update on this matter.
Thank you :slight_smile:

Hey @Tim-C - Any updates on this one?

Cheers.

I’m getting this crash on x64 and universal builds as well with version 4.6.0b20. I think it’s the same issue:

Initialize engine version: 4.6.0b20 (a3ecf55f1347)
GfxDevice: creating device client; threaded=1
LoadSystemBundle - Could not create bundle URL for framework ‘OpenGL.framework’
OpenGL:
Version: OpenGL 2.1 [2.1 INTEL-8.28.32]
Renderer: Intel Iris Pro OpenGL Engine
Vendor: Intel Inc.
VRAM: 1536 MB

(…)

(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/MacStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Symbol file LoadedFromMemory doesn’t match image /Contents/Data/Managed/UnityEngine.dll
Symbol file /Contents/Data/Managed/UnityEngine.dll.mdb doesn’t match image Contents/Data/Managed/UnityEngine.dll

  • Assertion at mini-exceptions.c:458, condition `class’ not met

Receiving unhandled NULL exception
Receiving unhandled NULL exception

@lemon-tree do you think you could estimate for us how big your asset DB is? Some of us believe it may be a crash in relation to the size of or number of assets in the project.

The entire Assets/ folder is only about 15MB, so it should be pretty small (it’s just a handful of 2D spritesheets). After the app starts, it procedurally generates some fairly big textures in a background thread. I just did a test build without the background thread generation and the app did not crash, so I will poke around some more and try and figure out exactly where the problem is.

Please do. If you could find the root cause to the best of your ability that would be amazing. Our game has been unable to run on Linux or OSX for about 3 months now because or this or some similar issue.

Unfortunately, I’m not any closer to figuring it out now. If I run the app in debug mode, sometimes when my background thread crashes I’ll get a console popup with a stack trace, but it’s never anything that makes sense to me. At first it was always getting NULL references on things like .Clear()ing a generic list that should definitely be initialized, so I thought there might be something up with LINQ. I converted all my Lists to native arrays, but then it just started crashing in other weird places, for example:

if (ti < 0 || ti >= tiles.length)
        return null;
if (!tiles[ti])
        tiles[ti] = new Tile(tileSize); // array index out of bounds

And this:

function SetStatus(_status : int) {
    status = _status;
}

// later, from my background thread...
SetStatus(STATUS_PAINTING); // NULL reference

This never happens when running in the editor, when using the profiler, when using the 32 bit build, or when running the same code in a foreground thread. In the 64 bit version it crashes every time.

Ah. Then I don’t think we have the same issue. This thread is with regards to a null ref that occurs before it even enters our own code. :confused:

That’s definitely possible. It’s finicky though, if I run the app normally it crashes/beach balls at the black screen right after the Unity logo fades out. If I lower the resolution or put in a delay before my memory-intensive thread starts, it draws the game for a bit and then the background thread crashes silently while the main thread keeps going (that’s how I’ve been testing). I don’t know if it’s the same issue as you, but it does seem to be a 64 bit-only problem with similar error messages.