You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to provide a clean repo as I am not the owner of the code.
As soon as the code attempts to trigger the static function, I get the error call stack which I posted below.
Note that this pseudo code is not crashing for me, but it's very similar to the code I'm dealing with.
'use strict';
// Static function crash example.
(function() {
class CrashClass {
static staticFunctionCrash(id) {
console.log('CRASH TEST: Should not see this log in console.');
}
}
class GrandChild {
constructor() {
this.messageInstance = null;
}
static staticCall() {
let dest = new GrandChild();
dest.instanceCall();
return dest;
}
instanceCall() {
this.messageInstance = CrashClass.staticFunctionCrash(183);
}
}
class Child {
constructor() {
this.grandChild = null;
}
static staticCall() {
let dest = new Child();
dest.instanceCall();
return dest;
}
instanceCall() {
this.grandChild = GrandChild.staticCall();
}
}
class Parent {
constructor() {
this.child = null;
}
static staticCall() {
console.log('CRASH TEST: Start.');
let dest = new Parent();
dest.instanceCall();
return dest;
}
instanceCall() {
this.child = Child.staticCall();
}
}
const exports = {
CrashClass: CrashClass,
GrandChild: GrandChild,
Child: Child,
Parent: Parent,
};
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
module.exports = exports;
} else {
console.log('CRASH TEST: Unexpected.');
}
})();
How often does it reproduce? Is there a required condition?
Version
All versions up starting from 16.9.0
Platform
Darwin Kernel Version 20.6.0
Subsystem
N/A
What steps will reproduce the bug?
I am unable to provide a clean repo as I am not the owner of the code.
As soon as the code attempts to trigger the static function, I get the error call stack which I posted below.
Note that this pseudo code is not crashing for me, but it's very similar to the code I'm dealing with.
How often does it reproduce? Is there a required condition?
No issues found in;
What is the expected behavior?
No crash.
What do you see instead?
Additional information
The code that triggered this crash has been around for many years, and only started throwing this error once I upgraded to version 16.9+.
The text was updated successfully, but these errors were encountered: