Skip to content

remove mutex calls from inside asserts#59

Merged
sletz merged 1 commit intomasterfrom
unknown repository
Jan 25, 2024
Merged

remove mutex calls from inside asserts#59
sletz merged 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jan 25, 2024

remove the mutex initialization code from inside the assert. on release builds the code inside the asserts disappears and thus the mutexes are not initialized.

this results in the program crashing with:

Fatal glibc error: tpp.c:83 (__pthread_tpp_change_priority): assertion failed: new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)
[1]    1350248 IOT instruction (core dumped)  ./result/bin/FaustLive

(gdb) bt
#0  0x00007fffef8a402c in __pthread_kill_implementation () from /nix/store/7jiqcrg061xi5clniy7z5pvkc4jiaqav-glibc-2.38-27/lib/libc.so.6
#1  0x00007fffef854e06 in raise () from /nix/store/7jiqcrg061xi5clniy7z5pvkc4jiaqav-glibc-2.38-27/lib/libc.so.6
#2  0x00007fffef83d8f5 in abort () from /nix/store/7jiqcrg061xi5clniy7z5pvkc4jiaqav-glibc-2.38-27/lib/libc.so.6
#3  0x00007fffef83e7a1 in __libc_message.cold () from /nix/store/7jiqcrg061xi5clniy7z5pvkc4jiaqav-glibc-2.38-27/lib/libc.so.6
#4  0x00007fffef84d4d7 in __libc_assert_fail () from /nix/store/7jiqcrg061xi5clniy7z5pvkc4jiaqav-glibc-2.38-27/lib/libc.so.6
#5  0x00007fffef8aa450 in __pthread_tpp_change_priority () from /nix/store/7jiqcrg061xi5clniy7z5pvkc4jiaqav-glibc-2.38-27/lib/libc.so.6
#6  0x00007fffef8a4f7f in __pthread_mutex_lock_full () from /nix/store/7jiqcrg061xi5clniy7z5pvkc4jiaqav-glibc-2.38-27/lib/libc.so.6
#7  0x000000000046e8ff in FLInterfaceManager::updateAllGuis() ()
#8  0x00007ffff0114573 in void doActivate<false>(QObject*, int, void**) () from /nix/store/y88jh47z8whm3x075ahjklv1m3i2lg21-qtbase-5.15.12/lib/libQt5Core.so.5
#9  0x00007ffff011839a in QTimer::timeout(QTimer::QPrivateSignal) () from /nix/store/y88jh47z8whm3x075ahjklv1m3i2lg21-qtbase-5.15.12/lib/libQt5Core.so.5
#10 0x00007ffff0107e2b in QObject::event(QEvent*) () from /nix/store/y88jh47z8whm3x075ahjklv1m3i2lg21-qtbase-5.15.12/lib/libQt5Core.so.5
#11 0x00007ffff6970dce in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /nix/store/y88jh47z8whm3x075ahjklv1m3i2lg21-qtbase-5.15.12/lib/libQt5Widgets.so.5
#12 0x00007ffff00dbc58 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /nix/store/y88jh47z8whm3x075ahjklv1m3i2lg21-qtbase-5.15.12/lib/libQt5Core.so.5
#13 0x00007ffff0134599 in QTimerInfoList::activateTimers() () from /nix/store/y88jh47z8whm3x075ahjklv1m3i2lg21-qtbase-5.15.12/lib/libQt5Core.so.5
#14 0x00007ffff0134e44 in timerSourceDispatch(_GSource*, int (*)(void*), void*) () from /nix/store/y88jh47z8whm3x075ahjklv1m3i2lg21-qtbase-5.15.12/lib/libQt5Core.so.5
#15 0x00007fffe5c83744 in g_main_dispatch () from /nix/store/nynq8wryq2lzq92mcj0niiwady33qhss-glib-2.78.3/lib/libglib-2.0.so.0
#16 0x00007fffe5c86797 in g_main_context_iterate_unlocked.isra () from /nix/store/nynq8wryq2lzq92mcj0niiwady33qhss-glib-2.78.3/lib/libglib-2.0.so.0
#17 0x00007fffe5c86d8c in g_main_context_iteration () from /nix/store/nynq8wryq2lzq92mcj0niiwady33qhss-glib-2.78.3/lib/libglib-2.0.so.0
#18 0x00007ffff01351b6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /nix/store/y88jh47z8whm3x075ahjklv1m3i2lg21-qtbase-5.15.12/lib/libQt5Core.so.5
#19 0x00007ffff00da67b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /nix/store/y88jh47z8whm3x075ahjklv1m3i2lg21-qtbase-5.15.12/lib/libQt5Core.so.5
#20 0x00007ffff00e2ef0 in QCoreApplication::exec() () from /nix/store/y88jh47z8whm3x075ahjklv1m3i2lg21-qtbase-5.15.12/lib/libQt5Core.so.5
#21 0x0000000000439e36 in main ()

@sletz sletz merged commit 6b034a4 into grame-cncm:master Jan 25, 2024
@ghost ghost deleted the assert-fixes branch January 25, 2024 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant