mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.3k stars 1.25k forks source link

lodash, multiple variables used before ... declaration, on launch #13451

Open mxmilkiib opened 2 weeks ago

mxmilkiib commented 2 weeks ago

Bug Description

5ced2dee3c6192754b62c21cfad0388b751a89ee on main, Jul 5, tho this isn't that new for me

controller.launchpadpromk3lppromk3midi:info [Controller]   Starting engine
 controller.launchpadpromk3lppromk3midi:info [Controller] Applying controller mapping...
 controller.launchpadpromk3lppromk3midi:debug [Controller] Watching file "/home/milk/.mixxx/controllers/common-controller-scripts.js" for controller auto-reload
 controller.launchpadpromk3lppromk3midi:debug [Controller] Loading "/home/milk/.mixxx/controllers/common-controller-scripts.js"
 controller.launchpadpromk3lppromk3midi:debug [Controller] Watching file "/home/milk/src/mixxx/res/controllers/lodash.mixxx.js" for controller auto-reload
 controller.launchpadpromk3lppromk3midi:debug [Controller] Loading "/home/milk/src/mixxx/res/controllers/lodash.mixxx.js"
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:2391:19 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:2392:29 Variable "isArguments" is used before its declaration at 11250:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:2393:40 Variable "isBuffer" is used before its declaration at 11396:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:2394:51 Variable "isTypedArray" is used before its declaration at 12171:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:2516:7 Variable "baseEach" is used before its declaration at 2830:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:2642:19 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:2649:19 Variable "getTag" is used before its declaration at 6057:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:2652:13 Variable "isBuffer" is used before its declaration at 11396:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:2677:11 Variable "isSet" is used before its declaration at 12108:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:2685:11 Variable "isMap" is used before its declaration at 11785:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:2763:14 Variable "setTimeout" is used before its declaration at 6638:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:2878:33 Variable "computed" is used before its declaration at 2882:15.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:2880:37 Variable "computed" is used before its declaration at 2882:15.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3066:14 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3305:22 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3306:22 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3307:42 Variable "getTag" is used before its declaration at 6057:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3308:42 Variable "getTag" is used before its declaration at 6057:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3317:24 Variable "isBuffer" is used before its declaration at 11396:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3318:14 Variable "isBuffer" is used before its declaration at 11396:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3326:29 Variable "isTypedArray" is used before its declaration at 12171:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3357:37 Variable "getTag" is used before its declaration at 6057:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3449:37 Variable "getTag" is used before its declaration at 6057:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3481:16 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3662:21 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3663:32 Variable "isBuffer" is used before its declaration at 11396:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3664:44 Variable "isTypedArray" is used before its declaration at 12171:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3668:15 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3686:45 Variable "isArguments" is used before its declaration at 11250:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3688:15 Variable "isArguments" is used before its declaration at 11250:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3856:46 Variable "previous" is used before its declaration at 3857:15.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:3941:14 Variable "setToString" is used before its declaration at 6650:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:4203:37 Variable "seen" is used before its declaration at 4204:15.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:4242:11 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:4275:37 Variable "createSet" is used before its declaration at 5452:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:14152:14 Variable "upperFirst" is used before its declaration at 15184:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:10992:14 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:4469:11 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:4472:47 Variable "stringToPath" is used before its declaration at 6728:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:6916:24 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:4808:33 Variable "getSymbols" is used before its declaration at 6024:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:4820:33 Variable "getSymbolsIn" is used before its declaration at 6041:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:4833:20 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:5098:26 Variable "wrapper" is used before its declaration at 5099:17.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:5107:46 Variable "getData" is used before its declaration at 5887:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:5124:46 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:5414:9 Variable "setData" is used before its declaration at 6628:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:5465:19 Variable "getTag" is used before its declaration at 6057:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:5521:42 Variable "getData" is used before its declaration at 5887:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:5552:41 Variable "setData" is used before its declaration at 6628:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:9120:18 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:9165:18 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:5854:14 Variable "setToString" is used before its declaration at 6650:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:9334:18 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:9359:18 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:5865:43 Variable "getSymbols" is used before its declaration at 6024:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:5877:45 Variable "getSymbolsIn" is used before its declaration at 6041:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:6151:10 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:6151:29 Variable "isArguments" is used before its declaration at 11250:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:11477:32 Variable "isTypedArray" is used before its declaration at 12171:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:6261:14 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:6261:32 Variable "isArguments" is used before its declaration at 11250:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:6316:11 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:1852:19 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:1656:35 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:9546:18 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:6439:13 Variable "cache" is used before its declaration at 6445:11.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:6440:11 Variable "cache" is used before its declaration at 6445:11.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:9583:12 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:9587:12 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:9671:18 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:9700:18 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:9741:18 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:9760:18 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:9790:18 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:9810:18 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:9886:18 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:14856:20 Variable "attempt" is used before its declaration at 15239:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:8979:11 Variable "previous" is used before its declaration at 8983:13.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:1414:40 Variable "_" is used before its declaration at 17071:7.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:1414:75 Variable "_" is used before its declaration at 17071:7.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:10645:47 Variable "isArray" is used before its declaration at 11278:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:12830:20 Variable "mergeWith" is used before its declaration at 13464:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:14622:44 Variable "upperFirst" is used before its declaration at 15184:9.
 qt.qml.usedbeforedeclared:warning [Controller] file:///home/milk/src/mixxx/res/controllers/lodash.mixxx.js:16985:30 Variable "chainAll" is used before its declaration at 16992:13.
 controller.launchpadpromk3lppromk3midi:debug [Controller] Watching file "/home/milk/src/mixxx/res/controllers/midi-components-0.0.js" for controller auto-reload
 controller.launchpadpromk3lppromk3midi:debug [Controller] Loading "/home/milk/src/mixxx/res/controllers/midi-components-0.0.js"
 controller.launchpadpromk3lppromk3midi:warning [Controller] ControllerScriptHandlerBase: "Uncaught exception: file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:664: TypeError: Property 'deepMerge' of object function script() { [native code] } is not a function\nBacktrace: applyLayer@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:664\nComponentContainer@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:523\n@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:698\n%entry@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:29"
 controller.launchpadpromk3lppromk3midi.input:debug [Controller] Engine shutdown
