4

I am experiencing the following problem: I am able to compile my allegro application with a make file without errors, however when I run the ./file I get a "zsh: illegal hardware instruction ./file" message. I commented out some parts of the code and it seems that the issue is cause (or perhaps this is only one of the casuses) by the al_create_display() function.

I replicated the problem with a very simple allegro program (basically just opening a display).

My allegro is installed with homebrew and I compile the program with g++-9. The machine I used was a MacBook Pro from 2016, 13inch no touchbar. The system was Mac OS Catalina. Before the update to Catalina no such problems had occured.

Some information from the crash report:

Crashed Thread: 3

Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [1579]

Application Specific Information:
-[NSOpenGLContext update] must be called from the main thread if the context has a view.

And the thread that crashed:
Thread 3 Crashed:
0 com.apple.AppKit 0x00007fff3a4878a1 -[NSOpenGLContext update] + 520
1 liballegro.5.2.dylib 0x0000000102876943 create_display_win + 1079
2 liballegro.5.2.dylib 0x000000010283b3d4 al_create_display + 40
3 file 0x0000000102724e72 Display::Display() + 130
4 file 0x0000000102724f22 Display::instance() + 62
5 file 0x00000001026e2f4f _al_mangled_main + 508
6 liballegro.5.2.dylib 0x0000000102878d47 call_user_main + 23
7 liballegro.5.2.dylib 0x0000000102878d30 +[AllegroAppDelegate app_main:] + 9
8 com.apple.Foundation 0x00007fff3f58cef2 NSThread__start + 1064
9 libsystem_pthread.dylib 0x00007fff74405d76 _pthread_start + 125
10 libsystem_pthread.dylib 0x00007fff744025d7 thread_start + 15
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
ramkick
  • 49
  • 4
  • There are some informations missing, mostly: What hardware base are you working on? Most common cause for that exception is that some binary was compiled for a CPU architecture with a newer, broader instruction set than what you have. So if you are working with an exceptionally old hardware, or even an Hackintosh, that's relevant now. – Ext3h Oct 19 '19 at 17:15
  • 1
    updated the post with the information. I used a MacBook Pro from 2016, 13inch no touchbar. The system was Mac OS Catalina. Before the update to Catalina no such problems had occured. – ramkick Oct 19 '19 at 18:20
  • 1
    Same here, updated to Cataline today and I am having the exact same issue now. I am using a MacBook Pro (15-inch, 2018) with 2.6 GHz 6-Core Intel Core i7. – Jianan Ding Oct 21 '19 at 23:40
  • Same problem here. This is seems to be caused by macOS Catalina. – Hernán Nov 12 '19 at 20:02

1 Answers1

0

The problem has been addressed by the developers of the library: https://github.com/liballeg/allegro5/issues/1091. The current version on the main branch does not cause the problem. I have tried it myself and everything appears to work. The only thing is that you have to build allegro manually using cmake or xcode. I don't know when the brew version will be updated.

ramkick
  • 49
  • 4