Mac Binary Release - Page 17

Mac Binary Release

Discuss everything related to compiling and running Spring on Mac OS X.

Moderator: Moderators

User avatar
Echrei
Posts: 33
Joined: 01 Feb 2007, 07:13

Re: Mac Binary Release

Post by Echrei »

Yeah, it crashes for me. Here's the log.

Mac specific paths added to search list
Using read-only data directory: /Applications/Games/Spring/Spring.app/Contents/Resources/
Using read-write data directory: /Applications/Games/Spring/
SDL: 1.2.13
GL: 2.0 ATI-1.5.18
GL: ATI Technologies Inc.
GL: ATI Radeon X800 XT OpenGL Engine
GLEW: 1.4.0
Using script GlobalAI test (AAI.dylib)
Map: SmallDivide.smf
Mod: "Balanced Annihilation V6.0" from BA60.sd7
Content error: Circular dependency

1/7/08 8:43:44 PM [0x0-0x121121].com.clan-sy.spring.Spring[9218] Incorrect/Missing content: Circular dependency
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Mac Binary Release

Post by aegis »

have you tried it with different mods?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Mac Binary Release

Post by Tobi »

Remove FF.
User avatar
Stealth870
Posts: 166
Joined: 13 Sep 2004, 00:25

Re: Mac Binary Release

Post by Stealth870 »

Well, I will do more thorough testing later today, but I started Fibre without any issues, and CA as well. I wish I could figure out where the settings are though so I can make it look better. :P
Commander
Posts: 21
Joined: 27 Dec 2007, 22:02

Re: Mac Binary Release

Post by Commander »

OK, I found the problem, being these two lines:

Code: Select all

S3OHeader header;
memcpy(&header,fileBuf,sizeof(header));
This is a no-go in cross platform development. Loading a file stored in little endian format on a big endian machine this way will lead to corrupted values.

I hope there are some endian conversion facilities in the spring source somewhere.

So currently, only Mods not using s3o units will work on PPC Macs like mine. AASpring 2.23 is such a mod, which was the only one I tested before.

Settings are stored in /Users/<yourusername>/Library/Preferences/com.clan-sy.spring.Spring.plist
This file can be opened with the Property List Editor (simply double click). A partial list of possible options is here. I'll attempt to provide the SpringSettings app in the future.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Mac Binary Release

Post by Kloot »

Commander wrote: I hope there are some endian conversion facilities in the spring source somewhere.
There are, look at the System/Platform/byteorder.h macro's.
User avatar
Echrei
Posts: 33
Joined: 01 Feb 2007, 07:13

Re: Mac Binary Release

Post by Echrei »

I'm on a PowerMac G5 and tried the mod Absolute Annihilation 2.23. I'm still getting the circular dependency error. Which script are you using?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Mac Binary Release

Post by Tobi »

Tobi wrote:Remove FF.
that will fix it
User avatar
Echrei
Posts: 33
Joined: 01 Feb 2007, 07:13

Re: Mac Binary Release

Post by Echrei »

Now I got this far.

Mac specific paths added to search list
Using read-only data directory: /Applications/Games/Spring/Spring.app/Contents/Resources/
Using read-write data directory: /Applications/Games/Spring/
SDL: 1.2.13
GL: 2.0 ATI-1.5.18
GL: ATI Technologies Inc.
GL: ATI Radeon X800 XT OpenGL Engine
GLEW: 1.4.0
Using script Air combat test
Map: SmallDivide.smf
Mod: "Absolute Annihilation 2.23" from AASS223.sdz
Became player 0
Using script Air combat test
Using script Air combat test
Map: SmallDivide.smf
Mod: "AASS223.sdz" from AASS223.sdz
Client connected on slot 0 (wanted number was 0)
Connecting to server
OpenAL: 1.1
OpenAL: AL_EXT_OFFSET AL_EXT_LINEAR_DISTANCE AL_EXT_EXPONENT_DISTANCE AL_EXT_float32 AL_EXT_STATIC_BUFFER
Commander
Posts: 21
Joined: 27 Dec 2007, 22:02

Re: Mac Binary Release

Post by Commander »

Echrei wrote:Now I got this far.
...
Did you notice the "Send report to Apple blah blah"-dialog appear? If so, open the report, do NOT send it to Apple, but copy the log, paste it into a text file and append it to a post here in the forums.

If no dialog appeared, please open a terminal and enter "/Applications/Games/Spring/Spring.app/Contents/MacOS/Spring" without the quotes and press Enter. Post here what appears there after issueing the command.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Mac Binary Release

Post by Tobi »

Commander wrote:OK, I found the problem, being these two lines:

Code: Select all

S3OHeader header;
memcpy(&header,fileBuf,sizeof(header));
This is a no-go in cross platform development. Loading a file stored in little endian format on a big endian machine this way will lead to corrupted values.

I hope there are some endian conversion facilities in the spring source somewhere.
There is some pattern in Spring where the header is read that way, and then the individual fields of the header are swabbed using the macro's in byteorder.h (I prefer adding a swab method to the structure that does this for all fields). This would be the easy way to do it.

Better, but more work, would be to extend CFileHandler with endian aware functions like ReadInt, ReadFloat, ReadShort (and equivalent for writing), and use those. (and maybe even convert all places in Spring where it's done differently to this method :P)
User avatar
Echrei
Posts: 33
Joined: 01 Feb 2007, 07:13

Re: Mac Binary Release

Post by Echrei »

Here's the output from the terminal upon the closing of the app.
cursornormal Missing default cursor

It didn't crash as per OSX terms, so there was no crash report.
Exited with exit code: 255
User avatar
DandyGnome
Posts: 61
Joined: 25 Jun 2007, 06:43

Re: Mac Binary Release

Post by DandyGnome »

I managed to give your release a quick try on my Core2Duo MBP. I was able to start a game using Nanoblobs v.64 on the map Chess_b2. The game crashed when I brought a Knight close to the enemy commander's probable location but I did not save the crash report so I will try to duplicate this when I have time. I also noticed that the build pics still do not appear. I will test more later, RL permitting.
Thanks
Commander
Posts: 21
Joined: 27 Dec 2007, 22:02

Re: Mac Binary Release

Post by Commander »

Echrei wrote:Here's the output from the terminal upon the closing of the app.
cursornormal Missing default cursor

It didn't crash as per OSX terms, so there was no crash report.
Exited with exit code: 255
You are missing the OTA content files. See here on how to get it. Put it into "base" inside the Spring folder.

TODO: :mrgreen:
- Make error messages appear in a nice Mac dialog.
- Write installation instructions
kiwi-flyer
Posts: 9
Joined: 09 Feb 2007, 10:25

Re: Mac Binary Release

Post by kiwi-flyer »

Good to see this back in development, Thanks Commander :)

Just downloaded the latest version and played for about twenty mins , AI was active and everything else running smoothly, did get a crash at the end though.
Was using a Spring 1944 mod, will give it go with some others too but unknown-files seems to be down at the moment.
User avatar
Stealth870
Posts: 166
Joined: 13 Sep 2004, 00:25

Re: Mac Binary Release

Post by Stealth870 »

Well, I tried enabling all the Lua options but now the game gives me a black screen and freezes my system. :P Must figure that out...
User avatar
Echrei
Posts: 33
Joined: 01 Feb 2007, 07:13

Re: Mac Binary Release

Post by Echrei »

You are missing the OTA content files. See here on how to get it. Put it into "base" inside the Spring folder.
Thank you, sorry for my ignorance. Works now. Thanks!
Commander
Posts: 21
Joined: 27 Dec 2007, 22:02

Re: Mac Binary Release

Post by Commander »

Tobi wrote:There is some pattern in Spring where the header is read that way, and then the individual fields of the header are swabbed using the macro's in byteorder.h (I prefer adding a swab method to the structure that does this for all fields). This would be the easy way to do it.
Can you point out an example of where you do it that way with the method? I only found lots of strange macroisms.
Tobi wrote: Better, but more work, would be to extend CFileHandler with endian aware functions like ReadInt, ReadFloat, ReadShort (and equivalent for writing), and use those. (and maybe even convert all places in Spring where it's done differently to this method :P)
That's how I do it in my own projects. Unfortunately, my spare time is quite limited right now, but I can provide some finished methods if you want to try :mrgreen:
User avatar
Echrei
Posts: 33
Joined: 01 Feb 2007, 07:13

Re: Mac Binary Release

Post by Echrei »

If I turn up the game speed, as the game goes on, it takes longer for my mouse clicks and keyboard commands to be recognized. I also keep getting the message that syncing is turned off. Unit icons in build menus would also be helpful.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Mac Binary Release

Post by Tobi »

Commander wrote:
Tobi wrote:There is some pattern in Spring where the header is read that way, and then the individual fields of the header are swabbed using the macro's in byteorder.h (I prefer adding a swab method to the structure that does this for all fields). This would be the easy way to do it.
Can you point out an example of where you do it that way with the method? I only found lots of strange macroisms.
rts/System/demofile.h
rts/Game/Player.h
rts/Map/SMF/mapfile.h (bit nastier because it uses #defines instead of methods)
Post Reply

Return to “Mac OS X”