warning [Main]      $ connectMenuBar
info [Main] Creating skin control object: "[Deere],show_parallel_waveforms"

Order in my theme;

<scriptfiles>
  <file filename="lodash.mixxx.js" functionprefix=""/>
  <file filename="midi-components-0.0.js" functionprefix=""/>
  <file filename="arg.js" functionprefix="arg"/>
</scriptfiles>
Swiftb0y commented 2 weeks ago

Interesting. the log spam is likely a "regression" due to #11407? As of #12779 you should be able to use midi-components without lodash, so you should be able to "fix" that by removing the first <file ... /> tag. The Typeerror worries me more though:

 controller.launchpadpromk3lppromk3midi:warning [Controller] ControllerScriptHandlerBase: "Uncaught exception: file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:664: TypeError: Property 'deepMerge' of object function script() { [native code] } is not a function\nBacktrace: applyLayer@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:664\nComponentContainer@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:523\n@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:698\n%entry@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:29"

Any Idea @christophehenry?

mxmilkiib commented 2 weeks ago

Yeah that was the second thing I was going to file but I've/I'm not [been] in the swing of things

christophehenry commented 2 weeks ago

Uh. Dunno. I can dig. @mxmilkiib What XML file you use?

mxmilkiib commented 2 weeks ago
xml ``` arg [Channel1] beats_set_halve MIDI Learned from 2 messages. 0xB4 0x01 [Channel1] beats_set_twothirds MIDI Learned from 2 messages. 0xB4 0x02 [Channel1] beats_set_threefourths MIDI Learned from 2 messages. 0xB4 0x03 [Channel1] beats_set_fourthirds MIDI Learned from 2 messages. 0xB4 0x04 [Channel1] beats_set_threehalves MIDI Learned from 2 messages. 0xB4 0x05 [Channel1] beats_set_double MIDI Learned from 2 messages. 0xB4 0x06 [Channel2] beats_set_halve MIDI Learned from 2 messages. 0xB4 0x07 [Channel2] beats_set_twothirds MIDI Learned from 2 messages. 0xB4 0x08 [Channel2] beats_set_threefourths MIDI Learned from 2 messages. 0xB4 0x09 [Channel2] beats_set_fourthirds MIDI Learned from 2 messages. 0xB4 0x0A [Channel2] beats_set_threehalves MIDI Learned from 2 messages. 0xB4 0x0B [Channel2] beats_set_double MIDI Learned from 2 messages. 0xB4 0x0C [Channel3] beats_set_halve MIDI Learned from 2 messages. 0xB4 0x0D [Channel3] beats_set_twothirds MIDI Learned from 2 messages. 0xB4 0x0E [Channel3] beats_set_threefourths MIDI Learned from 2 messages. 0xB4 0x0F [Channel3] beats_set_fourthirds MIDI Learned from 2 messages. 0xB4 0x10 [Channel3] beats_set_threehalves MIDI Learned from 2 messages. 0xB4 0x11 [Channel3] beats_set_double MIDI Learned from 2 messages. 0xB4 0x12 [Channel4] beats_set_halve MIDI Learned from 2 messages. 0xB4 0x13 [Channel4] beats_set_twothirds MIDI Learned from 2 messages. 0xB4 0x14 [Channel1] hotcue_1_activate MIDI Learned from 2 messages. 0x94 0x15 [Channel4] beats_set_threefourths MIDI Learned from 2 messages. 0xB4 0x15 [Channel4] beats_set_fourthirds MIDI Learned from 2 messages. 0xB4 0x16 [Channel4] beats_set_threehalves MIDI Learned from 2 messages. 0xB4 0x17 [Channel4] beats_set_double MIDI Learned from 2 messages. 0xB4 0x18 [Channel1] beats_undo_adjustment MIDI Learned from 2 messages. 0xB4 0x19 [Channel2] beats_undo_adjustment MIDI Learned from 2 messages. 0xB4 0x1A [Channel3] beats_undo_adjustment MIDI Learned from 2 messages. 0xB4 0x1B [Channel4] beats_undo_adjustment MIDI Learned from 2 messages. 0xB4 0x1C [Channel1] stars_down MIDI Learned from 2 messages. 0xB4 0x1D [Channel1] stars_up MIDI Learned from 2 messages. 0xB4 0x1E [Channel2] stars_down MIDI Learned from 2 messages. 0xB4 0x1F [Channel2] stars_up MIDI Learned from 2 messages. 0xB4 0x20 [Channel3] stars_down MIDI Learned from 2 messages. 0xB4 0x21 [Channel3] stars_up MIDI Learned from 2 messages. 0xB4 0x22 [Channel4] stars_down MIDI Learned from 2 messages. 0xB4 0x23 [Channel4] stars_up MIDI Learned from 2 messages. 0xB4 0x24 ```
Here's the js fwiw, unfinished and not working atm, half way through rewriting the logic and renaming vars. Suffering from tendonitis rn ``` // https://github.com/mixxxdj/mixxx/wiki/midi%20scripting // https://github.com/mixxxdj/mixxx/wiki/Components_JS#hotcuebutton // https://fael-downloads-prod.focusrite.com/customer/prod/s3fs-public/downloads/LPP3_prog_ref_guide_200415.pdf // https://github.com/antt0n/Launchpad-Core/blob/main/src/Drivers/LaunchpadProMK3.ts // https://github.com/weskoop/Launchpad-Pro-Mk3-for-Bitwig/blob/main/src/LaunchPad.ts // working title var arg = {} const sysexHeader = [0xF0, 0x00, 0x20, 0x29, 0x02, 0x0E] const sysexFooter = [0xF7] const sysexCustomLayout7 = [0x00, 0x03, 0x06, 0x00] const sysexCustomLayout8 = [0x00, 0x03, 0x07, 0x00] const sysexProgMode = [0x0E, 0x01] // helper function to add the appropriate hex before and after each sysex msg arg.wrapSysex = function(sysexCore) { sysexMsg = sysexHeader.concat(sysexCore, sysexFooter) return sysexMsg } // helper function to make sending sysex neater arg.sendSysex = function(message) { midi.sendSysexMsg(message, message.length) } // static array of Launchpad Pro MK3 custom/programmer mode pad CCs in decimal, from bottom row to top, each two row channel block switched; ch1cc1 on 7th row const LPpads = [ 21, 22, 23, 24, 25, 26, 27, 28, 11, 12, 13, 14, 15, 16, 17, 18, 41, 42, 43, 44, 45, 46, 47, 48, 31, 32, 33, 34, 35, 36, 37, 38, 61, 62, 63, 64, 65, 66, 67, 68, 51, 52, 53, 54, 55, 56, 57, 58, 81, 82, 83, 84, 85, 86, 87, 88, 71, 72, 73, 74, 75, 76, 77, 78 ] arg.init = function() { console.log("################################################################################################") console.log("################################################################################################") console.log("################################################################################################") arg.sendSysex(arg.wrapSysex(sysexCustomLayout7)) // arg.sendSysex(arg.wrapSysex(sysexProgMode)) arg.deck = new components.ComponentContainer() for (let i = 1; i < 4; i++) { console.log("init : " + i) arg.deck[i] = new arg.Deck(i , i); arg.deck[i].setCurrentDeck("[Channel" + i + "]"); } // arg.clearLEDs() } arg.Deck = function(deckNumber, midiChannel) { console.log("deck: " + deckNumber) console.log("midichannel: " + midChannel) components.Deck.call(this, deckNumber) this.hotcueButtons = new components.ComponentContainer() // cc, 1 to 16 for (var i = 1; i <= 16; i++) { // translate indice to LED CC (in the right order) console.log("inner i: " + i) let hotcueAddr = LPpads[ ((midiChannel - 1) * 16) + i - 1 ] console.log("hotcueAddr: " + hotcueAddr) this.hotcueButtons[i] = new components.HotcueButton({ number: i, group: '[Channel' + midiChannel + ']', // 0x90 = solid on // midi: [0x90 + c - 1, n], midi: [0x90, hotcueAddr], // colors automatically assigned by Components.JS framework sendRGB: function (color_obj) { // example Message (hardcoded bytes are controller specific). // colors entries contain 8-bit values, but SysEx only supports 7-bit values // so were bitshifting by 1 to reduce the resolution. // var msg = [0x03, 0x03, LPpadsi, color_obj.red>>1,color_obj.green>>1,color_obj.blue>>1] var msg = [0x03, z, color_obj.red>>1,color_obj.green>>1,color_obj.blue>>1] print(arg.wrapSysex(msg)) // arg.sendSysex(arg.wrapSysex(sysexCustomLayout7)) // arg.sendSysex(arg.wrapSysex(sysexProgMode)) arg.sendSysex(arg.wrapSysex(msg)) // arg.sendSysex(arg.wrapSysex(sysexCustomLayout7)) // var msg = [0x90, LPpadsi, color_obj.red>>1,color_obj.green>>1,color_obj.blue>>1] // send message // midi.sendSysexMsg(msg, msg.length) print(msg) }, off: 0x00 }) } } arg.Deck.prototype = new components.Deck() arg.shutdown = function() { // arg.sendSysex(arg.wrapSysex(sysexCustomLayout7)) } ```
ronso0 commented 2 weeks ago

Instead of pasting 10 pages of xml/js into a comment, please either use the details format

<details><summary>description</summary>
looooooooong text
</details>

or attach the files. Thanks ; )

christophehenry commented 2 weeks ago

I am sorry, I don't understand the error. I'm not able to reproduce it ATM. From the stacktrace, the error comes from here which should happen either as soon as the file is sources and interpreted or when a components.Deck is instanciated. But %entry@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:29 makes me believe it's the first. So it should always reproduce at least when a controller is binded to a midi device…

@mxmilkiib BTW, there was a typo in the script you cc'd:

mixxx/res/controllers/arg.js:68: ReferenceError: midChannel is not defined

It's midiChannel, not midChannel. But other that that, I don't see any error from midi-components-0.0.js.

About the lodash.mixxx.js warning, I'd propose to deprecate the use of this file anyway. Most of its usage in current controllers are _.merge(), _.assign(), which can be replaced by Object.assign() in most cases, _.forEach, which can be replaced by Array.prototype.forEach() and _.filter() which can be replaced by Array.prototype.filter().

Deprecating can happen in 2.5.0 and current controllers rewrite and drop lodash.mixxx.js can happen during development of 2.6 and even script.deepMerge() can be dropped if we don't find any valid use cases (as of now, I'm still unsure it's really usefull and less code is better).

mxmilkiib commented 2 weeks ago

Right o. This is a straight clone, and that theme, so both things must be.. in my .mixxx settings? Weird. Thank ya

Guess I could try rewrite that const as a function so I can continue!

christophehenry commented 2 weeks ago

You can event use ES6/ES7 features to make the code more natural. @Swiftb0y Should I open a ticket to propose depreciation of lodash.mixxx.js?

Swiftb0y commented 2 weeks ago

Sure go ahead.

mxmilkiib commented 2 weeks ago

Emphasis on try! Just as likely I'll succeed as I'll give up on Mixxx for a few more months

mxmilkiib commented 2 days ago

Nah, that didn't work.

Is

Uncaught exception: file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:664: ReferenceError: _ is not defined
Backtrace: applyLayer@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:664
ComponentContainer@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:523
@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:698
%entry@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:29

related? I just pulled and built.

Swiftb0y commented 2 days ago

which mapping is that? You'll need to explicitly pull in lodash before midi-components in the XML. If that is specified, some earlier error may have caused lodash to not get initialized properly.

mxmilkiib commented 2 days ago

With lodash included, I get the messages in the original post. I thought I remembered from before that removing it didn't give this error on start, but idk. The mapping is a mild update from the above mapping. But my JS doesn't get loaded with the include, this lodash vomit happens before that step. This is a weird issue imho.

Swiftb0y commented 1 day ago

well, the lodash vomit are just warnings. the actual problem is

 controller.launchpadpromk3lppromk3midi:warning [Controller] ControllerScriptHandlerBase: "Uncaught exception: file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:664: TypeError: Property 'deepMerge' of object function script() { [native code] } is not a function\nBacktrace: applyLayer@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:664\nComponentContainer@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:523\n@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:698\n%entry@file:///home/milk/src/mixxx/res/controllers/midi-components-0.0.js:29"
 controller.launchpadpromk3lppromk3midi.input:debug [Controller] Engine shutdown

Can you double check that the version of common-controller-scripts.js you have does have a deepMerge defined?

mxmilkiib commented 6 hours ago

I had one of those in my .mixxx/controllers. It didn't have that function. I removed it..

but I still have the same problem.

I've even tried explicitly adding the filename to my .xml, no diff