lmms icon indicating copy to clipboard operation
lmms copied to clipboard

Automation of Microtuner ComboBoxes causes crash

Open zynskeywolf opened this issue 10 months ago • 6 comments

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

  • Add an LFO controller
  • Open Scales and keymaps from the Edit menu
  • Right click on any of the dropdown boxes on the top and connect it to the controller

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.

zynskeywolf avatar Apr 21 '24 14:04 zynskeywolf

This is Nightly -isent it?! image

gbda042e1e is Nightly..

musikBear avatar Apr 22 '24 15:04 musikBear

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

enp2s0 avatar May 09 '24 16:05 enp2s0

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 avatar May 10 '24 15:05 michaelgregorius

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.

michaelgregorius avatar May 10 '24 16:05 michaelgregorius

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

messmerd avatar May 10 '24 19:05 messmerd

@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?

michaelgregorius avatar May 11 '24 08:05 michaelgregorius