Comment 0 for bug 1136890

Revision history for this message
rob (another-rob) wrote :

I'm getting the following error when I call engine.Trigger in a controller script:

Warning [Controller]: ControllerEngine::slotValueChanged() Shouldn't happen -- sender == NULL

...and there's some other strange behaviour associated with the error. I'm also getting messages saying:

Warning: [Controller]: Could not Disconnect connection "myfunction"

I'm assuming from the "shouldn't happen" bit that this error message shouldn't be displayed, so I suspect that I might have found a bug in mixxx rather than (or maybe in addition to) a bug in my controller script.

If it's not a mixxx bug, could you give me some insight on what the "Shouldn't happen" error indicates? What does slotValueChanged() indicate?

##########################
details:

I'm mapping a Korg Nanokontrol2, and the error is associated with pressing the "cycle" button - it's possible that the cycle button has a weird behaviour in the controller itself that mixxx is not able to handle (although the midi output seems normal, just an on and off CC message...)

I'm calling engine.Trigger to update LEDs in an area of my script which handles mode switches (in my mixxx script I've set up the nanokontrol2 so it has several banks of buttons, when the banks switch, the function containing engine.trigger is called. Among other things, the function clears old hooks, and sets new ones for the new mode.) The cycle button acts as a toggled on/off modifier (so, a given bank would have two states, "cycle on" and "cycle off"). The "shouldn't happen" warning occurs when the cycle mode switches to "off" from "on". Everything works fine, including all hooks, when I first activate a bank, it's only when the cycle mode switches on and then off that I get the warnings - the "shouldn't happen" warning happens when cycle mode is switched off, and the "could not disconnect" error happens when cycle mode is subsequently switched on (not the first time it's switched on though). The LED hooks work fine in cycle mode, but don't work in cycle off mode.

I've attached the script I'm working on. The error happens at the engine.Trigger in the updateLEDs() function. (line 249) All the print()s in that function are just there for debugging purposes... The eval() statement following engine.Trigger essentially does what Trigger should be doing, it's for debugging purposes too - it calls the function associated with the hook, and passes the relevant values to light the relevant LED. When the eval statement is run, the LED lights as it should, but the hook doesn't get set, so subsequent changes to the mixxx control don't trigger the LED.