Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 11, 2007, 03:03 AM   #1
guifa
macrumors 6502
 
Join Date: Sep 2002
Location: Auburn, AL
Leopard update causes run-time error

When I updated to Leopard and rebuilt my app, I got the following error on launch which prevents windows that are set to be visible at launch from loading leaving me with an empty shell applicaiton running.

Code:
2007-11-11 09:36:20.380 HangmanCocoa[1268:10b] *** +[MSHangmanGameMode readableTypes]: unrecognized selector sent to class 0xf3e0
2007-11-11 09:36:20.381 HangmanCocoa[1268:10b] *** +[MSHangmanGameMode readableTypes]: unrecognized selector sent to class 0xf3e0
2007-11-11 09:36:20.382 HangmanCocoa[1268:10b] *** +[MSHangmanGameMode readableTypes]: unrecognized selector sent to class 0xf3e0
2007-11-11 09:36:20.383 HangmanCocoa[1268:10b] *** +[MSHangmanGameMode readableTypes]: unrecognized selector sent to class 0xf3e0
Did anyone else get a similar error? I don't call readableType (explicitely, at least) anywhere in my program and from the documentation it's an Apple method. I've still not yet been able to localize the error in my code, none of my initial loading methods seem to trigger it.
guifa is offline   0 Reply With Quote
Old Nov 11, 2007, 03:46 AM   #2
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Have you done a clean rebuild? What Mac OS X/XCode version did you upgrade from? Have you changed any target settings?
__________________
Actually it does make sense. Man created god, so if we exist, He exists. - obeygiant
Eraserhead is offline   0 Reply With Quote
Old Nov 11, 2007, 04:10 AM   #3
guifa
Thread Starter
macrumors 6502
 
Join Date: Sep 2002
Location: Auburn, AL
Quote:
Originally Posted by Eraserhead View Post
Have you done a clean rebuild? What Mac OS X/XCode version did you upgrade from? Have you changed any target settings?
I upgraded from the latest version of Tiger/XCode and opened the XCode project file, and just selected clean project, and then built it. So, in theory at least everything should be the same.

I've isolated every place in my code where the MSHangmanGameMode object could be instantiated and have surrounded it in NSLogs and none of them are picking up. The method it's trying to call is an Apple-supplied method that seems more internally useful rather than something that should be called by us.
guifa is offline   0 Reply With Quote
Old Nov 11, 2007, 11:58 AM   #4
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Is it possible to have a play with the code? I'll take a quick look tomorrow if I have time.
__________________
Actually it does make sense. Man created god, so if we exist, He exists. - obeygiant
Eraserhead is offline   0 Reply With Quote
Old Nov 11, 2007, 12:14 PM   #5
Krevnik
macrumors 68020
 
Krevnik's Avatar
 
Join Date: Sep 2003
Quote:
Originally Posted by guifa View Post
I upgraded from the latest version of Tiger/XCode and opened the XCode project file, and just selected clean project, and then built it. So, in theory at least everything should be the same.

I've isolated every place in my code where the MSHangmanGameMode object could be instantiated and have surrounded it in NSLogs and none of them are picking up. The method it's trying to call is an Apple-supplied method that seems more internally useful rather than something that should be called by us.
NSHangmanGameMode is your NSDocument sub-class?
__________________
iMac 2013 27", 13" 2012 rMBP, iPad Air, iPhone 6
Krevnik is offline   0 Reply With Quote
Old Nov 11, 2007, 08:25 PM   #6
guifa
Thread Starter
macrumors 6502
 
Join Date: Sep 2002
Location: Auburn, AL
Quote:
Originally Posted by Krevnik View Post
NSHangmanGameMode is your NSDocument sub-class?
No... The NSDocument loads before a game an MSHangmanGameMode and an MSHangmanLanguage which controls how the words are chosen and which alphabet/script etc is used. However, the NSDoc doesn't get to the point of loading it when it errors out.
guifa is offline   0 Reply With Quote
Old Nov 11, 2007, 11:09 PM   #7
Krevnik
macrumors 68020
 
