theacodes / PhoenixCore

An experimental 2D optimizing rendering system built with OpenGL
Other
25 stars 5 forks source link

boost::intrusive_ptr is broken in GCC 4.7+ #4

Closed stonedcoldsoup closed 11 years ago

stonedcoldsoup commented 11 years ago

While the source of the issue is not in PhoenixCore, the fact remains that it is unlikely for boost to adapt for newer compilers right away. The unqualified calls which make intrusive_ptr work are no longer valid C++.

stonedcoldsoup commented 11 years ago

It now compiles and runs correctly except for a runtime exception upon closing any PhoenixCore app:

what():  boost thread: thread not joinable: The device does not recognize the command

Any clue as to what may be causing this? I get the feeling that it could just be my build of the boost thread library, it took a bit of fighting to get boost itself to build correctly on my machine.

stonedcoldsoup commented 11 years ago

Apparently boost threads (as of boost 1.52 or boost threads 3) will throw an exception if join is called on a non-joinable thread. The fix is to simply check to make sure it's okay to join the thread before actually calling join. Implementing now.

stonedcoldsoup commented 11 years ago

Fixed all GCC 4.7 issues, fixed all boost 1.52 issues. Fixes are backwards compatible. (please merge)