Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with midi-components-0.0.js #11473

Closed
elgithubo opened this issue Apr 11, 2023 · 28 comments
Closed

Problem with midi-components-0.0.js #11473

elgithubo opened this issue Apr 11, 2023 · 28 comments
Labels
bug stale Stale issues that haven't been updated for a long time.

Comments

@elgithubo
Copy link

Bug Description

The following git diff is required for the Behringer DDM4000 in order to work and might be required for all midi devices on FreeBSD 13.2-RC3.

diff --git a/res/controllers/midi-components-0.0.js b/res/controllers/midi-components-0.0.js
index 6bed8a8bf2..8631be97a9 100644
--- a/res/controllers/midi-components-0.0.js
+++ b/res/controllers/midi-components-0.0.js
@@ -123,7 +123,7 @@
                 undefined !== this.outKey &&
                 undefined !== this.output &&
                 typeof this.output === "function") {
-                this.connections[0] = engine.makeConnection(this.group, this.outKey, this.output.bind(this));
+                //this.connections[0] = engine.makeConnection(this.group, this.outKey, this.output.bind(this));
             }
         },
         disconnect: function() {

Version

No response

OS

No response

@elgithubo elgithubo added the bug label Apr 11, 2023
@Swiftb0y
Copy link
Member

As I outlined in your previous PR, this is vital line for componentsjs to work correctly. Please post the actual error message your receive when you use your DDM4000 so we can work on fixing the problem. Repeatedly posting a patch that will not work won't get this fixed. Thank you!

@elgithubo
Copy link
Author

Sorry I was just trying to refer to the topic, I understand that coding is required,
When I start mixxx with the original coding I receive the following error:

Uncaught exception: file:///usr/local/share/mixxx/controllers/midi-components-0.0.js:126: Error: script tried to connect to ControlObject ([Channel1], ) which is non-existent.
Backtrace: connect@file:///usr/local/share/mixxx/controllers/midi-components-0.0.js:126
Component@file:///usr/local/share/mixxx/controllers/midi-components-0.0.js:50
Button@file:///usr/local/share/mixxx/controllers/midi-components-0.0.js:163
createComponent@file:///usr/local/share/mixxx/controllers/Behringer-Extension-scripts.js:1568
@file:///usr/local/share/mixxx/controllers/Behringer-Extension-scripts.js:1394
createDeck@file:///usr/local/share/mixxx/controllers/Behringer-Extension-scripts.js:1391
@file:///usr/local/share/mixxx/controllers/Behringer-Extension-scripts.js:1366
notify@file:///usr/local/share/mixxx/controllers/Behringer-Extension-scripts.js:293
schedule@file:///usr/local/share/mixxx/controllers/Behringer-Extension-scripts.js:287
throttle@file:///usr/local/share/mixxx/controllers/Behringer-Extension-scripts.js:112
@file:///usr/local/share/mixxx/controllers/Behringer-Extension-scripts.js:1365
@file:///usr/local/share/mixxx/controllers/Behringer-Extension-scripts.js:1364
createLayerManager@file:///usr/local/share/mixxx/controllers/Behringer-Extension-scripts.js:1334
init@file:///usr/local/share/mixxx/controllers/Behringer-Extension-scripts.js:1278

then it says:
"The mapping for your controller "port-0" is not working properly. The script code needs to be fixed. The functionality provided by this controller mapping will be disabled until the issue has been resolved."

@Swiftb0y
Copy link
Member

Thank you. That indicates a bigger issue for more mappings in mixxx that will have to be solved in either the mappings, or the C++ side of things. I'll try to look into it.

@Swiftb0y
Copy link
Member

@elgithubo Can you test the DDM4000 mapping with #11474? You can either use the prebuilt-binaries at the bottom of this page or build from source if your OS is not being built by us.

@elgithubo
Copy link
Author

elgithubo commented May 8, 2023

I will asap. @Swiftb0y
(edit: added @Swiftb0y)

@elgithubo
Copy link
Author

Current prognosis August (second week earliest).

@Swiftb0y
Copy link
Member

Swiftb0y commented Jul 4, 2023

No worries, we already merged that PR. Just test whether the newest 2.4 beta version works with the DDM4000 mapping now.

@Swiftb0y Swiftb0y added the stale Stale issues that haven't been updated for a long time. label Dec 5, 2023
@ronso0
Copy link
Member

ronso0 commented Jan 9, 2024

@elgithubo

Just test whether the newest 2.4 beta version works with the DDM4000 mapping now.

did you find time to check this?

@elgithubo
Copy link
Author

@ronso0
I have tested with latest beta for Windows (mixxx-2.4-beta-335-g9218c6a09b-win64).
Unfortunately I receive the following error (sorry for the German GUI):
image

@Swiftb0y
Copy link
Member

I have no idea why thats happening. Its not related to #12401 nor #12468. The Timer code at the location pointed to by the trace looks completely clean. When did error occur? right when you enabled the mapping?

@elgithubo
Copy link
Author

Yes, the error occurs right after selecting the mapping and pressing ok.

@Swiftb0y
Copy link
Member

Swiftb0y commented Jan 12, 2024

have you cleared out your user controller mapping folder? Maybe it contains a faulty mapping version.

@elgithubo
Copy link
Author

it is a fresh install and I double checked that my user controller mapping folder is indeed empty.

@Swiftb0y
Copy link
Member

Can you apply this patch and give me the debug output it produces?

diff --git a/res/controllers/Behringer-Extension-scripts.js b/res/controllers/Behringer-Extension-scripts.js
index f83d6dd45d..e89a1ebe26 100644
--- a/res/controllers/Behringer-Extension-scripts.js
+++ b/res/controllers/Behringer-Extension-scripts.js
@@ -240,6 +240,8 @@
         start: function() {
             this.reset();
             this.id = engine.beginTimer(this.timeout, () => {
+                console.warn(Object.keys(this));
+                console.trace();
                 if (this.oneShot) {
                     this.disable();
                 }

@elgithubo
Copy link
Author

I receive this in cmd window after applying the requested patch:

C:\Users\tinoe>"C:\Program Files\Mixxx\mixxx.exe"

C:\Users\tinoe>Using preferences ScaleFactor 1
Loading resources from  "C:/Program Files/Mixxx/"
Configuration file is at the current version "2.4.0-beta"
BroadcastSettings - Found 1 profile(s)
Failed to load libjack DLL: 405919536libjack not found, so do not try to load  jack_client_open ffs  !
warning [Controller] "script tried to connect to ControlObject ([Channel1], ) which is non-existent."
warning [Controller] "script tried to connect to ControlObject ([Channel1], ) which is non-existent."
warning [Controller] [timeout,oneShot,action,owner,id]
warning [Controller] ControllerScriptHandlerBase: "Uncaught exception: file:///C:/Program Files/Mixxx/controllers/Behringer-Extension-scripts.js:246: TypeError: Property 'disable' of object [object Object] is not a function\nBacktrace: @file:///C:/Program Files/Mixxx/controllers/Behringer-Extension-scripts.js:246"

@Swiftb0y
Copy link
Member

Okay I need a little more info. what about the output from this? please also launch mixxx with --controller-debug

diff --git a/res/controllers/Behringer-Extension-scripts.js b/res/controllers/Behringer-Extension-scripts.js
index f83d6dd45d..f7c84176f5 100644
--- a/res/controllers/Behringer-Extension-scripts.js
+++ b/res/controllers/Behringer-Extension-scripts.js
@@ -230,16 +230,22 @@
      * @public
      * @see https://github.com/mixxxdj/mixxx/wiki/Script-Timers
      */
+    console.warn("defining Timer ctor")
     var Timer = function(options) {
         _.assign(this, options);
+        console.warn(Object.keys(this));
         this.disable();
     };
+    console.warn("defining prototype")
     Timer.prototype = {
         disable: function() { this.id = 0; },
         isEnabled: function() { return this.id !== 0; },
         start: function() {
             this.reset();
+            console.warn(Object.keys(this));
             this.id = engine.beginTimer(this.timeout, () => {
+                console.warn(Object.keys(this));
+                console.trace();
                 if (this.oneShot) {
                     this.disable();
                 }
@@ -260,6 +266,7 @@
             }
         }
     };
+    console.warn("defined prototype")
 
     /**
      * An object that enforces a constant delay between the execution of consecutive actions.

@elgithubo
Copy link
Author

The following console output is created with you last script extensions:

Using preferences ScaleFactor 1
Loading resources from  "C:/Program Files/Mixxx/"
Configuration file is at the current version "2.4.0-beta"
BroadcastSettings - Found 1 profile(s)
Failed to load libjack DLL: -1785220384libjack not found, so do not try to load  jack_client_open ffs  !
warning [Controller] defining Timer ctor
warning [Controller] defining prototype
warning [Controller] defined prototype
warning [Controller] [timeout,oneShot,action,owner]
warning [Controller] "script tried to connect to ControlObject ([Channel1], ) which is non-existent."
warning [Controller] "script tried to connect to ControlObject ([Channel1], ) which is non-existent."
warning [Controller] [timeout,oneShot,action,owner,id]
warning [Controller] [timeout,oneShot,action,owner,id]
warning [Controller] ControllerScriptHandlerBase: "Uncaught exception: file:///C:/Program Files/Mixxx/controllers/Behringer-Extension-scripts.js:250: TypeError: Property 'disable' of object [object Object] is not a function\nBacktrace: @file:///C:/Program Files/Mixxx/controllers/Behringer-Extension-scripts.js:250"

@elgithubo
Copy link
Author

And here the output as requested with --controller-debug:

C:\Users\tinoe>"C:\Program Files\Mixxx\mixxx.exe" --controller-debug

C:\Users\tinoe>Using preferences ScaleFactor 1
Loading resources from  "C:/Program Files/Mixxx/"
Configuration file is at the current version "2.4.0-beta"
BroadcastSettings - Found 1 profile(s)
info [Main] Loaded skin "LateNight"
info [Main] SoundSourceSndFile - Disabling OGG decoding for "libsndfile-1.2.0"
info [Main] SoundSourceProxy - SoundSource providers for file type "aac"
info [Main] SoundSourceProxy - 4 (higher) : "Microsoft Media Foundation 10.0.22621.2506"
info [Main] SoundSourceProxy - SoundSource providers for file type "aiff"
info [Main] SoundSourceProxy - 3 (default) : "libsndfile"
info [Main] SoundSourceProxy - SoundSource providers for file type "caf"
info [Main] SoundSourceProxy - 2 (lower) : "libsndfile"
info [Main] SoundSourceProxy - SoundSource providers for file type "flac"
info [Main] SoundSourceProxy - 4 (higher) : "Xiph.org libFLAC"
info [Main] SoundSourceProxy - 2 (lower) : "libsndfile"
info [Main] SoundSourceProxy - SoundSource providers for file type "it"
info [Main] SoundSourceProxy - 3 (default) : "MODPlug"
info [Main] SoundSourceProxy - SoundSource providers for file type "m4a"
info [Main] SoundSourceProxy - 4 (higher) : "Microsoft Media Foundation 10.0.22621.2506"
info [Main] SoundSourceProxy - SoundSource providers for file type "mod"
info [Main] SoundSourceProxy - 3 (default) : "MODPlug"
info [Main] SoundSourceProxy - SoundSource providers for file type "mp3"
info [Main] SoundSourceProxy - 3 (default) : "MAD: MPEG Audio Decoder 0.15.1 (beta) NDEBUG FPM_64BIT ASO_ZEROCHECK"
info [Main] SoundSourceProxy - SoundSource providers for file type "mp4"
info [Main] SoundSourceProxy - 4 (higher) : "Microsoft Media Foundation 10.0.22621.2506"
info [Main] SoundSourceProxy - SoundSource providers for file type "ogg"
info [Main] SoundSourceProxy - 4 (higher) : "Xiph.org OggVorbis"
info [Main] SoundSourceProxy - SoundSource providers for file type "okt"
info [Main] SoundSourceProxy - 3 (default) : "MODPlug"
info [Main] SoundSourceProxy - SoundSource providers for file type "opus"
info [Main] SoundSourceProxy - 4 (higher) : "Xiph.org libopusfile"
info [Main] SoundSourceProxy - SoundSource providers for file type "s3m"
info [Main] SoundSourceProxy - 3 (default) : "MODPlug"
info [Main] SoundSourceProxy - SoundSource providers for file type "stm"
info [Main] SoundSourceProxy - 3 (default) : "MODPlug"
info [Main] SoundSourceProxy - SoundSource providers for file type "wav"
info [Main] SoundSourceProxy - 3 (default) : "libsndfile"
info [Main] SoundSourceProxy - SoundSource providers for file type "wv"
info [Main] SoundSourceProxy - 4 (higher) : "WavPack"
info [Main] SoundSourceProxy - SoundSource providers for file type "xm"
info [Main] SoundSourceProxy - 3 (default) : "MODPlug"
info [Main] DbConnection - Available drivers for database connections: ("QSQLITE", "QODBC", "QODBC3")
info [Main] DbConnectionPool - Cloned thread-local database connection "MIXXX-1" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [Main] CoreServices - Connecting to database
info [Main] CoreServices - Initializing or upgrading database schema
info [Main] SchemaManager - Database schema is up-to-date at version 39
Failed to load libjack DLL: -1179757456libjack not found, so do not try to load  jack_client_open ffs  !
info [Main] GlobalTrackCache - Creating instance
info [Main] TrackCollection - Connecting database
info [Main] TrackCollectionManager - Starting library scanner thread
info [LibraryScanner 1] DbConnectionPool - Cloned thread-local database connection "MIXXX-2" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [Main] TrackCollection - Connecting track source
info [Main] Prepared deletion of 0 playlists of type 2 that contain fewer than 1 tracks
info [Main] Library - Access to directory QFileInfo(C:\Users\tinoe\Music) from sandbox granted
info [AnalyzerThread 0 #1] DbConnectionPool - Cloned thread-local database connection "MIXXX-3" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [AnalyzerThread 7 #2] DbConnectionPool - Cloned thread-local database connection "MIXXX-4" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [AnalyzerThread 1 #3] DbConnectionPool - Cloned thread-local database connection "MIXXX-5" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [AnalyzerThread 3 #4] DbConnectionPool - Cloned thread-local database connection "MIXXX-6" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [AnalyzerThread 6 #6] DbConnectionPool - Cloned thread-local database connection "MIXXX-8" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [AnalyzerThread 5 #7] DbConnectionPool - Cloned thread-local database connection "MIXXX-9" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [AnalyzerThread 4 #5] DbConnectionPool - Cloned thread-local database connection "MIXXX-7" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [AnalyzerThread 2 #8] DbConnectionPool - Cloned thread-local database connection "MIXXX-10" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [Main] Loaded skin "LateNight"
info [Main] Loaded skin "LateNight"
info [Main] Loaded skin "LateNight"
info [Controller] Scanning USB HID devices
info [Controller] Found HID device: { 06cb:ce25 r103 | Usage: 000d:0005 | Manufacturer: Microsoft | Product: HIDI2C Device | S/N: 9999 }
info [Controller] Found HID device: { 06cb:ce25 r103 | Usage: 000d:000e | Manufacturer: Microsoft | Product: HIDI2C Device | S/N: 9999 }
info [Controller] Found HID device: { 041e:6100 r100 | Usage: 000c:0001 | Interface: #0 | Manufacturer: Creative Technology Ltd | Product: SXFI Headphone Audio | S/N: D522EF7A2579CFC6 }
info [Controller] Found HID device: { 06cb:ce25 r103 | Usage: ff00:0001 | Manufacturer: Microsoft | Product: HIDI2C Device | S/N: 9999 }
info [Controller] Found HID device: { 8087:0a1e r200 | Usage: 0001:000c }
info [Controller] Found HID device: { 048d:8910 r1 | Usage: ff89:0010 | Manufacturer: ITE Tech. Inc. | Product: ITE Device(829x) }
info [Controller] Found HID device: { 048d:8297 r3 | Usage: ff89:0010 | Manufacturer: ITE Tech. Inc. | Product: ITE Device(8595) }
info [Controller] Found HID device: { 0b05:198c r110 | Usage: ffa0:0001 | Product: ROG Gaming Display Aura Device }
info [Controller] Found HID device: { 048d:8910 r1 | Usage: ff89:00cc | Manufacturer: ITE Tech. Inc. | Product: ITE Device(829x) }
info [Controller] Found HID device: { 048d:8297 r3 | Usage: ff89:00cc | Manufacturer: ITE Tech. Inc. | Product: ITE Device(8595) }
info [Controller] Found HID device: { 045e:0811 r114 | Usage: 000b:0001 | Interface: #4 | Manufacturer: Microsoft | Product: Microsoft® LifeCam Studio(TM) }
info [Controller] Found HID device: { 048d:8910 r1 | Usage: ff89:00ce | Manufacturer: ITE Tech. Inc. | Product: ITE Device(829x) }
info [Controller] Excluding HID device { 0b05:18e7 r133 | Usage: 0001:0006 | Manufacturer: ASUSTeK | Product: ROG CHAKRAM | S/N: 0cec807c0bdd }
info [Controller] Found HID device: { 048d:8910 r1 | Usage: ff89:00cf | Manufacturer: ITE Tech. Inc. | Product: ITE Device(829x) }
info [Controller] Found HID device: { 046a:c098 r303 | Usage: 000c:0001 | Interface: #1 | Manufacturer: Cherry GmbH | Product: CHERRY Corded Device }
info [Controller] Excluding HID device { 046a:c098 r303 | Usage: 0001:0006 | Interface: #0 | Manufacturer: Cherry GmbH | Product: CHERRY Corded Device }
info [Controller] Found HID device: { 041e:3272 r100 | Usage: 000c:0001 | Interface: #3 }
 controller.usbmidiinterface:info [Controller] PortMidiController: Opening USB MIDI Interface index 1 for input
 controller.usbmidiinterface:info [Controller] PortMidiController: Opening USB MIDI Interface index 3 for output
 controller.usbmidiinterface:info [Controller]   Starting engine
 controller.usbmidiinterface:info [Controller] Applying controller mapping...
 controller.usbmidiinterface:debug [Controller] Loading "C:/Program Files/Mixxx/controllers/common-controller-scripts.js"
 controller.usbmidiinterface:debug [Controller] Loading "C:/Program Files/Mixxx/controllers/lodash.mixxx.js"
 controller.usbmidiinterface:debug [Controller] Loading "C:/Program Files/Mixxx/controllers/midi-components-0.0.js"
 controller.usbmidiinterface:debug [Controller] Loading "C:/Program Files/Mixxx/controllers/Behringer-Extension-scripts.js"
 js:warning [Controller] defining Timer ctor
 js:warning [Controller] defining prototype
 js:warning [Controller] defined prototype
 controller.usbmidiinterface:debug [Controller] Loading "C:/Program Files/Mixxx/controllers/Behringer-DDM4000-scripts.js"
 controller.usbmidiinterface:debug [Controller] Executing "DDM4000" . "init"
 js:debug [Controller] [DEBUG] Component registration is throttled using a delay of 40ms
 js:warning [Controller] [timeout,oneShot,action,owner]
 js:debug [Controller] [DEBUG] Creating ComponentContainer 'Default'
 js:debug [Controller] [DEBUG] Creating ComponentContainer 'Shift'
 js:debug [Controller] [DEBUG] LayerManager.unshift()
 controller.usbmidiinterface:debug [Controller] "Connected ([Channel1], orientation) to connection {98406e14-4c99-4616-9a44-1d536fcf59b4}"
 controller.usbmidiinterface.output:debug [Controller] "outgoing: " "USB MIDI Interface:  status 0xB0 (ch 1, opcode 0xB), ctrl 0x20, val 0x7F"
 controller.usbmidiinterface:debug [Controller] "Connected ([Channel1], orientation) to connection {af9757f7-7e33-4294-b68d-d14f9a383ed2}"
 controller.usbmidiinterface.output:debug [Controller] "outgoing: " "USB MIDI Interface:  status 0xB0 (ch 1, opcode 0xB), ctrl 0x21, val 0x00"
 controller.usbmidiinterface:debug [Controller] "Connected ([Channel1], pfl) to connection {77341d07-576b-4408-b6c7-ad68f2cd5370}"
 controller.usbmidiinterface.output:debug [Controller] "outgoing: " "USB MIDI Interface:  status 0x90 (ch 1, opcode 0x9), ctrl 0x3F, val 0x00"
 controller.usbmidiinterface.output:debug [Controller] "outgoing: " "USB MIDI Interface:  status 0xB0 (ch 1, opcode 0xB), ctrl 0x3F, val 0x00"
 controller.usbmidiinterface:warning [Controller] "script tried to connect to ControlObject ([Channel1], ) which is non-existent."
 controller.usbmidiinterface:warning [Controller] "script tried to connect to ControlObject ([Channel1], ) which is non-existent."
 controller.usbmidiinterface:debug [Controller] "Connected ([EqualizerRack1_[Channel1]_Effect1], enabled) to connection {2d4222a6-d444-448e-a70b-de0fcf1ea1e8}"
 controller.usbmidiinterface:debug [Controller] "Connected ([EqualizerRack1_[Channel1]_Effect1], button_parameter1) to connection {67685e7c-9604-469c-a91e-cc41630ab5e0}"
 controller.usbmidiinterface:debug [Controller] "Connected ([EqualizerRack1_[Channel1]_Effect1], button_parameter2) to connection {5eacadb4-6f38-403e-b78f-9cdcd2db8efd}"
 controller.usbmidiinterface:debug [Controller] "Connected ([EqualizerRack1_[Channel1]_Effect1], button_parameter3) to connection {666cea53-6f79-4beb-b80a-3ec2cf8d06ca}"
 controller.usbmidiinterface:debug [Controller] "Connected ([EqualizerRack1_[Channel1]_Effect1], button_parameter1) to connection {51751ed8-b187-43b3-9e83-496faa5c6252}"
 controller.usbmidiinterface.output:debug [Controller] "outgoing: " "USB MIDI Interface:  status 0xB0 (ch 1, opcode 0xB), ctrl 0x3D, val 0x00"
 controller.usbmidiinterface:debug [Controller] "Connected ([EqualizerRack1_[Channel1]_Effect1], button_parameter2) to connection {f885e419-a00a-4916-b9e8-fc33d35ce9ff}"
 controller.usbmidiinterface.output:debug [Controller] "outgoing: " "USB MIDI Interface:  status 0xB0 (ch 1, opcode 0xB), ctrl 0x3B, val 0x00"
 controller.usbmidiinterface:debug [Controller] "Connected ([EqualizerRack1_[Channel1]_Effect1], button_parameter3) to connection {696bbe7d-ba9d-4da5-8297-7504a3583416}"
 controller.usbmidiinterface.output:debug [Controller] "outgoing: " "USB MIDI Interface:  status 0xB0 (ch 1, opcode 0xB), ctrl 0x39, val 0x00"
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x07]: [Channel1],volume)
 js:debug [Controller] [DEBUG] Default: register ([0x90, 0x20]: [Channel1],orientation)
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x20]: [Channel1],orientation)
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x21]: [Channel1],orientation)
 js:debug [Controller] [DEBUG] Default: register ([0x90, 0x3F]: [Channel1],pfl)
 js:debug [Controller] [DEBUG] Default: register ([0x90, 0x03]: [Channel1],undefined)
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x38]: [Channel1],null)
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x37]: [Channel1],null)
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]_Effect1],enabled) without MIDI address
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]_Effect1],meta) without MIDI address
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]],super1) without MIDI address
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]],mix) without MIDI address
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x06]: [EqualizerRack1_[Channel1]_Effect1],parameter1)
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x05]: [EqualizerRack1_[Channel1]_Effect1],parameter2)
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x04]: [EqualizerRack1_[Channel1]_Effect1],parameter3)
 js:debug [Controller] [DEBUG] Default: register ([0x90, 0x02]: [EqualizerRack1_[Channel1]_Effect1],button_parameter1)
 js:debug [Controller] [DEBUG] Default: register ([0x90, 0x01]: [EqualizerRack1_[Channel1]_Effect1],button_parameter2)
 js:debug [Controller] [DEBUG] Default: register ([0x90, 0x00]: [EqualizerRack1_[Channel1]_Effect1],button_parameter3)
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]_Effect1],enabled) without MIDI address
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]_Effect1],meta) without MIDI address
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]],super1) without MIDI address
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]],mix) without MIDI address
 js:debug [Controller] [DEBUG] Default: ignore re-register of ([0xB0, 0x06]: [EqualizerRack1_[Channel1]_Effect1],parameter1)
 js:debug [Controller] [DEBUG] Default: ignore re-register of ([0xB0, 0x05]: [EqualizerRack1_[Channel1]_Effect1],parameter2)
 js:debug [Controller] [DEBUG] Default: ignore re-register of ([0xB0, 0x04]: [EqualizerRack1_[Channel1]_Effect1],parameter3)
 js:debug [Controller] [DEBUG] Default: ignore re-register of ([0x90, 0x02]: [EqualizerRack1_[Channel1]_Effect1],button_parameter1)
 js:debug [Controller] [DEBUG] Default: ignore re-register of ([0x90, 0x01]: [EqualizerRack1_[Channel1]_Effect1],button_parameter2)
 js:debug [Controller] [DEBUG] Default: ignore re-register of ([0x90, 0x00]: [EqualizerRack1_[Channel1]_Effect1],button_parameter3)
 js:warning [Controller] [timeout,oneShot,action,owner,id]
 controller.usbmidiinterface:debug [Controller] Starting one-shot timer: 37
 js:debug [Controller] [DEBUG] LayerManager.init()
 js:debug [Controller] [DEBUG] LayerManager.unshift()
 js:debug [Controller] [DEBUG] USB MIDI Interface.init() completed.
 controller.usbmidiinterface:debug [Controller] Killing timer: 37
 js:warning [Controller] [timeout,oneShot,action,owner,id]
 controller.usbmidiinterface:warning [Controller] ControllerScriptHandlerBase: "Uncaught exception: file:///C:/Program Files/Mixxx/controllers/Behringer-Extension-scripts.js:250: TypeError: Property 'disable' of object [object Object] is not a function\nBacktrace: @file:///C:/Program Files/Mixxx/controllers/Behringer-Extension-scripts.js:250"

@Swiftb0y
Copy link
Member

Swiftb0y commented Jan 13, 2024

can you add a console.trace(); call above the this.id = engine.beginTimer(this.timeout, () => { line and then upload another trace while starting mixxx with the environment variable QT_LOGGING_RULES="js.trace=true" set? otherwise the trace calls stay hidden. Thank you. I appreciate your patience.

@elgithubo
Copy link
Author

here you go... (let me know if you need further logs)

C:\Users\tinoe>"C:\Program Files\Mixxx\mixxx.exe" --controller-debug

C:\Users\tinoe>Using preferences ScaleFactor 1
Loading resources from  "C:/Program Files/Mixxx/"
Configuration file is at the current version "2.4.0-beta"
BroadcastSettings - Found 1 profile(s)
info [Main] Loaded skin "LateNight"
info [Main] SoundSourceSndFile - Disabling OGG decoding for "libsndfile-1.2.0"
info [Main] SoundSourceProxy - SoundSource providers for file type "aac"
info [Main] SoundSourceProxy - 4 (higher) : "Microsoft Media Foundation 10.0.22621.2506"
info [Main] SoundSourceProxy - SoundSource providers for file type "aiff"
info [Main] SoundSourceProxy - 3 (default) : "libsndfile"
info [Main] SoundSourceProxy - SoundSource providers for file type "caf"
info [Main] SoundSourceProxy - 2 (lower) : "libsndfile"
info [Main] SoundSourceProxy - SoundSource providers for file type "flac"
info [Main] SoundSourceProxy - 4 (higher) : "Xiph.org libFLAC"
info [Main] SoundSourceProxy - 2 (lower) : "libsndfile"
info [Main] SoundSourceProxy - SoundSource providers for file type "it"
info [Main] SoundSourceProxy - 3 (default) : "MODPlug"
info [Main] SoundSourceProxy - SoundSource providers for file type "m4a"
info [Main] SoundSourceProxy - 4 (higher) : "Microsoft Media Foundation 10.0.22621.2506"
info [Main] SoundSourceProxy - SoundSource providers for file type "mod"
info [Main] SoundSourceProxy - 3 (default) : "MODPlug"
info [Main] SoundSourceProxy - SoundSource providers for file type "mp3"
info [Main] SoundSourceProxy - 3 (default) : "MAD: MPEG Audio Decoder 0.15.1 (beta) NDEBUG FPM_64BIT ASO_ZEROCHECK"
info [Main] SoundSourceProxy - SoundSource providers for file type "mp4"
info [Main] SoundSourceProxy - 4 (higher) : "Microsoft Media Foundation 10.0.22621.2506"
info [Main] SoundSourceProxy - SoundSource providers for file type "ogg"
info [Main] SoundSourceProxy - 4 (higher) : "Xiph.org OggVorbis"
info [Main] SoundSourceProxy - SoundSource providers for file type "okt"
info [Main] SoundSourceProxy - 3 (default) : "MODPlug"
info [Main] SoundSourceProxy - SoundSource providers for file type "opus"
info [Main] SoundSourceProxy - 4 (higher) : "Xiph.org libopusfile"
info [Main] SoundSourceProxy - SoundSource providers for file type "s3m"
info [Main] SoundSourceProxy - 3 (default) : "MODPlug"
info [Main] SoundSourceProxy - SoundSource providers for file type "stm"
info [Main] SoundSourceProxy - 3 (default) : "MODPlug"
info [Main] SoundSourceProxy - SoundSource providers for file type "wav"
info [Main] SoundSourceProxy - 3 (default) : "libsndfile"
info [Main] SoundSourceProxy - SoundSource providers for file type "wv"
info [Main] SoundSourceProxy - 4 (higher) : "WavPack"
info [Main] SoundSourceProxy - SoundSource providers for file type "xm"
info [Main] SoundSourceProxy - 3 (default) : "MODPlug"
info [Main] DbConnection - Available drivers for database connections: ("QSQLITE", "QODBC", "QODBC3")
info [Main] DbConnectionPool - Cloned thread-local database connection "MIXXX-1" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [Main] CoreServices - Connecting to database
info [Main] CoreServices - Initializing or upgrading database schema
info [Main] SchemaManager - Database schema is up-to-date at version 39
Failed to load libjack DLL: 1020991488libjack not found, so do not try to load  jack_client_open ffs  !
info [Main] GlobalTrackCache - Creating instance
info [Main] TrackCollection - Connecting database
info [Main] TrackCollectionManager - Starting library scanner thread
info [LibraryScanner 1] DbConnectionPool - Cloned thread-local database connection "MIXXX-2" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [Main] TrackCollection - Connecting track source
info [Main] Prepared deletion of 0 playlists of type 2 that contain fewer than 1 tracks
info [Main] Library - Access to directory QFileInfo(C:\Users\tinoe\Music) from sandbox granted
info [AnalyzerThread 0 #1] DbConnectionPool - Cloned thread-local database connection "MIXXX-3" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [AnalyzerThread 1 #2] DbConnectionPool - Cloned thread-local database connection "MIXXX-4" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [AnalyzerThread 5 #6] DbConnectionPool - Cloned thread-local database connection "MIXXX-8" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [AnalyzerThread 7 #7] DbConnectionPool - Cloned thread-local database connection "MIXXX-9" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [AnalyzerThread 4 #5] DbConnectionPool - Cloned thread-local database connection "MIXXX-7" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [AnalyzerThread 2 #3] DbConnectionPool - Cloned thread-local database connection "MIXXX-5" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [AnalyzerThread 6 #8] DbConnectionPool - Cloned thread-local database connection "MIXXX-10" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [AnalyzerThread 3 #4] DbConnectionPool - Cloned thread-local database connection "MIXXX-6" QSqlDatabase(driver="QSQLITE", database="file:///C:/Users/tinoe/AppData/Local/Mixxx/mixxxdb.sqlite", host="", port=-1, user="mixxx", open=true)
info [Main] Loaded skin "LateNight"
info [Main] Loaded skin "LateNight"
info [Controller] Scanning USB HID devices
info [Controller] Found HID device: { 06cb:ce25 r103 | Usage: 000d:0005 | Manufacturer: Microsoft | Product: HIDI2C Device | S/N: 9999 }
info [Controller] Found HID device: { 06cb:ce25 r103 | Usage: 000d:000e | Manufacturer: Microsoft | Product: HIDI2C Device | S/N: 9999 }
info [Controller] Found HID device: { 041e:6100 r100 | Usage: 000c:0001 | Interface: #0 | Manufacturer: Creative Technology Ltd | Product: SXFI Headphone Audio | S/N: D522EF7A2579CFC6 }
info [Controller] Found HID device: { 06cb:ce25 r103 | Usage: ff00:0001 | Manufacturer: Microsoft | Product: HIDI2C Device | S/N: 9999 }
info [Controller] Found HID device: { 8087:0a1e r200 | Usage: 0001:000c }
info [Controller] Found HID device: { 048d:8910 r1 | Usage: ff89:0010 | Manufacturer: ITE Tech. Inc. | Product: ITE Device(829x) }
info [Controller] Found HID device: { 048d:8297 r3 | Usage: ff89:0010 | Manufacturer: ITE Tech. Inc. | Product: ITE Device(8595) }
info [Controller] Found HID device: { 0b05:198c r110 | Usage: ffa0:0001 | Product: ROG Gaming Display Aura Device }
info [Controller] Found HID device: { 048d:8910 r1 | Usage: ff89:00cc | Manufacturer: ITE Tech. Inc. | Product: ITE Device(829x) }
info [Controller] Found HID device: { 048d:8297 r3 | Usage: ff89:00cc | Manufacturer: ITE Tech. Inc. | Product: ITE Device(8595) }
info [Controller] Found HID device: { 045e:0811 r114 | Usage: 000b:0001 | Interface: #4 | Manufacturer: Microsoft | Product: Microsoft® LifeCam Studio(TM) }
info [Controller] Found HID device: { 048d:8910 r1 | Usage: ff89:00ce | Manufacturer: ITE Tech. Inc. | Product: ITE Device(829x) }
info [Controller] Excluding HID device { 0b05:18e7 r133 | Usage: 0001:0006 | Manufacturer: ASUSTeK | Product: ROG CHAKRAM | S/N: 0cec807c0bdd }
info [Controller] Found HID device: { 048d:8910 r1 | Usage: ff89:00cf | Manufacturer: ITE Tech. Inc. | Product: ITE Device(829x) }
info [Controller] Found HID device: { 046a:c098 r303 | Usage: 000c:0001 | Interface: #1 | Manufacturer: Cherry GmbH | Product: CHERRY Corded Device }
info [Controller] Excluding HID device { 046a:c098 r303 | Usage: 0001:0006 | Interface: #0 | Manufacturer: Cherry GmbH | Product: CHERRY Corded Device }
info [Controller] Found HID device: { 041e:3272 r100 | Usage: 000c:0001 | Interface: #3 }
 controller.usbmidiinterface:info [Controller] PortMidiController: Opening USB MIDI Interface index 1 for input
 controller.usbmidiinterface:info [Controller] PortMidiController: Opening USB MIDI Interface index 3 for output
 controller.usbmidiinterface:info [Controller]   Starting engine
 controller.usbmidiinterface:info [Controller] Applying controller mapping...
 controller.usbmidiinterface:debug [Controller] Loading "C:/Program Files/Mixxx/controllers/common-controller-scripts.js"
 controller.usbmidiinterface:debug [Controller] Loading "C:/Program Files/Mixxx/controllers/lodash.mixxx.js"
 controller.usbmidiinterface:debug [Controller] Loading "C:/Program Files/Mixxx/controllers/midi-components-0.0.js"
 controller.usbmidiinterface:debug [Controller] Loading "C:/Program Files/Mixxx/controllers/Behringer-Extension-scripts.js"
 js:warning [Controller] defining Timer ctor
 js:warning [Controller] defining prototype
 js:warning [Controller] defined prototype
 controller.usbmidiinterface:debug [Controller] Loading "C:/Program Files/Mixxx/controllers/Behringer-DDM4000-scripts.js"
 controller.usbmidiinterface:debug [Controller] Executing "DDM4000" . "init"
 js:debug [Controller] [DEBUG] Component registration is throttled using a delay of 40ms
 js:warning [Controller] [timeout,oneShot,action,owner]
 js:debug [Controller] [DEBUG] Creating ComponentContainer 'Default'
 js:debug [Controller] [DEBUG] Creating ComponentContainer 'Shift'
 js:debug [Controller] [DEBUG] LayerManager.unshift()
 controller.usbmidiinterface:debug [Controller] "Connected ([Channel1], orientation) to connection {dc9f9311-ca65-4de4-b843-e2994478837f}"
 controller.usbmidiinterface.output:debug [Controller] "outgoing: " "USB MIDI Interface:  status 0xB0 (ch 1, opcode 0xB), ctrl 0x20, val 0x7F"
 controller.usbmidiinterface:debug [Controller] "Connected ([Channel1], orientation) to connection {773688c0-bdb1-4c9c-a186-33c41be16e41}"
 controller.usbmidiinterface.output:debug [Controller] "outgoing: " "USB MIDI Interface:  status 0xB0 (ch 1, opcode 0xB), ctrl 0x21, val 0x00"
 controller.usbmidiinterface:debug [Controller] "Connected ([Channel1], pfl) to connection {9aecd655-8911-4676-93cf-fdde7ad9e365}"
 controller.usbmidiinterface.output:debug [Controller] "outgoing: " "USB MIDI Interface:  status 0x90 (ch 1, opcode 0x9), ctrl 0x3F, val 0x00"
 controller.usbmidiinterface.output:debug [Controller] "outgoing: " "USB MIDI Interface:  status 0xB0 (ch 1, opcode 0xB), ctrl 0x3F, val 0x00"
 controller.usbmidiinterface:warning [Controller] "script tried to connect to ControlObject ([Channel1], ) which is non-existent."
 controller.usbmidiinterface:warning [Controller] "script tried to connect to ControlObject ([Channel1], ) which is non-existent."
 controller.usbmidiinterface:debug [Controller] "Connected ([EqualizerRack1_[Channel1]_Effect1], enabled) to connection {3d54f28b-5a80-44b4-bbe8-049373cc104a}"
 controller.usbmidiinterface:debug [Controller] "Connected ([EqualizerRack1_[Channel1]_Effect1], button_parameter1) to connection {57a0cefc-c9aa-40b6-8dd5-6533d14e6356}"
 controller.usbmidiinterface:debug [Controller] "Connected ([EqualizerRack1_[Channel1]_Effect1], button_parameter2) to connection {4ed891dd-4106-46ac-890b-d384b261a68f}"
 controller.usbmidiinterface:debug [Controller] "Connected ([EqualizerRack1_[Channel1]_Effect1], button_parameter3) to connection {f9cc2f46-ae3d-4e42-b9ba-5fb7bba6a185}"
 controller.usbmidiinterface:debug [Controller] "Connected ([EqualizerRack1_[Channel1]_Effect1], button_parameter1) to connection {e0da3432-4418-493c-8406-03ec0236e5c3}"
 controller.usbmidiinterface.output:debug [Controller] "outgoing: " "USB MIDI Interface:  status 0xB0 (ch 1, opcode 0xB), ctrl 0x3D, val 0x00"
 controller.usbmidiinterface:debug [Controller] "Connected ([EqualizerRack1_[Channel1]_Effect1], button_parameter2) to connection {58774cad-2b7d-4bad-b025-8862360eb1d2}"
 controller.usbmidiinterface.output:debug [Controller] "outgoing: " "USB MIDI Interface:  status 0xB0 (ch 1, opcode 0xB), ctrl 0x3B, val 0x00"
 controller.usbmidiinterface:debug [Controller] "Connected ([EqualizerRack1_[Channel1]_Effect1], button_parameter3) to connection {697a6f35-e5c1-48cc-a980-82e93fd3a836}"
 controller.usbmidiinterface.output:debug [Controller] "outgoing: " "USB MIDI Interface:  status 0xB0 (ch 1, opcode 0xB), ctrl 0x39, val 0x00"
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x07]: [Channel1],volume)
 js:debug [Controller] [DEBUG] Default: register ([0x90, 0x20]: [Channel1],orientation)
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x20]: [Channel1],orientation)
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x21]: [Channel1],orientation)
 js:debug [Controller] [DEBUG] Default: register ([0x90, 0x3F]: [Channel1],pfl)
 js:debug [Controller] [DEBUG] Default: register ([0x90, 0x03]: [Channel1],undefined)
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x38]: [Channel1],null)
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x37]: [Channel1],null)
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]_Effect1],enabled) without MIDI address
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]_Effect1],meta) without MIDI address
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]],super1) without MIDI address
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]],mix) without MIDI address
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x06]: [EqualizerRack1_[Channel1]_Effect1],parameter1)
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x05]: [EqualizerRack1_[Channel1]_Effect1],parameter2)
 js:debug [Controller] [DEBUG] Default: register ([0xB0, 0x04]: [EqualizerRack1_[Channel1]_Effect1],parameter3)
 js:debug [Controller] [DEBUG] Default: register ([0x90, 0x02]: [EqualizerRack1_[Channel1]_Effect1],button_parameter1)
 js:debug [Controller] [DEBUG] Default: register ([0x90, 0x01]: [EqualizerRack1_[Channel1]_Effect1],button_parameter2)
 js:debug [Controller] [DEBUG] Default: register ([0x90, 0x00]: [EqualizerRack1_[Channel1]_Effect1],button_parameter3)
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]_Effect1],enabled) without MIDI address
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]_Effect1],meta) without MIDI address
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]],super1) without MIDI address
 js:debug [Controller] [DEBUG] Default: ignore ([EqualizerRack1_[Channel1]],mix) without MIDI address
 js:debug [Controller] [DEBUG] Default: ignore re-register of ([0xB0, 0x06]: [EqualizerRack1_[Channel1]_Effect1],parameter1)
 js:debug [Controller] [DEBUG] Default: ignore re-register of ([0xB0, 0x05]: [EqualizerRack1_[Channel1]_Effect1],parameter2)
 js:debug [Controller] [DEBUG] Default: ignore re-register of ([0xB0, 0x04]: [EqualizerRack1_[Channel1]_Effect1],parameter3)
 js:debug [Controller] [DEBUG] Default: ignore re-register of ([0x90, 0x02]: [EqualizerRack1_[Channel1]_Effect1],button_parameter1)
 js:debug [Controller] [DEBUG] Default: ignore re-register of ([0x90, 0x01]: [EqualizerRack1_[Channel1]_Effect1],button_parameter2)
 js:debug [Controller] [DEBUG] Default: ignore re-register of ([0x90, 0x00]: [EqualizerRack1_[Channel1]_Effect1],button_parameter3)
 js:warning [Controller] [timeout,oneShot,action,owner,id]
 controller.usbmidiinterface:debug [Controller] Starting one-shot timer: 16
 js:debug [Controller] [DEBUG] LayerManager.init()
 js:debug [Controller] [DEBUG] LayerManager.unshift()
 js:debug [Controller] [DEBUG] USB MIDI Interface.init() completed.
 controller.usbmidiinterface:debug [Controller] Killing timer: 16
 js:warning [Controller] [timeout,oneShot,action,owner,id]
 controller.usbmidiinterface:warning [Controller] ControllerScriptHandlerBase: "Uncaught exception: file:///C:/Program Files/Mixxx/controllers/Behringer-Extension-scripts.js:251: TypeError: Property 'disable' of object [object Object] is not a function\nBacktrace: @file:///C:/Program Files/Mixxx/controllers/Behringer-Extension-scripts.js:251"
info [Main] Loaded skin "LateNight"

@git-developer
Copy link
Contributor

I stumbled upon this comment of commit 0975c8b which might be related:

componentContainers must not be declared in GenericMidiController.prototype but in an instance method because otherwise it is not considered for property traversal, e.g. Object.prototype.hasOwnProperty() would return false

I'm not a JS expert. Could it be that the disable() function is not visible because it is declared in the prototype?

@git-developer
Copy link
Contributor

git-developer commented Mar 17, 2024

If I understand correctly, the this pointer within the lambda behaves unexpected. I added some debug statements to reveal its value. See below for the statements and a (shortened) log. Does that help, @Swiftb0y?

Unfortunately tracing doesn't work unless the logging category is set manually. If a trace is required, please tell me how to do that.

Code

    Timer.prototype = {
        disable: function() { this.id = 0; },
        isEnabled: function() { return this.id !== 0; },
        start: function() {
            this.reset();
            var timer = this;
            this.id = engine.beginTimer(this.timeout, () => {

                // BEGIN DEBUG LOGGING
                console.debug("=== lambda.this: %s", this);
                console.debug("=== stringifyObject: " + stringifyObject(this));
                console.debug("=== Object.keys:");
                console.debug(Object.keys(this));
                console.debug("=== loop:");
                for (var p in this) {
                   console.debug(p + ": " + this[p]);
                }
                console.log("=== trace:");
                console.trace();
                // END DEBUG LOGGING

                if (timer.oneShot) {
                    timer.disable();
                }
                timer.action.call(timer.owner);
            }, this.oneShot);
        },

Log

Toggle Log
debug [Controller] === lambda.this: %s [object Object]
debug [Controller] === stringifyObject: {
    "timeout": 40,
    "oneShot": true,
    "owner": {
        "delay": 40,
        "locked": true,
        "jobs": [
            {
                "owner": {
                    "config": "{ LARGE OBJECT OMITTED TO SHORTEN LOG }",
                    "controllerId": "MIDI 1 x 1 MIDI 1",
                    "debug": true,
                    "throttler": "[object Object]",
                    "componentContainers": "{ LARGE OBJECT OMITTED TO SHORTEN LOG }",
                    "layerManager": "{ LARGE OBJECT OMITTED TO SHORTEN LOG }",
                    "isShifted": false
                }
            },
            {
                "owner": "[object Object]"
            },
            {
                "owner": "[object Object]"
            },
            {
                "owner": "[object Object]"
            },
            {
                "owner": "[object Object]"
            },
            {
                "owner": "[object Object]"
            },
            {
                "owner": "[object Object]"
            },
            {
                "owner": "[object Object]"
            },
            {
                "owner": "[object Object]"
            },
            {
                "owner": "[object Object]"
            }
        ],
        "unlockTimer": "[object Object]"
    },
    "id": 15
}
debug [Controller] === Object.keys:
debug [Controller] [timeout,oneShot,action,owner,id]
debug [Controller] === loop:
debug [Controller] ColorMapper: function() { [native code] }
debug [Controller] controller: MidiControllerJSProxy(0x7f9cc46144e0)
debug [Controller] midi: MidiControllerJSProxy(0x7f9cc46144e0)
debug [Controller] engine: ControllerScriptInterfaceLegacy(0x7f9cc45e41f0)
debug [Controller] Button: function Button() { [native code] }
debug [Controller] ButtonState: [object Object]
debug [Controller] Control: function Control() { [native code] }
debug [Controller] Controller: function Controller() { [native code] }
debug [Controller] Deck: function Deck() { [native code] }
debug [Controller] LedState: [object Object]
debug [Controller] arrayContains: function arrayContains() { [native code] }
debug [Controller] bpm: function bpm() { [native code] }
debug [Controller] colorCodeFromObject: function colorCodeFromObject() { [native code] }
debug [Controller] colorCodeToObject: function colorCodeToObject() { [native code] }
debug [Controller] msecondstominutes: function msecondstominutes() { [native code] }
debug [Controller] printObject: function printObject() { [native code] }
debug [Controller] script: function script() { [native code] }
debug [Controller] secondstominutes: function secondstominutes() { [native code] }
debug [Controller] stringifyObject: function stringifyObject() { [native code] }
debug [Controller] _: 
debug [Controller] components: [object Object]
debug [Controller] behringer: [object Object]
debug [Controller] DDM4000: [object Object]
debug [Controller] === trace:

@JoergAtGithub
Copy link
Member

You can specify the logging categories to print by the QT_LOGGING_RULES environment variable: https://doc.qt.io/qt-5/qloggingcategory.html#configuring-categories

@git-developer
Copy link
Contributor

No luck so far, the only stack trace I ever get is

debug [Controller] >>> trace:
debug [Controller]  (file:///home/christian/.mixxx/controllers/Behringer-Extension-scripts.js:253)
debug [Controller] <<< trace

I tried:

QT_LOGGING_RULES='js.trace=true;default=true' mixxx
QT_LOGGING_RULES='js.debug=true;js.trace=true;default=true' mixxx
QT_LOGGING_RULES='*.debug=true;*.trace=true;default=true' mixxx --log-level trace
mixxx --log-level trace
QT_LOGGING_RULES="*.trace=true" mixxx --log-level trace

@git-developer
Copy link
Contributor

What kind of black magic is done behind the scenes here?!?

    Timer.prototype = {
        disable: function() { this.id = 0; },
        isEnabled: function() { return this.id !== 0; },
        start: function() {
            this.reset();
            var timer = this;
            this.id = engine.beginTimer(this.timeout, () => {
              console.debug("=== this1: 'this.disable' has type " + typeof this.disable + " and this contains " + Object.keys(this));
              if (this.oneShot) {
                  console.debug("=== this2: 'this.disable' has type " + typeof this.disable + " and this contains " + Object.keys(this));
                  this.disable(); // crash occurs here
              }
debug [Controller] === this1: 'this.disable' has type function and this contains timeout,oneShot,action,owner,id
debug [Controller] === this2: 'this.disable' has type undefined and this contains ColorMapper,controller,midi,engine,Button,ButtonState,Control,Controller,Deck,LedState,arrayContains,bpm,colorCodeFromObject,colorCodeToObject,msecondstominutes,printObject,script,secondstominutes,stringifyObject,_,components,behringer,DDM4000
warning [Controller] ControllerScriptHandlerBase: "Uncaught exception: file:///home/christian/.mixxx/controllers/Behringer-Extension-scripts.js:262: TypeError: Property 'disable' of object [object Object] is not a function\nBacktrace: @file:///home/christian/.mixxx/controllers/Behringer-Extension-scripts.js:262"

@git-developer
Copy link
Contributor

git-developer commented Mar 18, 2024

I think I found the culprit:

this is not delegated to nested code blocks within an double arrow function.

Function in double arrow syntax
this.id = engine.beginTimer(this.timeout, () => {
  console.debug("=== nesting level 0: 'this.disable' has type " + typeof this.disable + " and this contains " + Object.keys(this));
  {
    console.debug("=== nesting level 1: 'this.disable' has type " + typeof this.disable + " and this contains " + Object.keys(this));
    {
        console.debug("=== nesting level 2: 'this.disable' has type " + typeof this.disable + " and this contains " + Object.keys(this));
    }
  }
  console.debug("=== nesting level 0: 'this.disable' has type " + typeof this.disable + " and this contains " + Object.keys(this));
  {
    this.disable(); // crash
  }
}, this.oneShot);
debug [Controller] === nesting level 0: 'this.disable' has type function and this contains timeout,oneShot,action,owner,id
debug [Controller] === nesting level 1: 'this.disable' has type undefined and this contains ColorMapper,controller,midi,engine,Button,ButtonState,Control,Controller,Deck,LedState,arrayContains,bpm,colorCodeFromObject,colorCodeToObject,msecondstominutes,printObject,script,secondstominutes,stringifyObject,_,components,behringer,DDM4000
debug [Controller] === nesting level 2: 'this.disable' has type undefined and this contains ColorMapper,controller,midi,engine,Button,ButtonState,Control,Controller,Deck,LedState,arrayContains,bpm,colorCodeFromObject,colorCodeToObject,msecondstominutes,printObject,script,secondstominutes,stringifyObject,_,components,behringer,DDM4000
debug [Controller] === nesting level 0: 'this.disable' has type function and this contains timeout,oneShot,action,owner,id
warning [Controller] ControllerScriptHandlerBase: "Uncaught exception: file:///home/christian/.mixxx/controllers/Behringer-Extension-scripts.js:259: TypeError: Property 'disable' of object [object Object] is not a function\nBacktrace: @file:///home/christian/.mixxx/controllers/Behringer-Extension-scripts.js:259"
Function declared with function keyword omitting .bind(this)
this.id = engine.beginTimer(this.timeout, function() {
  console.debug("=== nesting level 0: 'this.disable' has type " + typeof this.disable + " and this contains " + Object.keys(this));
  {
    console.debug("=== nesting level 1: 'this.disable' has type " + typeof this.disable + " and this contains " + Object.keys(this));
    {
        console.debug("=== nesting level 2: 'this.disable' has type " + typeof this.disable + " and this contains " + Object.keys(this));
    }
  }
  console.debug("=== nesting level 0: 'this.disable' has type " + typeof this.disable + " and this contains " + Object.keys(this));
  {
    this.disable(); // crash
  }
}, this.oneShot);
debug [Controller] === nesting level 0: 'this.disable' has type undefined and this contains ColorMapper,controller,midi,engine,Button,ButtonState,Control,Controller,Deck,LedState,arrayContains,bpm,colorCodeFromObject,colorCodeToObject,msecondstominutes,printObject,script,secondstominutes,stringifyObject,_,components,behringer,DDM4000
debug [Controller] === nesting level 1: 'this.disable' has type undefined and this contains ColorMapper,controller,midi,engine,Button,ButtonState,Control,Controller,Deck,LedState,arrayContains,bpm,colorCodeFromObject,colorCodeToObject,msecondstominutes,printObject,script,secondstominutes,stringifyObject,_,components,behringer,DDM4000
debug [Controller] === nesting level 2: 'this.disable' has type undefined and this contains ColorMapper,controller,midi,engine,Button,ButtonState,Control,Controller,Deck,LedState,arrayContains,bpm,colorCodeFromObject,colorCodeToObject,msecondstominutes,printObject,script,secondstominutes,stringifyObject,_,components,behringer,DDM4000
debug [Controller] === nesting level 0: 'this.disable' has type undefined and this contains ColorMapper,controller,midi,engine,Button,ButtonState,Control,Controller,Deck,LedState,arrayContains,bpm,colorCodeFromObject,colorCodeToObject,msecondstominutes,printObject,script,secondstominutes,stringifyObject,_,components,behringer,DDM4000
warning [Controller] ControllerScriptHandlerBase: "Uncaught exception: file:///home/christian/.mixxx/controllers/Behringer-Extension-scripts.js:259: TypeError: Property 'disable' of object [object Object] is not a function\nBacktrace: @file:///home/christian/.mixxx/controllers/Behringer-Extension-scripts.js:259"
Function declared with function keyword and .bind(this)
this.id = engine.beginTimer(this.timeout, function() {
  console.debug("=== nesting level 0: 'this.disable' has type " + typeof this.disable + " and this contains " + Object.keys(this));
  {
    console.debug("=== nesting level 1: 'this.disable' has type " + typeof this.disable + " and this contains " + Object.keys(this));
    {
        console.debug("=== nesting level 2: 'this.disable' has type " + typeof this.disable + " and this contains " + Object.keys(this));
    }
  }
  console.debug("=== nesting level 0: 'this.disable' has type " + typeof this.disable + " and this contains " + Object.keys(this));
  {
    this.disable(); // no crash
  }
}.bind(this), this.oneShot);
debug [Controller] === nesting level 0: 'this.disable' has type function and this contains timeout,oneShot,action,owner,id
debug [Controller] === nesting level 1: 'this.disable' has type function and this contains timeout,oneShot,action,owner,id
debug [Controller] === nesting level 2: 'this.disable' has type function and this contains timeout,oneShot,action,owner,id
debug [Controller] === nesting level 0: 'this.disable' has type function and this contains timeout,oneShot,action,owner,id

@git-developer
Copy link
Contributor

git-developer commented Mar 18, 2024

Root cause is QTBUG-95677 (initially found and reported by @Swiftb0y, back in 2021).

Also affects common-hid-packet-parser.js and ES6 update of midi-components-0.1.js.

Fixed QT in 6.2.4 and 6.3.0, thus requiring a workaround until Qt is updated.

@git-developer
Copy link
Contributor

This issue is addressed by PR #12969.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale Stale issues that haven't been updated for a long time.
Projects
None yet
Development

No branches or pull requests

5 participants