LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
7.69k stars 976 forks source link

Automation of Microtuner ComboBoxes causes crash #7215

Open zynskeywolf opened 1 month ago

zynskeywolf commented 1 month ago

System Information

Arch Linux

LMMS Version(s)

1.3.0-alpha.1.575+gbda042e1e (Linux/x86_64, Qt 5.15.13, GCC 13.2.1 20230801).

Most Recent Working Version

No response

Bug Summary

In the Microtuner configuration window, Scales and Keymaps dropdown boxes can be connected to controllers/automation, but lmms crashes the moment a change in value happens. Related to #2382 and #2399.

Expected Behaviour

It probably just shouldn't be possible to do in the first place.

Steps To Reproduce

Logs

No response

Screenshots / Minimum Reproducible Project

No response

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

musikBear commented 1 month ago

This is Nightly -isent it?! image

gbda042e1e is Nightly..

enp2s0 commented 3 weeks ago

Not sure what nightly builds have to do with this. It's a bug on the current master (I just confirmed it) and it should be fixed. FWIW QT spits out some error messages right as it crashes:

QObject::connect: Cannot queue arguments of type 'QTextBlock'
(Make sure 'QTextBlock' is registered using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
[1]    756850 segmentation fault (core dumped)  ./lmms
michaelgregorius commented 3 weeks ago

I have a branch called "LmmsComboBox" that introduces a combo box that inherits from QComboBox and that knows how to deal with ComboBoxModel. It can be found here: https://github.com/michaelgregorius/lmms/tree/LmmsComboBox.

I did some first local tests that used it as a drop in replacement in the song editor and piano roll and it seems to work quite nice. It's not themed though.

michaelgregorius commented 3 weeks ago

I have now pushed some changes for the microtuner configuration. Here's a before and after of the microtuner dialog:

7215-MicrotunerBefore 7215-MicrotunerAfter

Looks much more consistent IMO and removes the crashes because no automation is possible anymore.

messmerd commented 3 weeks ago

@michaelgregorius Is there any way you could just fix ComboBox instead of creating another class?

michaelgregorius commented 3 weeks ago

@messmerd, I think it's better to create a new class and to get rid of ComboBox wherever possible. It has several problems, e.g. that it does not play nice with HiDPI screens or the automation problem mentioned here. It also looks off compared to other elements, e.g. in the microtuner dialog.

In my opinion most of LMMS "homebrew" widgets should be replaced by styled Qt widgets. Or alternatively by "homebrew" widgets that behave like Qt ones.

Which combo boxes in LMMS really need to be automatable by the way?