openal-soft
openal-soft copied to clipboard
one assert about context ?
hello:
I use openal on linux ubuntu 16 ,Gcc4.7; and play file use it ,use context,use default device, But when I destroy my app, I call that : alcMakecurrentContext(null), if(my_context != null){destroyContext(my_context)} ;closeDevice(Device);
when the app is over ,I catch that : GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./filedemo...(no debugging symbols found)...done.
warning: exec file is newer than core file. [New LWP 4172] [New LWP 4181] [New LWP 4182]
warning: .dynamic section for "./libAudiocom.so" is not at the expected address (wrong library or version mismatch?)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./filedemo'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007fd4e876f438 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7fd4e945a740 (LWP 4172))]
(gdb) bt
#0 0x00007fd4e876f438 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/unix/sysv/linux/raise.c:54
#1 0x00007fd4e877103a in __GI_abort () at abort.c:89
#2 0x00007fd4e8767be7 in __assert_fail_base (fmt=
thanks you !
It's unsafe to call OpenAL functions in global destructors and exit handlers. In this case, it looks like some global mutexes have either been destroyed, or the system otherwise isn't allowing it to be locked, and asserts when it fails to lock.