| Summary: | Theme engine stuck in infinite loop eating CPU | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> | ||||
| Component: | Editor | Assignee: | Mark Macdonald <mamacdon> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | ||||||
| Version: | 5.0 | ||||||
| Target Milestone: | 6.0 M2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Mark Macdonald
Created attachment 242616 [details]
theme data
This is my cached theme data, captured from localStorage.
Note the "version": "6" identifier. I expected that would cause the theme engine to leave my cached theme data alone since it's already at the latest version.
1) Container and editor theme are versioned separately, but only the container theme's version is persisted into the pref (which is shared by both themes). If the container and editor versions differ, this can cause a ThemePreferences for the container to fight with the editor, thinking that the persisted theme pref data is stale when it really is not. 2) When a ThemePreferences reacts to a change in the theme pref (which may be caused in another tab), in addition to refreshing its page styles, it also writes the pref again, every time. This lead to a very bad situation when multiple tabs were open, and the editor vs container theme version numbers differed. Basically, Tab A would write the latest editor theme data to the pref, and a listener would fire in Tab B for its container ThemePreferences. That ThemePreferences would see the version number didn't match its own, and write different data to the pref. Tab A had a similar listener that runs in exactly the same fashion, starting the cycle again. It gets worse the more editor tabs you have open. I fixed (1) by making the version ids the same for container & editor. This was sufficient to fix the CPU bug for me. Tried to fix (2) but it seems to resurrect an issue we've seen before the past, where the theme you end up with upon loading Orion with a clean localStorage slate does not quite match the Prospecto theme (which is supposed to be the default). So I'm leaving it for now. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=b5b6dd4 Reopening. Somehow I've managed to get into this state again, although it's not as easy to reproduce. (In reply to Mark Macdonald from comment #4) > Reopening. Somehow I've managed to get into this state again, although it's > not as easy to reproduce. False alarm -- I was running off an old branch that didn't contain commit b5b6dd4. Marking FIXED again. |