Pregunta

I'm currently building a C++ plugin for some software, which, when the relevant function is called, displays a nib which I built in XCode. Up until today everything has been working fine, displaying and working with the nib / Objective-C++ / C++ has caused no problems.

However out of the blue everything started crashing at the call to show the preferences dialog. I've narrowed the crashing code down to this line:

PreferencesWindowController *prefsWindowController = [[PreferencesWindowController alloc] initWithNibNamed:@"PreferencesWindow"];

PreferencesWindowController is a superclass of NSWindowController, and PreferencesWindow is a .xib file which superclasses NSWindow also.

Does anyone have any idea why this is crashing?

¿Fue útil?

Solución

I figured out the problem. I was developing a Plug-in for some software, which apparently loaded plug-ins from two different directories on a Mac. I had the plug-in in both directories and for some reason having it being loaded in twice obviously messed around with the memory somehow. Anyway I deleted it from one of the plug-in directories and now it works fine.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top