Lion Bugs!

Archives Forums/BlitzMax Bug Reports/Lion Bugs!

marksibly(Posted 2012) [#1]
Hi,

Ok, I've spent the whole day hacking at this and I think I have the array and ogg bugs in Lion BlitzMax sorted.

The issues are caused by the new llvm C/C++ compilers in xcode 4.2.1, which do some things a bit differently, and seem to have a few bugs. If you only use modules built pre-4.2.1 the issues aren't there.

I've managed to fixed the issue with arrays, and (amazingly) I stumbled on a fix for ogg in about 5 minutes - long live stack overflow!

http://stackoverflow.com/questions/7721118/mac-osx-intel-llvm-assembler-bug-causes-vorbis-ogg-loader-to-crash

Anyway, update out tomorrow - I've had enough for today.

Last edited 2012


skidracer(Posted 2012) [#2]
I 2 love stack overflow.

Boo to LLVM for the bugs in their rocket ship compilers.


GfK(Posted 2012) [#3]
I hope my game will compile in 1.46/Lion now. :D


Qcat(Posted 2012) [#4]
This has made my day! I have the next few days off work for some coding time: D

Thanks Mark


JoshK(Posted 2012) [#5]
Thank you, I appreciate all the effort you had to make for Lion. Seems like there was quite a few changes under the hood.


Grey Alien(Posted 2012) [#6]
Yep thanks Mark, sounds like it was a big pain, but well worth doing.


marksibly(Posted 2012) [#7]
Hi,

Ok V1.46 for MacIntel is now up.

This fixes the array and ogg issues, at least as I could reproduce them.

It's quite possible there will be more issues like this. I gave things a reasonably good thrashing, but of course there is far more code 'out there' that I can't test. If you do find something apparently Lion-related, please check if it also happens in V1.45. If it does, then it's probably not LLVM related, else it could be.

Note that this release still depends on the 10.6 SDK. I had a quick play with the new fullscreen stuff, but it's not gonna be an easy fix since apps still have to run on pre-10.6 OSs. Will return to this later, once LLVM are sorted.

Last edited 2012


Grey Alien(Posted 2012) [#8]
Awesome, thanks Mark!


Armitage 1982(Posted 2012) [#9]
I don't understand.
Is this only happening with 1.46 ? Cause with 1.44 everything seem's running correctly under Lion (I'm using ogg and arrays too).

I'm in the middle of a very important release. Some feedback would be awesome.

Also, the sound driver is a complete nightmare under Linux. OpenAL mute after 3 songs, Freeaudio doesn't work and I read that Pulse Audio (through working for me) is a problem on some system.

Can you do something about it please ? I'm stuck with Linux :(


marksibly(Posted 2012) [#10]
Hi,

It's an XCode 4.2.1 issue (I think). This is where the llvm based compilers seem to have changed significantly.

Also, it's related to the C/C++ compilers, so even if you've got XCode 4.2.1 installed you probably wont have any problems unless you rebuild modules or import some C code into your app.

Last edited 2012


Armitage 1982(Posted 2012) [#11]
Thanks for the information Mark.
I'm glad I sticked to 4.1 when I started to use BM on a Mac Os X Lion.

Audio seem's to be a rather complex area...

Last edited 2012


ElectricBoogaloo(Posted 2012) [#12]
awww.. :(

I'm still getting that annoying crash thing.

Everything seems ok when compiling, but opening the game will do one of three things (seemingly at random)
1. Game opens, happy time.
2. Game ... .... .... waits about a minute with the mouse cursor spinning like crazy, hard drive going bananas for a bit, but then it opens. happy time. but annoying.
3. "[app name here] quit unexpectedly" with a gigantic error message.

At that point, you can close the app (if it even opened in the first place) attempt to reopen it, and get a completely different result entirely at random!
D'oh!!

Having just installed this fix, I naturally began to worry that it was actually my rubbishy rubbishy coding style to blame, so I went into the examples to give them a whirl, just incase..

Same thing.

:( doubly sad face :(

If it helps, the audio's been fine, as long as I ignore OpenAL (which has always been the case.)

Any tips/pointers?


Grey Alien(Posted 2012) [#13]
Holiday Bonus now compiles and runs fine on my Lion system (Macbook Air with XCode 4.2). It's quite a big project with custom modules so that's encouraging, although I'm using FreeAudio.


marksibly(Posted 2012) [#14]
Hi,

> I went into the examples to give them a whirl, just incase..

If you can't even run the samples, it's likely to be something to do with your setup.

Can you even compile/run a simple 'Hello World'?

What do you mean by 'ignore OpenAL'?

Are you using XCode 4.2.1?


ElectricBoogaloo(Posted 2012) [#15]
Hello World is doing the same 3 random things listed above, so yeah, it's probably a setup thing.

Since getting the MacMini I've installed..
A) About 17gazillion versions of XCode for all the stupid iOS betas.
B) VLC, BlitzMax, Gimp(with XWindow wotsit) and Chrome
C) .. that's probably about it!
Haven't really been "using" the Mac, it's more of a fancy Compiler Box.

XCode wise i have both 4.2.1 installed from the AppStore, and the latest 4.3 version in here, too. [edit : Can't appear to download 4.2.1 on it's own, so AppStore edition it be!]

I'm guessing then, it's either of two things.. (either that or either of 18,000!)

Either the AppStore install wasn't happy, or the thing's not happy having both the 4.2.1 AND the 4.3 installed.
Right?
Maybe?

*shrugs*

I'll mess about in the morning, and see what does/doesn't happen.

(Ignore OpenAL = My template is setup to auto-select anything other than OpenAL whenever it's on a Mac. The Mac's always done that "stops after about 40-odd plays of audio" thing, in my experience.)

Last edited 2012


ElectricBoogaloo(Posted 2012) [#16]
OK, it's playing happily now. (So far.. I think!)
It was temperamental for a while, but something seems to have calmed it down a bit.

Here's what I did, in a somewhat approximate order.
1) Uninstalled every single XCode that's on here..
"sudo /Developer/Library/uninstall-devtools –mode=all"
That removed the main bit, then I deleted the Developer_old, and Developer_beta, and other bits and pieces.
This inexplicably managed to free up over 20Gb of HD space. To be frank, that scared the bejesus out of me!

*Restart*

2) Install 4.2.1 from AppStore

*Restart*

Rebuild modules, test a compile, same issue.

3) Installed 4.3 from dev-site
Restart, rebuild, same.

4) At this point I kinda lapsed a bit, and basically threw in whatever I could find..
"sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2" and "sudo ln -s /usr/bin/g++ /usr/bin/g++-4.2" from a topic on here. I didn't think that'd do it, since I didn't actually have a "Can't rebuild modules" issue. But hey, worth a try, right?

I also switched the compiler to not "Build GUI App"..
Now I'm not 100,000% convinced that this is what's fixed it, on account of that's a really odd thing to have fixed it, but that IS the last thing I tried!

Compile : Worked..
Switched the "Build GUI App" back.. Still worked.
Odd, quirky, and I'm pretty sure it must've been something earlier on, but I was half asleep and kinda thwacking the thing at that point, in the hopes that something would magically work.

Seems to have magically worked..

I'm guessing it was those two sudo lines, though.

Just for good measure, I tested an old compile, and sure enough the new apps "just run" whereas the old compiled apps still do the 3-ways-to-break thing.. So it's definitely a case of Compiler break, as opposed to being something on the system breaking the app after-compile.

If it helps, at all, this is a compiled testy thing from before the inexplicable fix.
Print "My Giraffe is Hiding"
I'm not sure you can figure anything out from that, but there it is anyway.
Be warned : If it does "Crash #2", it does take a while!

Now to leave it for a few hours, hope it still works later, and then retry iOS compiling and hope that's not all stuffed up, too!

Thanks, Mark! (for both the fixes, and the whole Blitz wonderland in the first place!)