August 14, 2018, 10:10:43 AM

Author Topic: BlitzMax NG (macOS) - program crashes in x64 but not x86.  (Read 246 times)

Offline wombats

  • Jr. Member
  • **
  • Posts: 19
BlitzMax NG (macOS) - program crashes in x64 but not x86.
« on: June 05, 2018, 09:15:24 PM »
As per the title...my program crashes shortly after starting in x64 but not x86.

Using macOS High Sierra 10.13.5 with Xcode 9.4.

Any idea why this could be? It works fine on Windows.

Offline Derron

  • Hero Member
  • *****
  • Posts: 1163
Re: BlitzMax NG (macOS) - program crashes in x64 but not x86.
« Reply #1 on: June 06, 2018, 06:26:59 AM »
do a debug build and see where it crashes.


bye
Ron

Offline wombats

  • Jr. Member
  • **
  • Posts: 19
Re: BlitzMax NG (macOS) - program crashes in x64 but not x86.
« Reply #2 on: June 06, 2018, 10:14:49 AM »
I did. It doesn't tell me anything. It just said it "quit unexpectedly."

The BlitzMax samples do work, however...which confuses things even more. As I said, it works fine on Windows in both x86 and x64. Is there anything obvious I should check for on macOS?

Offline Derron

  • Hero Member
  • *****
  • Posts: 1163
Re: BlitzMax NG (macOS) - program crashes in x64 but not x86.
« Reply #3 on: June 06, 2018, 10:30:19 AM »
You could run it via "GDB" (enable "gdb debug information generation" in the MaxIDE menus).

gdb --args executablename arg1 arg2 arg3

But it isn't installed by default - so Mac users might have better ideas to debug this application.


As samples work, and your code not - you most probably do something "interesting" - or are using a module which crashed but isn't used in the "samples".

Maybe you can narrow down "where" it crashes meanwhile? Eg. by outputting some "print" to see at which function it crashes and then fine graining there (print between the individual commands in that function/code are).


bye
Ron

Offline therevills

  • Sr. Member
  • ****
  • Posts: 324
Re: BlitzMax NG (macOS) - program crashes in x64 but not x86.
« Reply #4 on: June 06, 2018, 10:33:28 AM »
Really need a code sample which reproduces the bug...

Offline wombats

  • Jr. Member
  • **
  • Posts: 19
Re: BlitzMax NG (macOS) - program crashes in x64 but not x86.
« Reply #5 on: June 06, 2018, 02:01:37 PM »
It seems to be something to do with Lua, which I am using. I'm not able to reproduce the bug in a small snippet of code, though.

Could the issue be that Lua 5.1.4 doesn't work well on x64? It does work on Windows.

But even in x86 it doesn't work for very long on macOS. Maybe macOS is more particular about how things are done than Windows?