Skip to content

Crash in Flatpak: std::optional<noteahead::Position> not engaged #4

@Adley-Nastri

Description

@Adley-Nastri

Crash in Flatpak: std::optional<noteahead::Position> not engaged

Hi, I know just inserted myself here, I was just wondering if i could get some help at all? 😅

Crash when clicking track
When running Noteahead inside Flatpak, the app crashes as soon as I click on a track or column.

Error message:

/usr/include/c++/12.2.0/optional:477: constexpr _Tp& std::_Optional_base_impl<_Tp, _Dp>::_M_get() [with _Tp = noteahead::Position; _Dp = std::_Optional_base<noteahead::Position, true, true>]: Assertion 'this->_M_is_engaged()' failed.

This does not happen when running the same app natively.

Logs

2025-06-03T23:11:20.860 [I] main: Noteahead version 0.8.0
2025-06-03T23:11:20.860 [I] main: Licensed under The GNU General Public License v3.0
2025-06-03T23:11:20.860 [I] main: Copyright (c) 2020-2025 Jussi Lind <[email protected]>
2025-06-03T23:11:20.860 [I] main: Compiled against Qt version 6.5.3
2025-06-03T23:11:20.866 [I] EditorService: Initializing an empty song
2025-06-03T23:11:20.866 [I] PlayOrder: Position 0 mapped to pattern 0
2025-06-03T23:11:20.866 [I] MidiWorker: Midi API name: ALSA
2025-06-03T23:11:20.869 [I] Application: Initializing tracker
2025-06-03T23:11:20.869 [I] Application: Loading entry point qrc:/qt/qml/noteahead/view/qml/Main.qml
2025-06-03T23:11:21.045 [I] Ui: EditorView: Track count: 8
2025-06-03T23:11:21.107 [I] EditorService: Focus for track 0 on column 0 on line 0 requested
2025-06-03T23:11:21.110 [I] Application: Applying state: InitializeNewProject
2025-06-03T23:11:21.110 [I] AutomationService: Clearing
2025-06-03T23:11:21.110 [I] TrackSettingsModel: Reset
2025-06-03T23:11:21.110 [I] Ui: TrackSettingsDialog: Initializing
2025-06-03T23:11:21.110 [I] MixerService: Clearing
2025-06-03T23:11:21.110 [I] EditorService: Initializing an empty song
2025-06-03T23:11:21.110 [I] PlayOrder: Position 0 mapped to pattern 0
2025-06-03T23:11:21.131 [I] Ui: EditorView: Track count: 8
2025-06-03T23:11:21.154 [I] EditorService: Project set as modified
2025-06-03T23:11:22.061 [I] Ui: NoteColumnLineContainer: Column 0 left clicked on line 24
2025-06-03T23:11:22.061 [I] EditorService: Focus for track 2 on column 0 on line 16 requested
/usr/include/c++/12.2.0/optional:477: constexpr _Tp& std::_Optional_base_impl<_Tp, _Dp>::_M_get() [with _Tp = noteahead::Position; _Dp = std::_Optional_base<noteahead::Position, true, true>]: Assertion 'this->_M_is_engaged()' failed.

What I’ve tried:

  • Compiling with QT 6.4, but results in a blank screen and the same issue on top of this.
  • Running Flatpak with full permissions (--filesystem=host --devel), so it’s not a sandboxing or permissions issue.

What’s probably happening:
Flatpak’s environment, library versions, or event order is different, so some code path doesn’t set noteahead::Position before it’s used.


Just to be up front: I’m not a C++ developer—I'm new here and just started contributing, and I kind of introduced the Flatpak packaging on my own initiative. I know this wasn’t originally planned or requested, so apologies if this is a bit out-of-scope! If you need any more info, testing, or logs from the Flatpak side, I’m happy to help.


Request
Could you please:

  • Add checks before using std::optional<noteahead::Position>
  • And/or add debug logs to help track down why it isn’t set in Flatpak?

Thank you! 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions