Bug Report: APC40 "clip/dev" (option) key crashes Liberation when selecting empty clip

Bug Report Template

Please fill in each section as thoroughly as possible
Summary:

Platform (please specify Windows or MacOS):
Both (thanks to @mrfloppy88 for testing on Windows)

Liberation version number:
1.0.3b4, 1.0.3b5

Operating System Version:
MacOS Tahoe, MacOS Mojave, Windows 11

Details of laser DACs connected (number, type, connection method):
N/A

Description

When selecting an empty clip slot on the APC40 while holding the “clip/dev view” (option) key, Liberation will crash with an error message. I found this while trying to test if I could hold option to copy a clip using the APC40, but it would be problematic if a user accidentally pressed an empty clip slot while trying to select a clip without activating it.

Video: https://www.youtube.com/watch?v=tJL0fDSaptU

Steps to reproduce

Hold down the “clip/dev view” key on APC40 and select an empty clip slot.

Screenshot

Notes

If you can please share your project file (.lprj) or zip up your data folder - the path is displayed in the About window. If you have a crash report please do not send it to Apple or Microsoft (I don’t get those). Instead copy paste it.

This crash occurs regardless of the project file used.

Crashlog:

=== Crash Detected (Signal 11) ===
0   Liberation                          0x0000000103033b5c _ZN8Timeline13sortAlgorithmERNSt3__110shared_ptrI19TimelineElementBaseEES4_ + 1025020
1   libsystem_platform.dylib            0x000000018ba49a24 _sigtramp + 56
2   Liberation                          0x0000000102f6c92c _ZN8Timeline13sortAlgorithmERNSt3__110shared_ptrI19TimelineElementBaseEES4_ + 209356
3   Liberation                          0x0000000103221800 _ZN14ColourGradient9lessByPosERK10ColourStopS2_ + 70644
4   Liberation                          0x0000000102f204e4 _ZN11ofParameterIiE14eventsSetValueERKi + 2352
5   Liberation                          0x0000000103220c98 _ZN14ColourGradient9lessByPosERK10ColourStopS2_ + 67724
6   Liberation                          0x000000010321bdd4 _ZN14ColourGradient9lessByPosERK10ColourStopS2_ + 47560
7   CoreMIDI                            0x00000001a5615ac4 _ZN4MIDI14PacketizerBaseINS_16LegacyPacketListEED2Ev + 60
8   CoreMIDI                            0x00000001a56158b8 _ZN4MIDI24MIDIPacketList_DelivererclEPKNS_9EventListE + 172
9   CoreMIDI                            0x00000001a561a788 _ZN11MIDIProcess16MIDIInPortThread3RunEv + 440
10  CoreMIDI                            0x00000001a5617a64 _ZN12CADeprecated7XThread9RunHelperEPv + 48
11  CoreMIDI                            0x00000001a56196c0 _ZN12CADeprecated9CAPThread5EntryEPS0_ + 92
12  libsystem_pthread.dylib             0x000000018ba1a034 _pthread_start + 136
13  libsystem_pthread.dylib             0x000000018ba14e3c thread_start + 8

=== Crash Detected (Signal 11) ===
0   Liberation                          0x00000001004c3b5c _ZN8Timeline13sortAlgorithmERNSt3__110shared_ptrI19TimelineElementBaseEES4_ + 1025020
1   libsystem_platform.dylib            0x0000000186361a24 _sigtramp + 56
2   Liberation                          0x00000001003fc92c _ZN8Timeline13sortAlgorithmERNSt3__110shared_ptrI19TimelineElementBaseEES4_ + 209356
3   Liberation                          0x00000001006b1800 _ZN14ColourGradient9lessByPosERK10ColourStopS2_ + 70644
4   Liberation                          0x00000001003b04e4 _ZN11ofParameterIiE14eventsSetValueERKi + 2352
5   Liberation                          0x00000001006b0c98 _ZN14ColourGradient9lessByPosERK10ColourStopS2_ + 67724
6   Liberation                          0x00000001006abdd4 _ZN14ColourGradient9lessByPosERK10ColourStopS2_ + 47560
7   CoreMIDI                            0x000000019ff2dac4 _ZN4MIDI14PacketizerBaseINS_16LegacyPacketListEED2Ev + 60
8   CoreMIDI                            0x000000019ff2d8b8 _ZN4MIDI24MIDIPacketList_DelivererclEPKNS_9EventListE + 172
9   CoreMIDI                            0x000000019ff32788 _ZN11MIDIProcess16MIDIInPortThread3RunEv + 440
10  CoreMIDI                            0x000000019ff2fa64 _ZN12CADeprecated7XThread9RunHelperEPv + 48
11  CoreMIDI                            0x000000019ff316c0 _ZN12CADeprecated9CAPThread5EntryEPS0_ + 92
12  libsystem_pthread.dylib             0x0000000186332034 _pthread_start + 136
13  libsystem_pthread.dylib             0x000000018632ce3c thread_start + 8

=== Crash Detected (Signal 11) ===
0   Liberation                          0x0000000100773b5c _ZN8Timeline13sortAlgorithmERNSt3__110shared_ptrI19TimelineElementBaseEES4_ + 1025020
1   libsystem_platform.dylib            0x0000000186361a24 _sigtramp + 56
2   Liberation                          0x00000001006ac92c _ZN8Timeline13sortAlgorithmERNSt3__110shared_ptrI19TimelineElementBaseEES4_ + 209356
3   Liberation                          0x0000000100961800 _ZN14ColourGradient9lessByPosERK10ColourStopS2_ + 70644
4   Liberation                          0x00000001006604e4 _ZN11ofParameterIiE14eventsSetValueERKi + 2352
5   Liberation                          0x0000000100960c98 _ZN14ColourGradient9lessByPosERK10ColourStopS2_ + 67724
6   Liberation                          0x000000010095bdd4 _ZN14ColourGradient9lessByPosERK10ColourStopS2_ + 47560
7   CoreMIDI                            0x000000019ff2dac4 _ZN4MIDI14PacketizerBaseINS_16LegacyPacketListEED2Ev + 60
8   CoreMIDI                            0x000000019ff2d8b8 _ZN4MIDI24MIDIPacketList_DelivererclEPKNS_9EventListE + 172
9   CoreMIDI                            0x000000019ff32788 _ZN11MIDIProcess16MIDIInPortThread3RunEv + 440
10  CoreMIDI                            0x000000019ff2fa64 _ZN12CADeprecated7XThread9RunHelperEPv + 48
11  CoreMIDI                            0x000000019ff316c0 _ZN12CADeprecated9CAPThread5EntryEPS0_ + 92
12  libsystem_pthread.dylib             0x0000000186332034 _pthread_start + 136
13  libsystem_pthread.dylib             0x000000018632ce3c thread_start + 8


Good catch! Fixed in the next release, thanks!