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

Crash with version 1.3.5 #7

Open
MatthiasMann opened this issue Aug 29, 2024 · 2 comments
Open

Crash with version 1.3.5 #7

MatthiasMann opened this issue Aug 29, 2024 · 2 comments

Comments

@MatthiasMann
Copy link
Contributor

I upgraded to version 1.3.5 and get this error:

function set_range_y()
 threw TypeError: range is undefined
    calculateGrid https://localhost/amixer/aux/src/widgets/frequencyresponse.js:24
    set_range_y https://localhost/amixer/aux/src/widgets/frequencyresponse.js:129
    callHandler https://localhost/amixer/aux/src/implements/base.js:33
    dispatchEvents https://localhost/amixer/aux/src/implements/base.js:45
    emit https://localhost/amixer/aux/src/implements/base.js:644
    set https://localhost/amixer/aux/src/implements/base.js:406
    set https://localhost/amixer/aux/src/widgets/widget.js:849
    set https://localhost/amixer/aux/src/widgets/equalizer.js:438
    defineRange https://localhost/amixer/aux/src/utils/define_range.js:74
    initialize https://localhost/amixer/aux/src/widgets/chart.js:322
    initialize https://localhost/amixer/aux/src/widgets/frequencyresponse.js:135
    initialize https://localhost/amixer/aux/src/widgets/equalizer.js:283
    Base https://localhost/amixer/aux/src/implements/base.js:256
    Widget https://localhost/amixer/aux/src/widgets/widget.js:499
    Chart https://localhost/amixer/aux/src/widgets/chart.js:124
    FrequencyResponse https://localhost/amixer/aux/src/widgets/frequencyresponse.js:69
    Equalizer https://localhost/amixer/aux/src/widgets/equalizer.js:253
    component https://localhost/amixer/aux/src/component_helpers.js:493
@arneg
Copy link
Member

arneg commented Aug 30, 2024

What arguments to you pass to Equalizer? Is it possible that range_y is undefined?

@MatthiasMann
Copy link
Contributor Author

I'm doing this:

  let eq = document.createElement('aux-equalizer');
  eq.auxWidget.set("range_x", {
    min: 50,
    max: 20000,
    scale: 'frequency'
  });
  eq.auxWidget.set("range_y", {
    min: -30,
    max: 30
  });
  eq.auxWidget.set("range_z", {
    min: 0.025,
    max: 40,
    step: 0.1,
    reverse: true
  });

I think it is a race condition where range_y has not yet been set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants