-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Comments
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! |
Sorry I was just trying to refer to the topic, I understand that coding is required,
then it says: |
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. |
@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. |
Current prognosis August (second week earliest). |
No worries, we already merged that PR. Just test whether the newest 2.4 beta version works with the DDM4000 mapping now. |
did you find time to check this? |
@ronso0 |
Yes, the error occurs right after selecting the mapping and pressing ok. |
have you cleared out your user controller mapping folder? Maybe it contains a faulty mapping version. |
it is a fresh install and I double checked that my user controller mapping folder is indeed empty. |
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();
} |
I receive this in cmd window after applying the requested patch:
|
Okay I need a little more info. what about the output from this? please also launch mixxx with 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.
|
The following console output is created with you last script extensions:
|
And here the output as requested with
|
can you add a |
here you go... (let me know if you need further logs)
|
I stumbled upon this comment of commit 0975c8b which might be related:
I'm not a JS expert. Could it be that the |
If I understand correctly, the 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);
}, LogToggle Log
|
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 |
No luck so far, the only stack trace I ever get is
I tried:
|
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
}
|
I think I found the culprit:
Function in double arrow syntaxthis.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);
Function declared with
|
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. |
This issue is addressed by PR #12969. |
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.Version
No response
OS
No response
The text was updated successfully, but these errors were encountered: