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

Error when loading menu state #635

Closed
JanEricNitschke opened this issue Mar 5, 2024 · 4 comments
Closed

Error when loading menu state #635

JanEricNitschke opened this issue Mar 5, 2024 · 4 comments

Comments

@JanEricNitschke
Copy link

Hi,

i saved some menu states (detector, event data) to json files. However, when i now try to load them there are issue with 2 out of the three that i have saved.

The error always looks like this:

main.4e86a5dfd62417d2.js:1 ERROR IN PHOENIX APP 
 TypeError: Cannot read properties of undefined (reading 'scale')
    at i.scaleObject (main.4e86a5dfd62417d2.js:1:1355278)
    at Object.n [as onChange] (main.4e86a5dfd62417d2.js:1:1486179)
    at qF.applyConfigState (main.4e86a5dfd62417d2.js:1:1542294)
    at qF.loadStateFromJSON (main.4e86a5dfd62417d2.js:1:1543176)
    at qF.loadStateFromJSON (main.4e86a5dfd62417d2.js:1:1543308)
    at QA.loadStateFromJSON (main.4e86a5dfd62417d2.js:1:1392461)
    at main.4e86a5dfd62417d2.js:1:1391877
    at o.onload (main.4e86a5dfd62417d2.js:1:1218789)
    at v.invoke (polyfills.9067ac524238af0f.js:1:6603)
    at Object.onInvoke (main.4e86a5dfd62417d2.js:1:96298)

I have attached the three. The only one that always works for me is the first one. Curiously the two failing ones used to work and randomly still seem to work sometimes, but do not around 90% of the time. I have not been able to find a consistent way to replicate the conditions when it works/fails.

run284213_evt3445458672.json
run284213_evt3445458672_withD.json
run284213_evt3445458672_with_detect.json

@JanEricNitschke
Copy link
Author

Ok, i experimented a bit more and it seems that this is actually related to #633 a bit.

It seems that the label colors are not saved with the labels, but with the general configuration state. Subsequently, if the labels are not loaded first, then loading the rest of the state fails when it tries to set their color and scale.

@EdwardMoyse
Copy link
Collaborator

EdwardMoyse commented Mar 15, 2024

Interesting. I think we have a general problem with loading/saving state (see #582, #593). I will try to look into this next week.
(Thanks for the detailed debugging BTW - this is helpful)

@EdwardMoyse
Copy link
Collaborator

@EdwardMoyse
Copy link
Collaborator

I think this is now fixed.

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