phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

Error when loading menu state

Open JanEricNitschke opened this issue 1 year ago • 3 comments

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 avatar Mar 05 '24 14:03 JanEricNitschke

Ok, i experimented a bit more and it seems that this is actually related to https://github.com/HSF/phoenix/issues/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.

JanEricNitschke avatar Mar 07 '24 09:03 JanEricNitschke

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 avatar Mar 15 '24 09:03 EdwardMoyse

Argh. Still seeing this e.g. with: https://phoenixatlas.web.cern.ch/PhoenixATLAS/?file=data%2FPosters%2FATLDISPLAY-261%2FJiveXML_352514_1031263761.xml&type=jivexml&config=data%2FPosters%2FATLDISPLAY-261%2Frun352514_evt1031263761.json

AntiKt jets are disabled in the config, but still seem to be on in the menu.

EdwardMoyse avatar Jun 25 '24 15:06 EdwardMoyse

I think this is now fixed.

EdwardMoyse avatar Sep 21 '24 14:09 EdwardMoyse