Bug in TicTacToe sample (2nd gen iPod running 3.0 beta 5)

Post here all your questions related with the SmartFoxServer iPhone API

Moderators: Lapo, Bax

doctorgonzo
Posts: 3
Joined: 06 Jun 2009, 03:26
Contact:

Bug in TicTacToe sample (2nd gen iPod running 3.0 beta 5)

Postby doctorgonzo » 06 Jun 2009, 21:17

I'm encountering a weird problem with the TicTacToe sample when trying to run it on my iPod touch device (running 3.0 beta 5 OS). When I click "Log in" after a connection to the server has been established, it crashes immediately. However, it works perfectly under the simulator. It appears to crash when trying to load the lobby XIB file.

Here is where the crash is happening:

- (void)switchToView:(NSString *)nibName uiViewController:(UIViewController *)uiViewController {
NSLog([NSString stringWithFormat:@"switchToView %@", nibName]);
self.oldViewController = self.viewController;
UIViewController *aViewController = [uiViewController initWithNibName:nibName bundle:[NSBundle mainBundle]];
self.viewController = aViewController;
[aViewController release];

// [self.viewController loadView];

[self.viewController view].center = window.center; <-- this is the line which crashes my device


The above code also appears almost identically in the SimpleChat sample too, and curiously enough the SimpleChat sample runs on my device with no problems.







Here is the console dump:

[Session started at 2009-06-06 17:36:43 -0500.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1119) (Thu Apr 30 05:19:47 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys000
Loading program into debugger…
sharedlibrary apply-load-rules all
Program loaded.
target remote-mobile /tmp/.XcodeGDBRemote-498-29
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
run
Running…
[Switching to thread 10755]
[Switching to thread 10755]
(gdb) continue
2009-06-06 17:37:17.873 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] viewDidLoad
2009-06-06 17:37:17.932 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] SmartFoxiPhoneClient:init
2009-06-06 17:37:17.941 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:setupMessageHandlers
2009-06-06 17:37:17.952 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxSysHandler:initWithParams sfs:<INFSmartFoxiPhoneClient: 0x128e20>
2009-06-06 17:37:17.962 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:addMessageHandler key:sys handler:INFSmartFoxSysHandler
2009-06-06 17:37:17.972 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:addMessageHandler key:xt handler:INFSmartFoxExtHandler
2009-06-06 17:37:17.982 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient::loadConfig
2009-06-06 17:37:18.009 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:connect ipAdr:192.168.1.102 port:9339
2009-06-06 17:37:18.018 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:initialize isLogOut:0
2009-06-06 17:37:18.171 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:handleSocketConnection
2009-06-06 17:37:18.177 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:send action:verChk fromRoom:0 message:<ver v='154' />
2009-06-06 17:37:18.186 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:makeXmlHeader
2009-06-06 17:37:18.200 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:closeHeader
2009-06-06 17:37:18.208 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:writeToSocket data:<msg t='sys'><body action='verChk' r='0'><ver v='154' /></body></msg> len:70
2009-06-06 17:37:18.217 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] WRITE - Creating a new buffer
2009-06-06 17:37:18.226 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] Read directly from inStream len:92
2009-06-06 17:37:18.235 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:handleMessage
2009-06-06 17:37:18.243 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:xmlReceived
2009-06-06 17:37:18.253 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] WRITE - Written directly to outStream len:70
2009-06-06 17:37:18.264 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] WRITE - No data to send
2009-06-06 17:37:18.280 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] Read directly from inStream len:54
2009-06-06 17:37:18.290 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:handleMessage
2009-06-06 17:37:18.300 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:xmlReceived
2009-06-06 17:37:18.311 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxSysHandler:handleMessage msgObj:<msg t='sys'><body action='apiOK' r='0'></body></msg>
2009-06-06 17:37:18.322 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxSysHandler:handleApiOK
2009-06-06 17:37:24.073 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:login zone:sftris name: pass:
2009-06-06 17:37:24.078 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:send action:login fromRoom:0 message:<login z='sftris'><nick><![CDATA[]]></nick><pword><![CDATA[]]></pword></login>
2009-06-06 17:37:24.082 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:makeXmlHeader
2009-06-06 17:37:24.088 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:closeHeader
2009-06-06 17:37:24.093 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:writeToSocket data:<msg t='sys'><body action='login' r='0'><login z='sftris'><nick><![CDATA[]]></nick><pword><![CDATA[]]></pword></login></body></msg> len:132
2009-06-06 17:37:24.102 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] WRITE - Written directly to outStream len:132
2009-06-06 17:37:24.108 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] WRITE - No data to send
2009-06-06 17:37:24.129 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] Read directly from inStream len:91
2009-06-06 17:37:24.135 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:handleMessage
2009-06-06 17:37:24.140 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:xmlReceived
2009-06-06 17:37:24.176 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxSysHandler:handleMessage msgObj:<msg t='sys'><body action='logOK' r='0'><login n='guest_39' id='43' mod='0'/></body></msg>
2009-06-06 17:37:24.187 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxSysHandler:handleLoginOk
2009-06-06 17:37:24.202 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:getRoomList
2009-06-06 17:37:24.211 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:send action:getRmList fromRoom:-1 message:
2009-06-06 17:37:24.220 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:makeXmlHeader
2009-06-06 17:37:24.229 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:closeHeader
2009-06-06 17:37:24.238 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:writeToSocket data:<msg t='sys'><body action='getRmList' r='-1'></body></msg> len:59
2009-06-06 17:37:24.248 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] WRITE - Written directly to outStream len:59
2009-06-06 17:37:24.260 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] WRITE - No data to send
2009-06-06 17:37:24.277 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] Read directly from inStream len:174
2009-06-06 17:37:24.284 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:handleMessage
2009-06-06 17:37:24.290 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:xmlReceived
2009-06-06 17:37:24.299 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxSysHandler:handleMessage msgObj:<msg t='sys'><body action='rmList' r='0'><rmList><rm id='8' priv='0' temp='0' game='0' ucnt='0' maxu='50' maxs='0'><n><![CDATA[The Entrance]]></n></rm></rmList></body></msg>
2009-06-06 17:37:24.308 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxSysHandler:handleRoomList
2009-06-06 17:37:24.316 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:clearRoomList
2009-06-06 17:37:24.334 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:getAllRooms
2009-06-06 17:37:24.357 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] INFSmartFoxiPhoneClient:getAllRooms
2009-06-06 17:37:24.367 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] switchToView INFSmartFoxiPhoneClient_TicTacToe_LobbyViewController
2009-06-06 17:37:24.463 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<INFSmartFoxiPhoneClient 0x128e20> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key scrollHistory.'
2009-06-06 17:37:24.475 iPhoneSmartFoxiPhoneClient_TicTacToe[3731:207] Stack: (
808001701,
805397928,
807581225,
811092733,
810917483,
810914435,
810914273,
815093352,
807766447,
807757303,
815043128,
815041892,
816152396,
816150380,
814994160,
12523,
9887,
61519,
807776097,
55907,
96139,
96655,
100467,
811176225,
807965013,
807965261,
807814777,
807814519,
833666903,
833666169,
807529383,
807528741,
807748757,
807747947,
839185060,
814678044,
814671668,
8381,
8244
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRTâ€
Last edited by doctorgonzo on 06 Jun 2009, 21:29, edited 3 times in total.
doctorgonzo
Posts: 3
Joined: 06 Jun 2009, 03:26
Contact:

Postby doctorgonzo » 06 Jun 2009, 21:24

Here is the debugger trace I get when it crashes:

#0 0x31dcf94c in __kill
#1 0x31dcf940 in kill
#2 0x31dcf934 in raise
#3 0x31de6cfe in abort
#4 0x374f7848 in __gnu_cxx::__verbose_terminate_handler
#5 0x300166c0 in _objc_terminate
#6 0x374f4f3c in __cxxabiv1::__terminate
#7 0x374f4fb4 in std::terminate
#8 0x374f50dc in __cxa_throw
#9 0x300165e4 in objc_exception_throw
#10 0x3022b628 in -[NSException raise]
#11 0x30584afc in -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:]
#12 0x30559e6a in _NSSetUsingKeyValueSetter
#13 0x30559282 in -[NSObject(NSKeyValueCoding) setValue:forKey:]
#14 0x305591e0 in -[NSObject(NSKeyValueCoding) setValue:forKeyPath:]
#15 0x30955668 in -[UIRuntimeOutletConnection connect]
#16 0x302589ae in -[NSObject performSelector:]
#17 0x302565f6 in -[NSArray makeObjectsPerformSelector:]
#18 0x30949238 in -[UINib instantiateWithOptions:owner:loadingResourcesFromBundle:]
#19 0x30948d64 in -[NSBundle(NSBundleAdditions) loadNibNamed:owner:options:]
#20 0x30a57f4c in -[UIViewController _loadViewFromNibNamed:bundle:]
#21 0x30a5776c in -[UIViewController loadView]
#22 0x3093d2f0 in -[UIViewController view]
#23 0x000030fc in -[INFSmartFoxiPhoneClient_TicTacToe_AppDelegate switchToView:uiViewController:] at INFSmartFoxiPhoneClient_TicTacToe_AppDelegate.m:140
#24 0x0000269e in -[INFSmartFoxiPhoneClient_TicTacToe_AppDelegate onRoomListUpdate:] at INFSmartFoxiPhoneClient_TicTacToe_AppDelegate.m:73
#25 0x0000f06e in -[INFSmartFoxSysHandler handleRoomList:] at INFSmartFoxSysHandler.m:305
#26 0x3025af60 in -[NSObject performSelector:withObject:]
#27 0x0000da82 in -[INFSmartFoxSysHandler handleMessage:type:delegate:] at INFSmartFoxSysHandler.m:133
#28 0x000177aa in -[INFSmartFoxiPhoneClient xmlReceived:] at INFSmartFoxiPhoneClient.m:358
#29 0x000179ae in -[INFSmartFoxiPhoneClient handleMessage:] at INFSmartFoxiPhoneClient.m:378
#30 0x00018892 in -[INFSmartFoxiPhoneClient stream:handleEvent:] at INFSmartFoxiPhoneClient.m:570
#31 0x30599120 in _inputStreamCallbackFunc
#32 0x30289154 in _signalEventSync
#33 0x3028924c in _cfstream_solo_signalEventSync
#34 0x30264678 in _CFStreamSignalEvent
#35 0x30264576 in CFReadStreamSignalEvent
#36 0x31b0bf56 in SocketStream::socketCallback
#37 0x31b0bc78 in SocketStream::_SocketCallBack_stream
#38 0x3021eba6 in __CFSocketDoCallback
#39 0x3021e924 in __CFSocketPerformV0
#40 0x30254494 in CFRunLoopRunSpecific
#41 0x3025416a in CFRunLoopRunInMode
#42 0x3204f2a4 in GSEventRunModal
#43 0x308f001c in -[UIApplication _run]
#44 0x308ee734 in UIApplicationMain
#45 0x000020bc in main at main.m:14
User avatar
cemuzunlar
Posts: 47
Joined: 26 Dec 2008, 00:45
Contact:

Postby cemuzunlar » 08 Jun 2009, 18:18

Thanks for reporting.

We didn't test it using the Beta OS. We'll try to figure out what is causing this problem.
Cem Uzunlar
Infosfer Game and Visualization Technologies
http://www.infosfer.com
contact@infosfer.com

Return to “iPhone Objective-C API”

Who is online

Users browsing this forum: No registered users and 33 guests