Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411993 Posts in 69441 Topics- by 58486 Members - Latest Member: Fuimus

June 17, 2024, 03:12:32 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)FFFFFFFF (calling all mac os x programmers)
Pages: [1]
Print
Author Topic: FFFFFFFF (calling all mac os x programmers)  (Read 1536 times)
Hinchy
Level 3
***



View Profile WWW
« on: January 03, 2009, 03:59:30 PM »

Xcode's giving me a spot of trouble. I'm attempting to port a friend's game over to the Mac platform - it relies on SFML, a cross-platform multimedia API that I vastly prefer to SDL and similar. However, I'm having a problem. I start out with the default SFML template, and the frameworks link properly and are added to the right directory of the .app bundle. However, as soon as I modify main.cpp into my friend's game, problems arise. It SAYS it builds properly, but for no apparent reason, it decides to not launch. GDB gives me file not found errors for all the frameworks, and sure enough, the frameworks strangely don't get copied into the appname/Contents/Frameworks directory. And then, when I manually copy the frameworks in, the game still will not launch - it just starts up for a few seconds with a blank window, then crashes. The game compiles and runs fine under Win32. The default SFML program compiles and runs fine under both OSX and Win32.

First issue solved, but new issue found - read a few posts down.

If you're willing to help, please contact me on an instant messenger below:

AIM: zachhinchliffe
MSN/WLM: [email protected]
YAHOO: zachhinchliffe
Google Talk: [email protected]
Skype: zachhinchliffe
« Last Edit: January 04, 2009, 09:11:44 PM by Hinchy » Logged
HannesP
Level 0
***


View Profile WWW
« Reply #1 on: January 04, 2009, 10:58:16 AM »

Expand the "Targets" section in the project sidebar. It contains a number of "build steps", i.e. automated actions performed when building the application. One of these steps is called "Copy Framework into .app bundle". In order to get the framework copied into YourGame.app/Contents/Frameworks/, you need to add the framework in question (simple drag'n'drop) to this build step.

EDIT: seems that I read you message a little bit too quick. If you're using the ready-made template, this should probably have been done for you. It never hurts to see if the build steps are set up properly, though. Also, try cleaning (Build → Clean) the project and re-build it. Sometimes this magically helps.
« Last Edit: January 04, 2009, 02:20:44 PM by HannesP » Logged
Reiss
Level 1
*



View Profile
« Reply #2 on: January 04, 2009, 07:29:30 PM »

It never hurts to see if the build steps are set up properly, though. Also, try cleaning (Build → Clean) the project and re-build it. Sometimes this magically helps.

yeeup.  i hate it when that works, but it does sometimes.

but also, isn't the mac build of SFML a couple versions behind the windows build?  maybe your friend was using an updated version of some method that works differently in os x's older version.

also try checking what s/he was doing with any STL containers, or what pointers were assumed to be initialized to - sometimes there are weird quirks when porting even "standard" c++ (especially if you're coming from visual studio, which is pretty lax on the whole "standards" issue).
Logged
Hinchy
Level 3
***



View Profile WWW
« Reply #3 on: January 04, 2009, 07:49:21 PM »

issue "solved" - apparently SFMLOSX doesn't yet work with relative paths, especially ones in app bundles. i'm just going to have to use an absolute path for now and make sure users always put the app bundle in the same folder (/Applications/).

new issue, this one's much much weirder. app compiles fine... but here's my debugger notes:

Code:
[Session started at 2009-01-04 22:36:32 -0500.]
Loading program into debugger…
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008)
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 "i386-apple-darwin".Program loaded.
sharedlibrary apply-load-rules all
Attaching to program: `/Users/zhinchliffe/Projects/Yeah! I've Got The Times!/build/Debug/Yeah! I've Got The Times!.app/Contents/MacOS/Yeah! I've Got The Times!', process 24177.
warning: Unable to read symbols for "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss" (file not found).
warning: Unable to read symbols from "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss" (not yet mapped into memory).
warning: Unable to read symbols for "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss" (file not found).
warning: Unable to read symbols from "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss" (not yet mapped into memory).
gdb stack crawl at point of internal error:
[ 0 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (align_down+0x0) [0x122510]
[ 1 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (objfile_data+0x69) [0xa7a93]
[ 2 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (dwarf2_frame_find_fde+0x33) [0xe0565]
[ 3 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (dwarf2_frame_sniffer+0x2e) [0xe1015]
[ 4 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (frame_unwind_find_by_frame+0x3b) [0x129e5d]
[ 5 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (get_prev_frame+0x63) [0x129270]
[ 6 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (do_check_is_thread_unsafe+0x195) [0x3ed42]
[ 7 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (catch_errors+0x4d) [0x7ae0e]
[ 8 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (safe_check_is_thread_unsafe+0x69) [0x3edd2]
[ 9 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (iterate_over_threads+0x24) [0x78e7e]
[ 10 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (check_safe_call+0xe4) [0x3eecb]
[ 11 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (mi_cmd_stack_check_threads+0x292) [0x12873]
[ 12 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (captured_mi_execute_command+0x16d) [0x1766f]
/SourceCache/gdb/gdb-962/src/gdb/objfiles.c:2218: internal-error: objfile_data: Assertion `data->index < objfile->num_data' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

The Debugger has exited with status 1.

 Big Laff
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic