Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML crash on MacOS 10.6  (Read 17177 times)

0 Members and 2 Guests are viewing this topic.

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
SFML crash on MacOS 10.6
« on: January 28, 2013, 09:10:03 am »
How to fix this ? On 10.7, 10.8 everything is Ok.
0 libstdc++.6.dylib 0x0000000101aca002 0x101aca000 + 2
1 Module 0x000000010078915f sf::VideoMode::isValid() const + 15
2 Module 0x0000000100789f47 sf::Window::create(sf::VideoMode, std::string const&, unsigned int, sf::ContextSettings const&) + 215

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: SFML crash on MacOS 10.6
« Reply #1 on: January 28, 2013, 09:25:28 am »
How exactly did you compile SFML and which revision are you using ? Also, how did you install / ship SFML with you application ?
SFML / OS X developer

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: SFML crash on MacOS 10.6
« Reply #2 on: January 28, 2013, 09:29:21 am »
sfml complied with garbage collector, target 10.5, static linking, latest sdk 10.8

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: SFML crash on MacOS 10.6
« Reply #3 on: January 28, 2013, 09:34:31 am »
Quote
and which revision are you using
SFML / OS X developer

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: SFML crash on MacOS 10.6
« Reply #4 on: January 28, 2013, 09:40:03 am »
hard to tell, it's old, but there is no changes in video mode implementation for almost a year.

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: SFML crash on MacOS 10.6
« Reply #5 on: January 28, 2013, 09:49:07 am »
also i ship  libstdc++.6.dylib with application, with fixed loading path

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: SFML crash on MacOS 10.6
« Reply #6 on: January 28, 2013, 09:53:37 am »
First, it's not recommended to use static linking on Unixes (like OS X). There might be something subtle here with the compilation flags too.

Can you gather more information about the crash ? Use a debug version of SFML and print the VM for example.

Finally, get the last sources. Maybe it won't change a thing here but I prefer to be sure that it's not an bug already fixed somehow.

EDIT: Ho, and, BTW, you never told me exactly how you modified SFML to use GC. Maybe the issue lies here.
SFML / OS X developer

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: SFML crash on MacOS 10.6
« Reply #7 on: January 28, 2013, 10:10:25 am »
Maybe i will get a 10.6 mac today, to get more information. We are working with 10.7 and 10.8.
I can use dylibs, but not sure if it will change something, also we use sndfile compiled from sources with flac and ogg manualy. (some strange bug that xcode can't find framework  ???)
I can send you the copy of sfml we are using.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: SFML crash on MacOS 10.6
« Reply #8 on: January 28, 2013, 10:27:02 am »
Quote
also we use sndfile compiled from sources with flac and ogg manualy.
The sndfile binary provided by SFML is 1.0.24, with ogg / vorbis / flac support, works on 10.5, both 32 & 64 bits.

Quote
some strange bug that xcode can't find framework
You should not build SFML with Xcode. There are too many issues with cmake. Use makefile instead (as stated in the tutorial).

Quote
I can send you the copy of sfml we are using.
The best would be a fork on github.
SFML / OS X developer

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: SFML crash on MacOS 10.6
« Reply #9 on: January 28, 2013, 10:43:55 am »
Quote
also we use sndfile compiled from sources with flac and ogg manualy.
The sndfile binary provided by SFML is 1.0.24, with ogg / vorbis / flac support, works on 10.5, both 32 & 64 bits.
take a look : http://en.sfml-dev.org/forums/index.php?topic=10248.msg70494

Quote
some strange bug that xcode can't find framework

You should not build SFML with Xcode. There are too many issues with cmake. Use makefile instead (as stated in the tutorial).
SFML don't have to be linked with libsndfile

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: SFML crash on MacOS 10.6
« Reply #10 on: January 28, 2013, 11:28:54 am »
SFML is linked against libsndfile : https://github.com/SFML/SFML/blob/master/src/SFML/Audio/CMakeLists.txt#L41-L52

However your project doesn't need to be linked against libsndfile if you're using SFML as dylibs/frameworks. (That's one of the reason why static linking is not recommended.)

Anyway, that's not the current issue. Tell me when you have more data.

SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: SFML crash on MacOS 10.6
« Reply #11 on: January 28, 2013, 09:29:41 pm »
sfml complied with garbage collector, target 10.5, static linking, latest sdk 10.8
Isn't it the important point?
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: SFML crash on MacOS 10.6
« Reply #12 on: January 28, 2013, 10:49:33 pm »
From what I understood of target/sdk it's the correct way of doing it.

I could run on Leopard an application targeting 10.5 with 10.8 SDK, linked against SFML build for 10.5 (both SDK and target) so this configuration should be ok.

But maybe the static linking mess things up ?
SFML / OS X developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: SFML crash on MacOS 10.6
« Reply #13 on: January 28, 2013, 10:57:03 pm »
Hmm I'm not that much convinced...

From my understanding, the target OS tells which instructions are allowed in the final binary, like dyld load codes and such. Whereas the SDK controls the compilation step including the
Code: [Select]
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060that is in the OS X implementation of VideoMode. Obviously this section will not be enabled because he's using the 10.8 SDK although it should probably be used here.
Want to play movies in your SFML application? Check out sfeMovie!

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: SFML crash on MacOS 10.6
« Reply #14 on: January 28, 2013, 11:09:30 pm »
You might be right. Here are some interesting facts : https://developer.apple.com/library/mac/#documentation/developertools/conceptual/cross_development/Configuring/configuring.html (but I'm too tired to focus right now :-° )

In any case, the crash occurs on 10.6, so the conditional build settings should not be an issue as both code would work. No ?
SFML / OS X developer