We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1134 - SDLiPhoneOS.xcodeproj from tip fails test's
Summary: SDLiPhoneOS.xcodeproj from tip fails test's
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 Mac OS X 10.6
: P2 normal
Assignee: Eric Wing
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-20 10:20 UTC by Trent M
Modified: 2013-05-21 02:22 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Trent M 2011-02-20 10:20:03 UTC
Compiling all four targets are successful but the 'testsdl' fails at runtime.

I successfully step through the code in SDL_uikitappdelegate.m and the 'main' & 'init' methods complete but after the init it is expecting to load 'MainWindow' from the plist but looks like it can't find this and fails. See stack trace.


(gdb) continue
2011-02-20 12:11:05.341 testsdl[3936:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/tmillar/Library/Application Support/iPhone Simulator/4.2/Applications/5CF0AA03-8995-4E72-BBC2-751FC6404707/testsdl.app> (loaded)' with name 'MainWindow''
*** Call stack at first throw:
(
	0   CoreFoundation                      0x01304be9 __exceptionPreprocess + 185
	1   libobjc.A.dylib                     0x014595c2 objc_exception_throw + 47
	2   CoreFoundation                      0x012bd628 +[NSException raise:format:arguments:] + 136
	3   CoreFoundation                      0x012bd59a +[NSException raise:format:] + 58
	4   UIKit                               0x005f86c4 -[UINib instantiateWithOwner:options:] + 2024
	5   UIKit                               0x005fa081 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
	6   UIKit                               0x00404943 -[UIApplication _loadMainNibFile] + 172
	7   UIKit                               0x004054ca -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 291
	8   UIKit                               0x0040fdb2 -[UIApplication handleEvent:withNewEvent:] + 1533
	9   UIKit                               0x00408202 -[UIApplication sendEvent:] + 71
	10  UIKit                               0x0040d732 _UIApplicationHandleEvent + 7576
	11  GraphicsServices                    0x01c3aa36 PurpleEventCallback + 1550
	12  CoreFoundation                      0x012e6064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
	13  CoreFoundation                      0x012466f7 __CFRunLoopDoSource1 + 215
	14  CoreFoundation                      0x01243983 __CFRunLoopRun + 979
	15  CoreFoundation                      0x01243240 CFRunLoopRunSpecific + 208
	16  CoreFoundation                      0x01243161 CFRunLoopRunInMode + 97
	17  UIKit                               0x00404fa8 -[UIApplication _run] + 636
	18  UIKit                               0x0041142e UIApplicationMain + 1160
	19  testsdl                             0x00090a23 main + 351
	20  testsdl                             0x000023a1 start + 53
)
terminate called after throwing an instance of 'NSException'
Program received signal:  “SIGABRT”.
(gdb) continue
Comment 1 Trent M 2011-02-20 10:21:04 UTC
I did read the iphoneos.README and noticed this,

4.  Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iPhone provides its own UIApplicationDelegate.  Remove MainWindow.xib -- SDL for iPhone produces its user interface programmatically.

But I fail to see where/how MainWindow.xib is created?
Comment 2 Sam Lantinga 2011-02-20 10:22:51 UTC
Hey Eric, can you look at this?

Thanks!
Comment 3 Trent M 2011-02-20 10:33:17 UTC
my environment: Mac OSX, XCode 3.25, iPhoneSDK 4.2

After removing MainWindow from the 'Main nib file base name' in testsdl-info.plist I was able to complete the main in testsdl.c

I did receive some failed tests:

Current language:  auto; currently c
Platform : All tests successful (2)
SDL_RWops : All tests successful (5)
Rect : All tests successful (1)
Assert Failed!
   Blitting blending output not the same (using SDL_BLEND_*).
   Test Case 'Blit Blending Tests'
   Test Suite 'SDL_Surface'
   Last SDL error ''
SDL_Surface : Failed 1 out of 4 testcases!
Assert Failed!
   SDL_RenderReadPixels
   Test Case 'Renderer opengles2'
   Test Suite 'Rendering with uikit driver'
   Last SDL error 'That operation is not supported'
Assert Failed!
   SDL_RenderReadPixels
   Test Case 'Renderer opengles'
   Test Suite 'Rendering with uikit driver'
   Last SDL error 'That operation is not supported'
Assert Failed!
   Blended primitives output not the same.
   Test Case 'Renderer software'
   Test Suite 'Rendering with uikit driver'
   Last SDL error ''
Rendering with uikit driver : Failed 3 out of 4 testcases!
Assert Failed!
   SDL_CreateWindow
   Test Case 'Initializing video mode'
   Test Suite 'Rendering with dummy driver'
   Last SDL error 'No OpenGL support in video driver'
Rendering with dummy driver : Failed 1 out of 1 testcases!
SDL_Audio : All tests successful (1)
Tests run with SDL 1.3.0 revision 796947
System is running iPhone OS and is little endian
(gdb) continue

Debugger stopped.
Program exited with status value:2
Comment 4 Vittorio Giovara 2011-04-27 18:22:51 UTC
i think that this revision http://hg.libsdl.org/SDL/rev/7cf203db63f6 fixed the reported issue.