LMMS / LMMS/lmms

Segmentation fault on Ctrl-C

Open
#7,885 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
10.4k
Forks
1.3k
Avg merge
2d 13h
Merged PRs (30d)
7

Description

### System Information

Arch Linux, GNOME

### LMMS Version(s)

master

### Most Recent Working Version

_No response_

### Bug Summary

After #7698 was merged, I've found that quite often when using Ctrl-C to close lmms, it does not cleanly shutdown, but instead crashes with a segfault. (Also sometimes it refuses to close and I have to do kill -9, but that's another issue)

If it were just a segfault here and there, I probably wouldn't mind much. However, I have a suspicion that me doing ctrl-c on it today caused something to get corrupted, which broke my build of lmms. When playing a note, it crashes with the assertion error "QMutex pointer is misaligned" when trying to lock the automation clip mutex. (Don't worry, I've cleared the CMake cache and recompiled, and it seems to work now.)

Basically, is there a way to allow it to more cleanly exit, like what happens when x'ing the window and clicking not to save changes? Because that doesn't result in a segfault ever, but Ctrl-C, which should probably do something similar, does.

### Expected Behaviour

LMMS should not segfault on Ctrl-C.

### Steps To Reproduce

Open LMMS, play a project, do some stuff, and then press Ctrl-C in the terminal. It doesn't always happen, but it occurs quite regularly for me.

### Logs

_No response_

### Screenshots / Minimum Reproducible Project

_No response_

### Please search the issue tracker for existing bug reports before submitting your own.

- [x] I have searched all existing issues and confirmed that this is not a duplicate.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names no source file or test; start by reproducing Ctrl-C shutdown from a terminal while a project is playing, then compare that path with closing the window and choosing not to save. Trace the shutdown behavior introduced around #7698 and verify that repeated Ctrl-C exits cleanly without a segmentation fault.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.