iDevGames Forums
CubeX: Porting discussions - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Tools & Technology (/forum-10.html)
+--- Thread: CubeX: Porting discussions (/thread-7515.html)

Pages: 1 2


CubeX: Porting discussions - JeroMiya - Oct 30, 2002 01:25 PM

This thread is for issues related to the CubeX port. Please use this thread for questions and comments about the port, as well as feedback.
CubeX test build is available at:
homepage.mac.com/jeremybell/FileSharing.html
Instructions for building and running are included. Let me know if you have any questions.


CubeX: Porting discussions - OneSadCookie - Oct 30, 2002 06:27 PM

I downloaded & recompiled the new enet source, but it hasn't changed anything multiplayer-wise. Guess more debugging is required here...


CubeX: Porting discussions - JeroMiya - Oct 30, 2002 06:39 PM

One explanation may be that the Linix/Win32 server only allows the prebuilt clients that the cube distribution comes with. This is to prevent cheating. I think we'll need to set up our own server, and disable the client check while we're debugging.


CubeX: Porting discussions - OneSadCookie - Oct 30, 2002 07:32 PM

I can certainly run a server. The question will be finding a time when we can be online together Smile

Do you know where that test would be?

Send me an email (my forum user name at hotmail.com) with an ICQ number or an email address or some more immediate way of communicating, and I'll try & get in touch when I get home tonight.


CubeX: Porting discussions - OneSadCookie - Oct 31, 2002 05:06 PM

Just successfully played a network game between two Macintosh clients here. Works well :-)

The Linux client couldn't connect, though. Dunno what's up there Huh


CubeX: Porting discussions - JeroMiya - Oct 31, 2002 11:26 PM

Sweeeet!

OK... so networking code is probably fine.



You said that the app was crashing when doing texture related operations... do you think it might be related to zlib/libpng/SDL_image? What versions are you using?


CubeX: Porting discussions - OneSadCookie - Nov 1, 2002 12:39 AM

I'm using the latest SDL_image from http://www.libsdl.org, and the system zlib. I'm not using libPNG at all.

The crash isn't related to one particular texture, I've seen many different ones crash.

I've checked the parameters to gluBuild2DMipmaps each time I've crashed in the debugger, and never seen anything amiss.


CubeX: Porting discussions - JeroMiya - Nov 1, 2002 11:11 PM

Yeah.. so I tested the engine on some PowerMacG4's here at the library and surprisingly, NONE of the maps (sans 32, which still crashes) crash, froze, or caused any problems whatsoever. I got a little pseudo-lan game going between two of the PowerMacs, and played against myself... networking code seems fine too.


CubeX: Porting discussions - JeroMiya - Nov 2, 2002 01:21 AM

Heh, here are a couple entries of the crash log for cubex. How do I interpret this?
The first one seems to be the same image library loading crashes you're getting, while the second one definately looks like a thread sync bug of some kind with the fmod and SDL libraries.

Code:
Date/Time:  2002-10-28 12:24:56 -0500
OS Version: 10.2.1 (Build 6D52)
Host:       (Unknown)

Command:    Cube
PID:        1175

Exception:  EXC_BREAKPOINT (0x0006)
Code[0]:    0x00000001Code[1]:    0x8fe01280

Thread 0 Crashed:
#0   0x8fe01280 in halt
#1   0x8fe081f8 in validate_library
#2   0x8fe08444 in is_library_loaded_by_stat
#3   0x8fe02f48 in load_library_image
#4   0x8fe06134 in load_images_libraries
#5   0x8fe05b28 in load_dependent_libraries
#6   0x8fe026f4 in load_executable_image
#7   0x8fe01410 in _dyld_init

PPC Thread State:
  srr0: 0x8fe01280 srr1: 0x0002f030                vrsave: 0x00000000
   xer: 0x20000000   lr: 0x8fe0a064  ctr: 0x8fe294f0   mq: 0x00000000
    r0: 0x00000004   r1: 0xbffff960   r2: 0x44004280   r3: 0x000000d4
    r4: 0x00000000   r5: 0x000000d4   r6: 0x0000000a   r7: 0x00000000
    r8: 0x76657273   r9: 0x00000000  r10: 0xbffff72b  r11: 0x00000000
   r12: 0x8fe71afb  r13: 0x00000000  r14: 0x000023dc  r15: 0x00000000
   r16: 0xbffffd14  r17: 0x00000001  r18: 0x00001504  r19: 0x00002014
   r20: 0x00000001  r21: 0x00000000  r22: 0x00000000  r23: 0x00000000
   r24: 0x001f231c  r25: 0x001869e0  r26: 0x00000057  r27: 0x00000000
   r28: 0x001869e0  r29: 0x00000001  r30: 0x8fe484d8  r31: 0x8fe09ecc

**********

Date/Time:  2002-10-30 01:55:57 -0500
OS Version: 10.2.1 (Build 6D52)
Host:       (Unknown)

Command:    Cube
PID:        403

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x0233b000

Thread 0 Crashed:
#0   0x909a3734 in _glTessErrorString(int)
#1   0x02332000 in 0x2332000
#2   0x909aa2e0 in gluBuild2DMipmapsCTXCore(_CGLContextObject*, unsigned long, long, long, long, long, long, unsigned long, unsigned long, long, long, long, void const*)
#3   0x909aaf8c in gluBuild2DMipmapsCTX
#4   0x0001e2a4 in installtex(int, char*, int&, int&, bool)
#5   0x0001e7a8 in lookuptexture(int, int&, int&)
#6   0x000181e4 in render_flat(int, int, int, int, int, sqr*, sqr*, sqr*, sqr*, bool)
#7   0x00031880 in render_seg_new(float, float, float, int, int, int, int, int)
#8   0x0003171c in render_seg_new(float, float, float, int, int, int, int, int)
#9   0x0003171c in render_seg_new(float, float, float, int, int, int, int, int)
#10  0x0003171c in render_seg_new(float, float, float, int, int, int, int, int)
#11  0x0003171c in render_seg_new(float, float, float, int, int, int, int, int)
#12  0x0003171c in render_seg_new(float, float, float, int, int, int, int, int)
#13  0x000330ac in render_world(float, float, float, float, int, int, float, int, int)
#14  0x0001f6fc in gl_drawframe(int, int, float, float)
#15  0x00012c24 in SDL_main
#16  0x00004c7c in -[SDLMain applicationDidFinishLaunching:]
#17  0x907eaf7c in _nsNotificationCenterCallBack
#18  0x90168b18 in _postNotification
#19  0x90166238 in _CFNotificationCenterPostLocalNotification
#20  0x930c9898 in -[NSApplication _sendFinishLaunchingNotification]
#21  0x930c0060 in _requiredAEEventHandler
#22  0x91b56e4c in aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned long, unsigned char*)
#23  0x91b597f0 in dispatchEventAndSendReply(AEDesc const*, AEDesc*)
#24  0x91b56d5c in aeProcessAppleEvent
#25  0x92c82d30 in AEProcessAppleEvent
#26  0x93082350 in _DPSNextEvent
#27  0x930ccf84 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#28  0x930ca500 in -[NSApplication run]
#29  0x00004bcc in CustomApplicationMain
#30  0x00004fd4 in main
#31  0x000042c8 in _start (crt.c:267)
#32  0x00004148 in start

Thread 1:
#0   0x90025e8c in select
#1   0x30008310 in SDL_Delay
#2   0x30008374 in RunTimer
#3   0x300258d4 in SDL_RunThread
#4   0x30027694 in RunThread
#5   0x90021428 in _pthread_body

Thread 2:
#0   0x90074328 in mach_msg_trap
#1   0x90006670 in mach_msg
#2   0x901490a8 in __CFRunLoopRun
#3   0x9018157c in CFRunLoopRunSpecific
#4   0x905e2d90 in XIOAudioDeviceManager::NotificationThread(XIOAudioDeviceManager*)
#5   0x905e2cac in CAPThread::Entry(CAPThread*)
#6   0x90021428 in _pthread_body

Thread 3:
#0   0x90042d68 in semaphore_timedwait_signal_trap
#1   0x9003ef94 in _pthread_cond_wait
#2   0x905d2c34 in CAGuard::WaitFor(unsigned long long)
#3   0x905d26c8 in CAGuard::WaitUntil(unsigned long long)
#4   0x905d19c0 in XThreadedDevice::IOThread()
#5   0x905e9528 in XThreadedDevice::IOThreadEntry(void*)
#6   0x905e2cac in CAPThread::Entry(CAPThread*)
#7   0x90021428 in _pthread_body

Thread 4:
#0   0x90042288 in mach_wait_until
#1   0x90264834 in MPDelayUntil
#2   0x00050cb0 in FSOUND_Time_Sleep
#3   0x00056b84 in FSOUND_Stream_UpdateThread
#4   0x9025e538 in PrivateMPEntryPoint
#5   0x90021428 in _pthread_body

PPC Thread State:
  srr0: 0x909a3734 srr1: 0x0000f930                vrsave: 0x00000000
   xer: 0x00000000   lr: 0xbfffdec0  ctr: 0x00000000   mq: 0x00000000
    r0: 0xbfffdec0   r1: 0xbfffde80   r2: 0x02332000   r3: 0x00000000
    r4: 0x0000007f   r5: 0x0233b000   r6: 0x0233aee0   r7: 0x43300000
    r8: 0x43300000   r9: 0x90a030e8  r10: 0x00000000  r11: 0x0233b000
   r12: 0x00000080  r13: 0x00008ee0  r14: 0x00003f80  r15: 0x00000000
   r16: 0x00000000  r17: 0x00000001  r18: 0x00000000  r19: 0x0000007f
   r20: 0x02308000  r21: 0x00000080  r22: 0x00000080  r23: 0x02332000
   r24: 0x00000080  r25: 0x00000000  r26: 0x00000120  r27: 0x00000003
   r28: 0x00000003  r29: 0x0000005f  r30: 0x00000001  r31: 0x909a30e8



CubeX: Porting discussions - OneSadCookie - Nov 2, 2002 03:09 AM

The first one looks like it couldn't link to a dynamic library or framework at launch time -- nothing serious there, I'm guessing that was generated when you were still trying to get the game to work.

The second one is the crash I'm seeing with the image loading (gluBuild2DMipmaps called from installtex()). The functions at the tops of the other threads' stacks are all perfectly normal places to be.

It's weird how gluBuild2DMipmaps ends up calling _glTessErrorString -- that doesn't sound like the kind of function that should be called by gluBuild2DMipmaps!


CubeX: Porting discussions - JeroMiya - Jan 25, 2003 02:20 AM

Attempting a recompile with the december dev tools and using 10.2.3. Also using some tips from the Unix porting guide from Apple. Wish me luck!

Just out of curiosity, how many of you would be interested in using CubeX as the basis for an original Mac game?


CubeX: Porting discussions - OneSadCookie - Jan 25, 2003 05:04 AM

10.2.3 vastly improves the gluBuild2DMipmaps crash, though it doesn't quite eliminate it.

I haven't tried the midis that weren't working before...


CubeX: Porting discussions - psychlonex - Feb 21, 2003 08:26 PM

Hey all -
I'm pretty new to cocoa in general, spending the past few weeks or so trying to get my head around it. I'm trying to play with the CubeX posted at the top of this thread, but running into tons of build errors. I won't list them all unless someone wants to see them, but I'm just wondering if there is a detailed how-to for getting it to build? (dumbed down for a complete newbie) I'm guessing I'm missing some essential package, the first error I get is:

fmod.h: No such file or directory

I'm suspecting that the rest of the errors are related to this file not being found? I've downloaded and installed both SDL_Image and SDL devel. packages, am I missing something else? Enet built successfully without any complaints.

Thanks in advance! Looking forward to visiting this site often! Even saw a few names from some other forums (flashkit?) that I frequent... woohoo!

Psx


CubeX: Porting discussions - OneSadCookie - Feb 22, 2003 04:41 AM

If you need fmod.h, go to http://www.fmod.org/ and download the Mac SDK.

I while back I promised to post a current build; I haven't done that. Maybe tomorrow...

[edit]Aww man that'd be today; has been for 41 minutes now. ZZZ [/edit]


CubeX: Porting discussions - psychlonex - Feb 22, 2003 07:52 AM

Thanks, I'll try that. I didn't see any info on installing fmod, I'm gonna guess I can just put it in the same dir as the project?

[edit] I just tried it, though I'm lost as to where to put the fmod files. I added just the api folder to the project, and it stopped most of my errors but still no love:

"multiple definitions of symbol_main"
... 6 more of the same, "my_close, my_open..etc"

then the last:
"can't locate file for: -lfmod_cfm"

[/edit]

Thanks again
Psx