Author Topic: Enough Segmentation.  (Read 6980 times)

Offline Yankes

  • Commander
  • *****
  • Posts: 3209
    • View Profile
Re: Enough Segmentation.
« Reply #15 on: January 18, 2018, 08:31:49 pm »
My version do not print stack race because is compiled by GCC and stack trace print is handled by Windows that use bit different mechanism.
I read that is possible to configure GCC to output code that could be stack track by windows but I never have time to do it.
If compiled by VS then showing stack track will be easy, because MS can handle it own stuff.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: Enough Segmentation.
« Reply #16 on: January 18, 2018, 10:22:26 pm »
That's not possible... an application can be compiled either in Release mode or in Debug mode... not both.
Easy, if you select a different option in the menu, when you exit the menu it will restart and recompile the game. It would be similar to changing mods, except it might take longer.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8627
    • View Profile
Re: Enough Segmentation.
« Reply #17 on: January 18, 2018, 10:29:54 pm »
...when you exit the menu it will restart and recompile the game...

That doesn't even make sense. Just believe me, it's really not possible.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Enough Segmentation.
« Reply #18 on: January 18, 2018, 10:31:15 pm »
Easy, if you select a different option in the menu, when you exit the menu it will restart and recompile the game. It would be similar to changing mods, except it might take longer.

First off, compiling takes extra software (a compiler!) and the libraries necessary to run the code. Then, recompiling from scratch can take 10-30 minutes, depending on your computer. Then you need a debugger to work in concert with the debug exe. Easier to just make your own debug exe and run it yourself when you crash.

Thanks for the correction Meridian and Yankes, perhaps we need to improve the backtrace for all systems - it's never been useful to me.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2160
    • View Profile
Re: Enough Segmentation.
« Reply #19 on: January 20, 2018, 07:25:07 am »
As I said in the beginning, I am no C++ expert, I don't know how to configure this... but if anyone can help... I'll be happy to merge the change into OXCE+ repo(s).
As Yankes mentioned, it depends on how you compile it. Producing stack traces in C++ is a very difficult platform-specific affair and I worked really hard to get it to work. If you use GCC/Clang with debug info, or Visual Studio with PDB, then the executable can generate stack traces. Other platforms like Android would require their own code.

Sadly, most people use the nightly builds which are compiled with MinGW, which can't produce stack traces due to Windows/Linux debug format differences. The only solutions involve bulky third-party libraries that I didn't wanna deal with.