Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when closing #2584

Closed
DeRobyJ opened this issue Feb 18, 2016 · 11 comments
Closed

Crash when closing #2584

DeRobyJ opened this issue Feb 18, 2016 · 11 comments
Labels
Milestone

Comments

@DeRobyJ
Copy link
Contributor

DeRobyJ commented Feb 18, 2016

The program crashes instead of correctly closing when using File>Quit or the X button.
Windows 7 64bit 1.1.90

@tresf tresf added the bug label Feb 18, 2016
@tresf tresf added this to the 1.2.0 milestone Feb 18, 2016
@zonkmachine
Copy link
Member

This was introduced in ca7c90a
@Fastigium Care to take a look?

Backtrace after closing directly after program start:

(gdb) bt
#0  0x00007f4a939b6346 in QMutex::lock() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#1  0x00000000004b537f in EffectChain::clear() ()
#2  0x00000000004b55b1 in EffectChain::~EffectChain() ()
#3  0x00000000004c0fa9 in FxChannel::~FxChannel() ()
#4  0x00000000004bc9e9 in FxMixer::~FxMixer() ()
#5  0x00000000004bcb09 in FxMixer::~FxMixer() ()
#6  0x00000000004b7e53 in LmmsCore::destroy() ()
#7  0x0000000000541d36 in MainWindow::~MainWindow() ()
#8  0x0000000000541df9 in MainWindow::~MainWindow() ()
#9  0x00007f4a93ad5c58 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#10 0x00007f4a9428956b in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

@Fastigium
Copy link
Contributor

Ack, the Mixer gets destroyed before the effects, so there is nothing left to lock by the time EffectChain::clear() is called 😵. I could quick-fix this by checking if the mixer exists before locking it, but the shutdown sequence has been in need of a slightly larger overhaul for a long time. I propose to look into it after I chase down #2434.

@zonkmachine
Copy link
Member

I propose to look into it after I chase down #2434.

Sounds good to me.

@Fastigium
Copy link
Contributor

Woah, that's an unexpected new experience, automatically closing an issue by writing something in a commit message 😋. At any rate, I just pushed a rather trivial commit that fixes the newly introduced closing crash. Projects with peak controllers in them still crash when closing, however. This has to do with the rather funky way peak controllers are removed combined with the GUI not being there anymore but still being modified. I tried fixing that, but for every crash I got rid of another one surfaced. It'll need more attention, and it's a different issue.

@tresf
Copy link
Member

tresf commented Feb 24, 2016

Woah, that's an unexpected new experience, automatically closing an issue by writing something in a commit message

It is a very nice feature. It only works on the default branch, BTW (which currently is master). 👍

@musikBear
Copy link

FYI i (win32 xp) does not have this issue with Qt5 PR (lmms-1.1.90-win32-qt5.exe) There is no mandatory crash after clicking red-X. Doubtful imo, that it is related with qt5, but something must have worked
I will experiment with ASIO4ALL and see if that is usable with the qt5 PR. (results in qt5 thread #2611)

@zonkmachine
Copy link
Member

FYI i (win32 xp) does not have this issue with Qt5 PR (lmms-1.1.90-win32-qt5.exe) There is no mandatory crash after clicking red-X. Doubtful imo, that it is related with qt5, but something must have worked

I think the reason you don't see this bug is because the issue was fixed before your build.

@tresf
Copy link
Member

tresf commented Mar 9, 2016

I think the reason you don't see this bug is because the issue was fixed before your build.

Well, Windows handles the crashes a bit differently from Linux/Unix. In my experience, it's just less obvious. @musikBear load a 32-bit VST and then close the software and watch the remote plugin process hang forever in Task Manager.

I also made a console version of the win32 build and you can see some errors before it closes (yes console is available via -mconsole, but it would appear the entire time the software is running, so it's currently disabled).

@musikBear
Copy link

load a 32-bit VST and then close the software and watch the remote plugin process hang

@tresf Yes i know about the hanging or orphan RemoteVSTprocess after a crash or a TM shutdown. I have cleaned them away often 👣
But lmms does take care of VST (both presets and inserts) shutdown and removal, when it is closed down properly, but by

then close the software

you mean kill the lmms process in TM, because then there are orphan every time.

@musikBear
Copy link

musikBear commented Jan 7, 2017

@zonkmachine has kindly 🙇 compiled a win32 RC2 1.2 for win32 and XP
If this issue has been specifically addressed, then great job 👍 , if not then something 'lucky' has happened. I must have done shut-down +25 times, and i have even deliberately tried to force the behaviour, by 'sleeping' lmms for an hour, and then shut it down a few seconds after i pressed play.

Not only did lmms RC2 close and disappeared from TM, all the VSTs was also correctly closed down and removed from memory. It look like this is not an issue on win 32 any more 👍
This relates to #2584 and maby also #2633 (My audio is however SDL)

@zonkmachine
Copy link
Member

Thanks! Yes, it's pretty darn stable but no, I didn't compile the rc2.exe. I just linked you the new rc2. But please don't bump old issues that have been closed as fixed unless you see the problem still. This was closed as fixed almost a year ago on 24 Feb 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants