Re: Crash on SL in com.apple.DesktopServices after using NSOpenPanel
Re: Crash on SL in com.apple.DesktopServices after using NSOpenPanel
- Subject: Re: Crash on SL in com.apple.DesktopServices after using NSOpenPanel
- From: Thomas Clement <email@hidden>
- Date: Mon, 7 Sep 2009 13:31:46 +0200
Looks like an Apple bug.
http://kb2.adobe.com/cps/506/cpsid_50654.html
Thomas
On Sep 7, 2009, at 12:37 PM, Markus Spoettl wrote:
Hello,
I have a crash that I can't reproduce on my machines but a user
runs into it every time he uses an open panel in the app on Snow
Leopard.
Below is the stack trace and the code that handles the panel.
Nothing obvious for me and it used to work and works fine under
Leopard and Snow Leopard for me and other users. The base SDK and
deployment target both are 10.5 compiled on Snow Leopard.
I've read the release notes and nothing relevant came up there
(besides lots of deprecated stuff when using 10.6+ SDKs).
According to the user, he opens the panel, selects a file, OK's the
sheet, the app does what it does and then shortly after that it
crashes.
Stack and code below, I'd be grateful for hints in that matter.
Thanks!
Regards
Markus
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x9696b917 objc_msgSend + 23
1 com.apple.DesktopServices 0x90f21a79 TFSInfo::~TFSInfo() + 29
2 com.apple.DesktopServices 0x90f21f25
TFSInfo::RemovePtrReference() + 35
3 com.apple.DesktopServices 0x90f3a544 TNode::IsUnresolved()
const + 48
4 com.apple.DesktopServices 0x90f2efa0
TNode::SetAliasTarget(TNodePtr const&, bool) + 230
5 com.apple.DesktopServices 0x90f7538d
TNode::RecursivelyRemoveAllChildren(bool) const + 175
6 com.apple.DesktopServices 0x90f75986
TNode::Finalize(TNodePtr*&) + 56
7 com.apple.DesktopServices 0x90f75bb0 TNode::Finalize() + 286
8 com.apple.DesktopServices 0x90f889fa NodeContextClose + 542
9 com.apple.AppKit 0x971f1527 _NSSavePanelContextEnd
+ 60
10 com.apple.Foundation 0x942fbb65 __NSFireDelayedPerform
+ 537
11 com.apple.CoreFoundation 0x911a9eee __CFRunLoopRun + 6846
12 com.apple.CoreFoundation 0x911a7d34 CFRunLoopRunSpecific +
452
13 com.apple.CoreFoundation 0x911a7b61 CFRunLoopRunInMode + 97
14 com.apple.HIToolbox 0x9622afec
RunCurrentEventLoopInMode + 392
15 com.apple.HIToolbox 0x9622ada3 ReceiveNextEventCommon
+ 354
16 com.apple.HIToolbox 0x9622ac28
BlockUntilNextEventMatchingListInMode + 81
17 com.apple.AppKit 0x96aaeb99 _DPSNextEvent + 847
18 com.apple.AppKit 0x96aae40e -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
19 com.apple.AppKit 0x96a705fb -[NSApplication run] +
821
20 com.apple.AppKit 0x96a68695 NSApplicationMain + 574
21 com.toolsfactory.myapp 0x000026ee 0x1000 + 5870
- (void)importDataPanelDidEnd:(NSOpenPanel *)panel returnCode:
(int)returnCode contextInfo:(void *)contextInfo
{
[panel orderOut:self];
if (returnCode != NSOKButton) return;
if ([[panel filenames] count] > 0) {
NSString *file = [[panel filenames] objectAtIndex:0];
NSString *dir = [file stringByDeletingLastPathComponent];
[[NSUserDefaults standardUserDefaults] setObject:dir
forKey:UDEF_KEY_LAST_IMPORT_DIRECTORY];
[self importFromFiles:[panel filenames]];
}
}
- (void)importDataFromFile:(id)sender
{
NSArray *filetypes = [NSArray arrayWithObjects:@"tcx", @"gpx",
@"xml", @"log", @"fitlog", @"sdf", nil];
NSOpenPanel *op = [NSOpenPanel openPanel];
[op setAllowsMultipleSelection:YES];
[op setAllowedFileTypes:filetypes];
[op setTitle:STR_IMPORT_SELECT_TITLE];
[op setMessage:STR_IMPORT_SELECT_FILES];
[op setPrompt:STR_IMPORT_IMPORT];
NSString *initialDir = [[NSUserDefaults standardUserDefaults]
stringForKey:UDEF_KEY_LAST_IMPORT_DIRECTORY];
if (!initialDir) {
initialDir = NSHomeDirectory();
}
[op beginSheetForDirectory:initialDir file:nil types:filetypes
modalForWindow:[controller window] modalDelegate:self
didEndSelector
:@selector(importDataPanelDidEnd:returnCode:contextInfo:)
contextInfo:nil];
}
--
__________________________________________
Markus Spoettl
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden