Closed Umcaruje closed 8 years ago
It's interesting that this one should be Qt5-specific. Does it only occur when playing?
It's interesting that this one should be Qt5-specific
It's not.
Reproduced on both Qt5 and Qt4 builds.
Reproduced on both Qt5 and Qt4 builds
That's what I would expect, which is why I found it interesting that Umcaruje stated it was Qt5-specific (here). Anyway, my plan is to refactor deleting FX channels so that the actual deletion happens between mixer rounds (kinda like adding and removing PlayHandles is done right now). Crash-free deletion during a mixer round would require lots of checks everywhere and probably synchronization, too.
Reproduced on both Qt5 and Qt4 builds.
That's weird, I can't reproduce this on my Qt4 build...
@Fastigium I just checked and this happens even without playing. I got an even longer backtrace when there is no playing:
QMutex: destroying locked mutex
*** Error in `/home/umcaruje/lmmsfork/buildqt5/lmms': malloc(): memory corruption (fast): 0x0000000002667cdf ***
Program received signal SIGABRT, Aborted.
0x00007ffff3fcdcc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt full
#0 0x00007ffff3fcdcc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
resultvar = 0
pid = 4245
selftid = 4245
#1 0x00007ffff3fd10d8 in __GI_abort () at abort.c:89
save_stage = 2
act = {__sigaction_handler = {sa_handler = 0x1ab00000054, sa_sigaction = 0x1ab00000054}, sa_mask = {__val = {140737290524512, 64, 8, 40, 24, 0, 36169168,
27224416, 140737084809048, 17186444096, 1, 0, 140737084809136, 140737488338352, 140737084809048, 22260999935}}, sa_flags = -403546192,
sa_restorer = 0x7fffffffbe1c}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x00007ffff400a394 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff4118b28 "*** Error in `%s': %s: 0x%s ***\n")
at ../sysdeps/posix/libc_fatal.c:175
ap = {{gp_offset = 40, fp_offset = 0, overflow_arg_area = 0x7fffffffc020, reg_save_area = 0x7fffffffbfb0}}
fd = 23
on_2 = <optimized out>
list = <optimized out>
nlist = <optimized out>
cp = <optimized out>
written = <optimized out>
#3 0x00007ffff40150f7 in malloc_printerr (action=<optimized out>, str=0x7ffff4118ec8 "malloc(): memory corruption (fast)", ptr=<optimized out>) at malloc.c:4996
buf = "0000000002667cdf"
cp = <optimized out>
#4 0x00007ffff4017e04 in _int_malloc (av=0x7ffff4355760 <main_arena>, bytes=16) at malloc.c:3359
p = 0x0
fb = <optimized out>
pp = <optimized out>
nb = 32
idx = <optimized out>
bin = <optimized out>
victim = <optimized out>
size = <optimized out>
victim_index = <optimized out>
remainder = <optimized out>
remainder_size = <optimized out>
block = <optimized out>
bit = <optimized out>
map = <optimized out>
fwd = <optimized out>
---Type <return> to continue, or q <return> to quit---
bck = <optimized out>
errstr = <optimized out>
__func__ = "_int_malloc"
#5 0x00007ffff40197b0 in __GI___libc_malloc (bytes=16) at malloc.c:2891
ar_ptr = 0x7ffff4355760 <main_arena>
victim = 0x6
__func__ = "__libc_malloc"
#6 0x00007fffeda6de42 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
No symbol table info available.
#7 0x00007fffeda6bdd7 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
No symbol table info available.
#8 0x00007fffeda6d3ff in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
No symbol table info available.
#9 0x00007fffeda6d512 in xcb_wait_for_reply () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
No symbol table info available.
#10 0x00007fffe762598e in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
No symbol table info available.
#11 0x00007ffff682a600 in QApplication::topLevelAt(QPoint const&) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#12 0x00007ffff67d8e76 in QApplication::widgetAt(QPoint const&) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#13 0x00007ffff67ded52 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#14 0x00007ffff683296a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#15 0x00007ffff68349bb in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#16 0x00007ffff67dac8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#17 0x00007ffff67dfe56 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#18 0x00007ffff777dc2d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
No symbol table info available.
#19 0x00007ffff6faa25c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
No symbol table info available.
#20 0x00007ffff6fab925 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#21 0x00007ffff6f94858 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
No symbol table info available.
#22 0x00007fffe763c5b0 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
No symbol table info available.
#23 0x00007ffff3136bd4 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#24 0x00007ffff3136e18 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#25 0x00007ffff3136ebc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#26 0x00007ffff77ca98c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
No symbol table info available.
#27 0x00007ffff777c96b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
No symbol table info available.
#28 0x00007ffff694eea8 in QMenu::exec(QPoint const&, QAction*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#29 0x0000000000608e91 in FxLine::contextMenuEvent (this=0x1f9f9d0) at ../src/gui/widgets/FxLine.cpp:227
mix = 0xecab40
contextMenu = {wp = {d = 0x272f4f0, value = 0x2631fe0}}
#30 0x00007ffff68166e9 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#31 0x00007ffff67dac8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#32 0x00007ffff67e173e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#33 0x00007ffff777dc2d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
No symbol table info available.
#34 0x00007ffff68333c6 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#35 0x00007ffff68349bb in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#36 0x00007ffff67dac8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#37 0x00007ffff67dfe56 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#38 0x00007ffff777dc2d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#39 0x00007ffff6faa25c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
No symbol table info available.
#40 0x00007ffff6fab925 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
No symbol table info available.
#41 0x00007ffff6f94858 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
No symbol table info available.
#42 0x00007fffe763c5b0 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
No symbol table info available.
#43 0x00007ffff3136bd4 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#44 0x00007ffff3136e18 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#45 0x00007ffff3136ebc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#46 0x00007ffff77ca98c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
No symbol table info available.
#47 0x00007ffff777c96b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
No symbol table info available.
#48 0x00007ffff77830e1 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
No symbol table info available.
#49 0x00000000004ed3d6 in main (argc=1, argv=0x7fffffffde48) at ../src/core/main.cpp:807
sparam = {__sched_priority = 50}
ret = 32767
fileToImport = {static null = {<No data fields>}, d = 0x7ffff7817660 <QArrayData::shared_null>}
app = 0x98d860
os = {samplerate = 44100, vbr = false, bitrate = 160, depth = ProjectRenderer::Depth_16Bit}
eff = ProjectRenderer::WaveFile
fileToLoad = {static null = {<No data fields>}, d = 0x7ffff7817660 <QArrayData::shared_null>}
exitAfterImport = false
allowRoot = false
renderLoop = false
renderTracks = false
profilerOutputFile = {static null = {<No data fields>}, d = 0x7ffff7817660 <QArrayData::shared_null>}
qs = {interpolation = Mixer::qualitySettings::Interpolation_SincFastest, oversampling = Mixer::qualitySettings::Oversampling_2x}
coreOnly = false
fullscreen = true
renderOut = {static null = {<No data fields>}, d = 0x7ffff7817660 <QArrayData::shared_null>}
---Type <return> to continue, or q <return> to quit---
pos = {static null = {<No data fields>}, d = 0x9e9560}
That's a rather impressive backtrace :astonished:. Should still be fixed by the refactoring I proposed, though. I'll see if I can do that in the upcoming week. Wrestling with C++11 and Travis for now.
Umcaruje I can, this happens to me as well on Qt4
How can't I reproduce it on my Qt4 build scratches head\
@Umcaruje mine was on Mac build I tested on (since I didn't have a Qt4 Linux build handy at that moment).
PR to fix this available at #2675, testing welcome!
Any build I can test on win 7?
@DeRobyJ Here you go, although if you get a crash, it's not going to be trivial to get a backtrace. Still, if you can describe what you did when it happened, that might help :)
Fixed to me, did a bunch of tests, like deleting multiple channels with "unused" feature, or a channel sending to more than one other channel, and so on.
Win7 sp1 64bit
In fact, there is a problem. Plugins do not change their FX strip even if the numberbox changes. I mean: I opened an old project with 3 instrument in 3 different channels.
They keep their initial status, so on a black project everything will go to master, you can't change that.
Channel selecting works fine in lmms-1.1.90.1-g67334a8-win64-qt5
edit: Wait, aren't we testing a bug that came with qt5? That build is in qt 4.8.7!
@DeRobyJ Glad that it fixed the crashes! And I think I know what causes the issue you describe, I'll try to reproduce and fix it.
@DeRobyJ Another build, and the problem you mentioned should be fixed now. There is a small chance that the fix introduced other problems, so if you could test again, I'd be much obliged!
FYI, the linked build is Qt4, not Qt5. :+1:
That build seems fine, fixed the bug and I'm not getting anything bad, but that is in qt4!!
@DeRobyJ And here's a Qt5 build to complete the testing. I hope it works, building it involved some guesswork and some doubtful warnings.
@tresf The wiki page doesn't seem to contain any instructions on building for Windows with Qt5. I consulted the .travis
files to get it done for now, but I'm not sure I did it right. What's the deal with Qt5 linguist not being there, in Travis builds as well? And I also got a ton of warnings about Policy CMP0020 is not set
.
Ok, same behaviour. it doesn't crash when deleting or moving channels that send to others. Instruments can be routed to channels, so everything fine here.
@DeRobyJ Awesome, thanks for testing!
Steps to reproduce:
Version info:
Backtrace: