Jump to content

Crash on start due to Soundmanager


tuk0z
 Share

Recommended Posts

Hi all,

In short:

Game segfaulted after I updated openal to 1.24.0 yesterday. It works just fine after downgrading openal to 1.23.1. No chicken were harmed.

- Software: Arch linux ; 0ad a26-17 ; 0ad-data a26-2
- Hardware: Intel Core i3 ; Nvidia GT 1030 (fanless)

Some more details:

With openal-1.24.0:

$ 0ad 
TIMER| InitVfs: 2.03109 ms
FILES| Main log written to '$HOME/.config/0ad/logs/mainlog.html'
FILES| Interesting log written to '$HOME/.config/0ad/logs/interestinglog.html'
TIMER| CONFIG_Init: 5.32788 ms
[E] pw.loop [loop.c:69 pw_loop_new()] 0x60457b6edb60: can't make support.system handle: No such file or directory
[ALSOFT] (EE) Failed to create PipeWire event thread loop (errno: 2)
Sound: AlcInit success, using OpenAL Soft
Assertion failed: "0 && (L"FYI: WARN_IF_FALSE reports that a function failed. Feel free to ignore or suppress this warning.")"
Location: SoundManager.cpp:841 (RunHardwareDetection)

Call stack:

(0x6045492c7d84) /usr/bin/pyrogenesis(+0x84ed84) [0x6045492c7d84]
(0x6045492740a0) /usr/bin/pyrogenesis(+0x7fb0a0) [0x6045492740a0]
(0x604549275a69) /usr/bin/pyrogenesis(+0x7fca69) [0x604549275a69]
(0x604549276335) /usr/bin/pyrogenesis(+0x7fd335) [0x604549276335]
(0x604548f16f23) /usr/bin/pyrogenesis(+0x49df23) [0x604548f16f23]
(0x604548f1a86e) /usr/bin/pyrogenesis(+0x4a186e) [0x604548f1a86e]
(0x604548f1a9a1) /usr/bin/pyrogenesis(+0x4a19a1) [0x604548f1a9a1]
(0x604548e2ad0c) /usr/bin/pyrogenesis(+0x3b1d0c) [0x604548e2ad0c]
(0x604548b2a375) /usr/bin/pyrogenesis(+0xb1375) [0x604548b2a375]
(0x604548b193ab) /usr/bin/pyrogenesis(+0xa03ab) [0x604548b193ab]
(0x736377745e08) /usr/lib/libc.so.6(+0x25e08) [0x736377745e08]
(0x736377745ecc) /usr/lib/libc.so.6(__libc_start_main+0x8c) [0x736377745ecc]
(0x604548b231c5) /usr/bin/pyrogenesis(+0xaa1c5) [0x604548b231c5]

errno = 0 (No error reported here)
OS error = ?


Redirecting call to abort() to mozalloc_abort

/usr/bin/0ad: line 9: 49358 Segmentation fault      (core dumped) "$pyrogenesis" "$@"

With openal-1.23.1 :

$ 0ad
TIMER| InitVfs: 239.716 us
FILES| Main log written to '$HOME/.config/0ad/logs/mainlog.html'
FILES| Interesting log written to '$HOME/.config/0ad/logs/interestinglog.html'
TIMER| CONFIG_Init: 2.68025 ms
[E] pw.loop [loop.c:69 pw_loop_new()] 0x60eae9630130: can't make support.system handle: No such file or directory
[ALSOFT] (EE) Failed to create PipeWire event thread loop (errno: 2)
Sound: AlcInit success, using OpenAL Soft
FILES| UserReport written to '$HOME/.config/0ad/logs/userreport_hwdetect.txt'
TIMER| RunHardwareDetection: 6.44828 ms
FILES| Hardware details written to '$HOME/.config/0ad/logs/system_info.txt'
TIMER| write_sys_info: 17.4534 ms
TIMER| InitRenderer: 20.6847 ms
TIMER| ps_console: 4.63143 ms
TIMER| ps_lang_hotkeys: 3.00069 ms
TIMER| common/modern/setup.xml: 112.83 us
TIMER| common/modern/styles.xml: 100.456 us
TIMER| common/modern/sprites.xml: 776.77 us
TIMER| common/global.xml: 298.022 us
TIMER| common/setup.xml: 187.392 us
TIMER| common/sprites.xml: 464.298 us
TIMER| common/styles.xml: 66.51 us
TIMER| pregame/backgrounds/: 132.234 us
TIMER| pregame/sprites.xml: 96.276 us
TIMER| pregame/styles.xml: 29.007 us
TIMER| pregame/mainmenu.xml: 43.6955 ms
TIMER| common/modern/setup.xml: 93.616 us
TIMER| common/modern/styles.xml: 106.386 us
TIMER| common/modern/sprites.xml: 962.806 us
TIMER| msgbox/msgbox.xml: 17.0366 ms
TIMER| shutdown Renderer: 628.728 us
TIMER| shutdown SDL: 115.719 ms
TIMER| shutdown UserReporter: 1.94474 ms
TIMER| shutdown ConfigDB: 97.907 us
TIMER| resource modules: 24.6124 ms
TIMER TOTALS (7 clients)
-----------------------------------------------------
  tc_pool_alloc: 0 c (0x)
  tc_png_decode: 7546.19 kc (2x)
  tc_dds_transform: 30.636 kc (11x)
  tc_transform: 841.184 kc (5x)
  tc_plain_transform: 790.82 kc (5x)
  tc_ShaderValidation: 1142.95 kc (1x)
  xml_validation: 707.244 kc (3x)
-----------------------------------------------------
TIMER| shutdown misc: 8.26539 ms

Also posted on Arch forum.

Edited by tuk0z
Added Arch bbs link
  • Like 1
Link to comment
Share on other sites

Hi!

According to:

[E] pw.loop [loop.c:69 pw_loop_new()] 0x60457b6edb60: can't make support.system handle: No such file or directory
[ALSOFT] (EE) Failed to create PipeWire event thread loop (errno: 2)

It seems like an OpenAL or the system problem. We can make a workaround to disable sounds for that case. Did you try any other game/software using OpenAL with the new version?

Link to comment
Share on other sites

0ad crashes whenever I try to start it. This became persistent and appeared suddenly.

TIMER| InitVfs: 186.839 us
FILES| Main log written to '/home/esme/.config/0ad/logs/mainlog.html'
FILES| Interesting log written to '/home/esme/.config/0ad/logs/interestinglog.html'
TIMER| CONFIG_Init: 2.24604 ms
Sound: AlcInit success, using OpenAL Soft
Assertion failed: "0 && (L"FYI: WARN_IF_FALSE reports that a function failed. Feel free to ignore or suppress this warning.")"
Location: SoundManager.cpp:841 (RunHardwareDetection)

Call stack:

(0x59bae6a4bd84) /usr/bin/pyrogenesis(+0x84ed84) [0x59bae6a4bd84]
(0x59bae69f80a0) /usr/bin/pyrogenesis(+0x7fb0a0) [0x59bae69f80a0]
(0x59bae69f9a69) /usr/bin/pyrogenesis(+0x7fca69) [0x59bae69f9a69]
(0x59bae69fa335) /usr/bin/pyrogenesis(+0x7fd335) [0x59bae69fa335]
(0x59bae669af23) /usr/bin/pyrogenesis(+0x49df23) [0x59bae669af23]
(0x59bae669e86e) /usr/bin/pyrogenesis(+0x4a186e) [0x59bae669e86e]
(0x59bae669e9a1) /usr/bin/pyrogenesis(+0x4a19a1) [0x59bae669e9a1]
(0x59bae65aed0c) /usr/bin/pyrogenesis(+0x3b1d0c) [0x59bae65aed0c]
(0x59bae62ae375) /usr/bin/pyrogenesis(+0xb1375) [0x59bae62ae375]
(0x59bae629d3ab) /usr/bin/pyrogenesis(+0xa03ab) [0x59bae629d3ab]
(0x714b6a1621ce) /usr/lib/libc.so.6(+0x261ce) [0x714b6a1621ce]
(0x714b6a16228a) /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x714b6a16228a]
(0x59bae62a71c5) /usr/bin/pyrogenesis(+0xaa1c5) [0x59bae62a71c5]

errno = 0 (No error reported here)
OS error = ?

This log suggests Soundmanager.cpp is causing an issue. The sound system on my device is working.

interestinglog.html is empty

mainglog.html only loaded some autociv config strings, nothing of interest.

 

I could play the game by using an appimage build, but ideally we can fix the main installation.

 

Link to comment
Share on other sites

Quick check:

alcGetString(nullptr, ALC_DEVICE_SPECIFIER) returns nullptr or at least a char* starting with "\0" in 1.24.0

It's only used for printing the device name into a logfile. Making the follow up code expecting non NULL segfault. Skipping that part the sound works just fine, as it's only used for printing the device name into a logfile.

  • Like 3
Link to comment
Share on other sites

13 minutes ago, hyperion said:

Quick check:

alcGetString(nullptr, ALC_DEVICE_SPECIFIER) returns nullptr or at least a char* starting with "\0" in 1.24.0

It's only used for printing the device name into a logfile. Making the follow up code expecting non NULL segfault. Skipping that part the sound works just fine, as it's only used for printing the device name into a logfile.

What exactly should I do to fix it?

  • Like 1
Link to comment
Share on other sites

3 hours ago, hyperion said:

alcGetString(nullptr, ALC_DEVICE_SPECIFIER) returns nullptr or at least a char* starting with "\0" in 1.24.0

It's only used for printing the device name into a logfile. Making the follow up code expecting non NULL segfault. Skipping that part the sound works just fine, as it's only used for printing the device name into a logfile.

The great find!

Link to comment
Share on other sites

@tuk0z,

yes the bug was fixed with https://gitea.wildfiregames.com/0ad/0ad/commit/bb1910ff4c696502d3d518a0cd36c7bd2795554f, distribution maintainers or anyone building a26 from source can cherry-pick that commit to support >=openal-1.24.0. The next release will include the fix.

Bug report for Debian sid https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1087990

  • Like 1
Link to comment
Share on other sites

30 minutes ago, hyperion said:

building a26 from source

  • Where can I find the fixed and buildable source code for A26? (I've tried to build the released zips and it throws error after error)
  • Are the build steps identical to the A27 under development?
Link to comment
Share on other sites

I'm building the release version A27 and I see the fix has already been applied there 3 days ago by sera. This is the fixed SoundManager.cpp:

	const ALCchar* devices = nullptr;
	if (alcIsExtensionPresent(nullptr, "ALC_ENUMERATION_EXT") == AL_TRUE)
	{
		if (alcIsExtensionPresent(nullptr, "ALC_ENUMERATE_ALL_EXT") == AL_TRUE)
			devices = alcGetString(nullptr, ALC_ALL_DEVICES_SPECIFIER);
		else
			devices = alcGetString(nullptr, ALC_DEVICE_SPECIFIER);
	}

But after I build this successfully, identical error is produced.

Can we do a try exception to skip this?

Link to comment
Share on other sites

20 hours ago, AInur said:

I'm building the release version A27

There is no release version of a27, I suppose you mean main branch. If an identical error is printed you either didn't build what you thought you did or didn't run what you built. This exact error message does no longer exist in main.

Building a26 at this point from a checkout is non trivial, I suggest to inform the maintainer for the package for your distribution (usually bug report) and if you want to have a go at it yourself use the package build scripts, which have all prior fixes, and the package build tools of your distribution to create an installable package instead.

 

20 hours ago, AInur said:

Can we do a try exception to skip this?

You can't catch a segfault.

  • Like 1
Link to comment
Share on other sites

On 22/11/2024 at 10:52 AM, AInur said:

Where can I find the fixed and buildable source code for A26? (I've tried to build the released zips and it throws error after error)

I don’t think there is any such version of the source code (A26 + OpenAL 1.24 fix), nor that it would be planned.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...