Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
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?
__________________
If they have to tell you every day they are fair you can bet they arent, if they tell you they are balanced then you should know they are not - Don't Hurt me
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.
__________________
If they have to tell you every day they are fair you can bet they arent, if they tell you they are balanced then you should know they are not - Don't Hurt me
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" rMBP, iPad 4, iPhone 5s
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" rMBP, iPad 4, iPhone 5s
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" rMBP, iPad 4, iPhone 5s
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Trying to find line of code causing error please help! mandude iPhone/iPad Programming 5 Jan 12, 2011 03:11 PM
Software Update causes Error 1611 JoeSixPack iPod touch 2 Mar 19, 2010 09:54 PM
"weird" Render stringWithFormat run-time error that crash the app. PizzaTray iPhone/iPad Programming 1 Nov 16, 2009 12:34 PM
mail error after leopard update mac-vaerk Mac Applications and Mac App Store 10 Feb 24, 2009 06:20 AM


All times are GMT -5. The time now is 08:37 PM.

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

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