• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSXMLDocument freezes UI
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSXMLDocument freezes UI


  • Subject: Re: NSXMLDocument freezes UI
  • From: Jesse Grosjean <email@hidden>
  • Date: Tue, 28 Aug 2007 21:32:00 -0400

I'm seeing a really odd problem. If I put this code in my delegate:

- (void)applicationWillFinishLaunching:(NSNotification *) aNotification {
NSError *error = nil;
NSXMLDocument *document = [[NSXMLDocument alloc] initWithContentsOfURL:[NSURL fileURLWithPath:@"/Users/ jessegrosjean/Desktop/plugin.xml"] options:0 error:&error];
}


Then my applications UI gets frozen.

Whatever's causing the freeze, it's not that code. Maybe you're shadowing a variable where you don't mean to.

I agree it seems pretty likely that I'm doing something dumb, but I still can't seem to get around the problem. I've just created an example app that you can try here:


	http://hogbaysoftware.com/XMLDocumentTest.zip

The app is created from the Cocoa-Document based template. The only change that I made was to add an application delegate that implements applicationWillFinishLaunching: and tries to open a NSXMLDocument within that method.

If I comment out the line that creates the NSXMLDocument then the app opens the default new document, and the application menus work. But if I leave that line uncommented the apps UI freezes. It's really kinda odd.

Thanks for any ideas.

Jesse

P.S here's what the stack looks like when I pause the debugger.

#0 0x90009cd7 in mach_msg_trap
#1 0x90009c38 in mach_msg
#2 0x9082d2b3 in CFRunLoopRunSpecific
#3 0x9082cace in CFRunLoopRunInMode
#4 0x92ded8d8 in RunCurrentEventLoopInMode
#5 0x92decfe2 in ReceiveNextEventCommon
#6 0x92dece39 in BlockUntilNextEventMatchingListInMode
#7 0x93293465 in _DPSNextEvent
#8 0x93293056 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#9 0x9328cddb in -[NSApplication run]
#10 0x93280d2f in NSApplicationMain
#11 0x0002ffce in main at main.m:15


_______________________________________________

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


  • Follow-Ups:
    • Re: NSXMLDocument freezes UI
      • From: Mike Blaguszewski <email@hidden>
References: 
 >NSXMLDocument freezes UI (From: Jesse Grosjean <email@hidden>)
 >Re: NSXMLDocument freezes UI (From: Jonathon Mah <email@hidden>)

  • Prev by Date: Cocoa Window menu with Carbon windows?
  • Next by Date: Re: NSScrollerView Problem
  • Previous by thread: Re: NSXMLDocument freezes UI
  • Next by thread: Re: NSXMLDocument freezes UI
  • Index(es):
    • Date
    • Thread