Created attachment 175017 [details] Fixes the issue by calling audio.deinit before exiting. A C++ deconstructor attempts to clean-up OpenAL resources at exit after the library's deconstructor destroys the internal state. The called functions attempt to access the destroyed state causing the program to exit abnormally. To reproduce run the port then exit it. The added patches moves the "deinit" calls out of the deconstructor and into "SYS::deinit", which is called before exit.
I'd prefer this to be reported to and reviewed by upstream.
(In reply to Dmitry Marakasov from comment #1) It appears that this bug is FreeBSD specific because of the order in which destructors are called. FreeBSD: C Binary Libraries Libraries C++ Binary Linux: C Binary C++ Binary Libraries Libraries
(In reply to kdrakehp from comment #2) > (In reply to Dmitry Marakasov from comment #1) > It appears that this bug is FreeBSD specific because of the order > in which destructors are called. > > FreeBSD: > C Binary Libraries > Libraries C++ Binary > > Linux: > C Binary C++ Binary > Libraries Libraries It is not FreeBSD specific. Static data init/deinit order is not specified, so this is an upstream problem. Please report it upstream, it they are ok with the fix, we can add it to the port right away.
Created attachment 175636 [details] Fix from upstream. The issue was fixed upstream (https://github.com/the3dfxdude/7kaa/pull/70)
A commit references this bug: Author: amdmi3 Date: Wed Oct 12 09:01:18 UTC 2016 New revision: 423836 URL: https://svnweb.freebsd.org/changeset/ports/423836 Log: - Fix segfault on exit [1] - Fix license PR: 212866 [1] Submitted by: kdrakehp@zoho.com [1] Changes: head/games/7kaa/Makefile head/games/7kaa/files/ head/games/7kaa/files/patch-src_audio_openal_openal__audio.cpp head/games/7kaa/files/patch-src_client_OMUSIC.cpp head/games/7kaa/files/patch-src_client_OSYS.cpp head/games/7kaa/files/patch-src_video_sdl_vga__sdl.cpp