Krevnik's Avatar
 
Join Date: Sep 2003
Quote:
Originally Posted by guifa View Post
No... The NSDocument loads before a game an MSHangmanGameMode and an MSHangmanLanguage which controls how the words are chosen and which alphabet/script etc is used. However, the NSDoc doesn't get to the point of loading it when it errors out.
readableTypes is only meant for NSDocument and its subclasses. If it is calling it on your HangmanGameMode class, I would look at your Info.plist file and make sure it points at your NSDocument subclass.
__________________
iMac 2013 27", 13" 2012 rMBP, iPad Air, iPhone 6
Krevnik is offline   0 Reply With Quote
Old Nov 12, 2007, 03:48 AM   #8
guifa
Thread Starter
macrumors 6502
 
Join Date: Sep 2002
Location: Auburn, AL
Quote:
Originally Posted by Krevnik View Post
readableTypes is only meant for NSDocument and its subclasses. If it is calling it on your HangmanGameMode class, I would look at your Info.plist file and make sure it points at your NSDocument subclass.
That was exactly what it was. XCode didn't warn me it was changing anything on opening it in the new version but sure enough:

Code:
		<dict>
			<key>CFBundleTypeExtensions</key>
			<array>
				<string>hangmanGameMode</string>
			</array>
			<key>CFBundleTypeIconFile</key>
			<string>GameModeIcon</string>
			<key>CFBundleTypeName</key>
			<string>GameMode</string>
			<key>CFBundleTypeRole</key>
			<string>Viewer</string>
			<key>LSTypeIsPackage</key>
			<true/>
			<key>NSDocumentClass</key>
			<string>MSHangmanGameMode</string>
			<key>NSPersistentStoreTypeKey</key>
			<string>XML</string>
		</dict>
guifa is offline   0 Reply With Quote
Old Nov 12, 2007, 05:33 PM   #9
Krevnik
macrumors 68020
 
Krevnik's Avatar
 
Join Date: Sep 2003
Quote:
Originally Posted by guifa View Post
That was exactly what it was. XCode didn't warn me it was changing anything on opening it in the new version but sure enough:
I am not 100% sure it was XCode changing it, per se. Then again, I haven't migrated any big project and had it fail yet.

Some environment variables might change, but in general, it seems odd that sort of entry would change at all. XCode only needs to set it once when the project is created. The only time anyone should be changing that value is when a programmer does it.
__________________
iMac 2013 27", 13" 2012 rMBP, iPad Air, iPhone 6
Krevnik is offline   0 Reply With Quote
Old Nov 12, 2007, 07:00 PM   #10
guifa
Thread Starter
macrumors 6502
 
Join Date: Sep 2002
Location: Auburn, AL
Quote:
Originally Posted by Krevnik View Post
I am not 100% sure it was XCode changing it, per se. Then again, I haven't migrated any big project and had it fail yet.

Some environment variables might change, but in general, it seems odd that sort of entry would change at all. XCode only needs to set it once when the project is created. The only time anyone should be changing that value is when a programmer does it.
My other projects (though much smaller) migrated okay as far as I can tell so far. Just those two Info.plist (it did it as well to the other bundle class) entries. Anyways everything is now running okay so now maybe I can finally finish this project up now that there's no more school, exams, papers, or anything else to get in my way
guifa is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Network users login error 'can't log in at this time due to an error' RyanelRichie Mac OS X 10.7 Lion 1 Jan 8, 2014 04:29 AM
Time Capsule/Time Machine OS Extended (journaled) error tburk32 Mac Peripherals 2 Mar 12, 2013 09:56 PM
Error on terminal when trying to run application, help? bigben33 OS X 10.8 Mountain Lion 2 Oct 20, 2012 11:06 PM
Photoshop Trial error, installed but wont run. JamesP. MacBook Pro 2 Sep 7, 2012 07:11 AM
Can someone check if my PC can run Leopard vietthanh1206 Mac Basics and Help 4 Jul 25, 2012 11:24 PM

Forum Jump

All times are GMT -5. The time now is 02:48 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC