Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

iOS and MacOS / exception on AGK program

Author
Message
JDforce
18
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Some rainforest
Posted: 7th Sep 2012 04:37 Edited at: 7th Sep 2012 04:40
Am having an issue with AppGameKit samples on Xcode. Many of the samples now do not work.t They compile, start, and the ios simulator shows the AppGameKit splash. But there is an exception and the program is stopped.
Some of the samples do work, like spaceShooter and some of the sprites samples. but box2d samples, accelerometer, input, and others do not work at all.
What has called my attention is that on all failing projects the error seems to be the same, maybe some of you have an idea. Here is the instruction trace output:

Template`AGK::agk:latformSetDevicePtr(void*) at AppleCore.mm:561:
0x1d434: pushl %ebp
0x1d435: movl %esp, %ebp
0x1d437: subl $24, %esp
0x1d43a: calll 0x1d43f ; AGK::agk:latformSetDevicePtr(void*) + 11 at AppleCore.mm:561
0x1d43f: popl %eax
0x1d440: movl 8(%ebp), %ecx
0x1d443: movl %ecx, -4(%ebp)
0x1d446: movl -4(%ebp), %ecx
0x1d449: movl %ecx, 2070385(%eax)
0x1d44f: movl 2070385(%eax), %ecx
0x1d455: movl %ecx, -8(%ebp)
0x1d458: movl 1688129(%eax), %ecx
0x1d45e: movl -8(%ebp), %edx
0x1d461: movl %edx, (%esp)
0x1d464: movl %ecx, 4(%esp)
0x1d468: movl %eax, -12(%ebp)
0x1d46b: calll 0x167df0 ; symbol stub for: objc_msgSend
0x1d470: movl -12(%ebp), %ecx
0x1d473: movl %eax, 2070401(%ecx)
0x1d479: addl $24, %esp
0x1d47c: popl %ebp
0x1d47d: ret

The exception is thrown on the line with address 0x1d470.

And here is the log output:
2012-09-06 19:31:51.149 Template[920:c07] The view controller <UntitledViewController: 0x810f990> returned NO from -shouldAutorotateToInterfaceOrientation: for all interface orientations. It should support at least one orientation.
2012-09-06 19:31:51.154 Template[920:c07] -[EAGLView view]: unrecognized selector sent to instance 0x76327e0
2012-09-06 19:31:51.155 Template[920:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[EAGLView view]: unrecognized selector sent to instance 0x76327e0'
*** First throw call stack:
(0x1f01022 0x181acd6 0x1f02cbd 0x1e67ed0 0x1e67cb2 0x1d470 0x6c995 0x34c5 0x87d46c 0x87eeb7 0x65bce1 0x65bff8 0x65b17f 0x66a183 0x66ac38 0x65e634 0x253eef5 0x1ed5195 0x1e39ff2 0x1e388da 0x1e37d84 0x1e37c9b 0x65ac65 0x65c626 0x229d 0x2215 0x1)
terminate called throwing an exception(lldb)

Have tested on the simulator and on device, with same results. Any idea is appreciated. I am almost sure that the samples worked before making the latest updates to OSX and xcode.

JD

EDIT: Mac OSX 10.8.1, xcode 4.4.1

May the 3d force B with U
JDforce
18
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Some rainforest
Posted: 7th Sep 2012 05:16
OK, solved it. It was solved before but I reinstalled the samples on the Mac and have forgotten that I did the change.

The solution: on untitledViewController.m, the AppGameKit initialization should be

agk::InitGL( self); (remove the .view part).

I still feel that we should have a template (a real xcode template) that can start a brand new project from xcode without recurring to modifications/renaming an old project.

May the 3d force B with U

Login to post a reply

Server time is: 2022-10-04 14:22:04
Your offset time is: 2022-10-04 14:22:04