Question

I am using NSOpenPanel to allow the user to choose a file from their MAC. The panel opens up fine and filters the correct files out but as soon as I click on a file, my application crashes.

Here is my code to open the panel:

if ([openDlg runModalForDirectory:begin file:filename types:filetypes] == NSOKButton)
{
    NSArray* selected = [openDlg filenames];
    for (int i = 0; i < (int)[selected count]; i++)
    {
        NSString* fileName = [selected objectAtIndex:i];
        string fn = [fileName UTF8String];
        results->Append(Value::NewString(fn));
    }
}

The code never returns from the runmodalForDirectory method call.

So once I select a file the Debugger Console says this:

Program received signal:  “EXC_BAD_ACCESS”.
warning: Unable to restore previously selected frame.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Not safe to call dlopen at this time.)

Briefly I see not safe to call dlOpen at this time.

and then I get this:

Loading a lot of stack frames

and the call stack looks like this:

Call Stack

Call stack before recursive call happens:

enter image description here

The call stack is in the WebKit framework file called WebFullScreenController.mm recursively calling this method setDisableActions:

@implementation CATransaction(SnowLeopardConvenienceFunctions)
+ (void)setDisableActions:(BOOL)flag
{
    [self setValue:[NSNumber numberWithBool:flag] forKey:kCATransactionDisableActions];
}

Does anybody have any ideas of why this is happening? Thanks in advance.

Was it helpful?

Solution

I found the answer, we could probably delete this question, it turned out it was the version of webkit I was using, and I had to modify webkit per this bug fix posted on webkit.org

https://bugs.webkit.org/show_bug.cgi?id=61224

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top