How can I catch an Unahndled Null exception in a DLL?

Unity3D’s log is not very helpful. It just says there is an unhandled null exception. I set up some try catch things around the function calls I thought might be the problem, but nothing is being caught.

Update-- I apologize for any confusion and didn’t know what to include in the post.

This DLL is really a .bundle (for OSX, most people come from a windows background and think of everything as a DLL, me included) that is written and maintained by our company for use in assisting our Unity developers. It manages all of the audio for the game.

Generally, the project is run on an iPad where the XCode project has access to the native code without needing a bundle. After a lot of work to remove memory leaks, the iPad project does not exhibit any disruptive behavior. Specifically, when we call a function to stop and delete the class that is operated by the .bundle, the Unity editor crashes with “Receiving unhandled NULL exception, Launching bug reporter” but the iPad does not.

I can see the project in XCode’s debugger when running on iPad which is immensely helpful.
It would be awesome to attach the XCode debugger to the .bundle as it is operating in Unity. Do you have any similar advice like you did for Visual Studio?
I’m wondering how to go about tracking down the bug in this .bundle.

I did the impossible for this. I built a project that made all of these messages send through TCP. Now, I can debug the .bundle in Xcode while I’m running the game in the Unity editor. This is not a possibility when you are running in the Unity editor with a bundle using DLLImport for the functions. It revealed that a callback function was attempting to call a function after the .bundle had been deallocated. Quite the difficult problem.

I assume you’re talking about a C++/Windows DLL. If not, you need to provide more information.

Unity doesn’t do anything special here, try this site for some info. You should also be able to attach a c++ debugger to the DLL, start the DLL and use it to launch Unity and run the project.