Comments (3)
After investigation it looks like the culprit of the bug is the management of the editorManagerMutex https://github.com/OpenDiablo2/HellSpawner/blob/master/hsapp/app.go#L222
The issue appears to be on fast machines, multiple openEditor calls will fire and process such that concurrent executions of the createEditor method reach the lock on L222. This leads to the a.editors list containing multiple entries with the same unique ID.
from hellspawner.
My proposed change is to move the lock acquire from L222 to the beginning of CreateEditor. This will enforce that only one createEditor call will be fired for any given Unique ID. The RLock in the openEditor method will no longer be acquired when a concurrent execution of CreateEditor is generating the editor as opposed to the current behavior where the RLock gets acquired allowing multiple CreateEditors to reach the a.editors = append... line on 224
Edit: This causes the RestoreApp functionality to become laggy as it has to wait to generate each editor object
from hellspawner.
I think your proposed solution is good enough, I don't think it's a big deal for there to be some reasonable delays during app start. A "reasonable" delay would be ~2 second startup for an existing project with some editors opened.
from hellspawner.
Related Issues (20)
- animation data editor is displayed incorrectly
- add support for non-english fonts (string table editor)
- DCC Widget: GIF export should be an editor feature
- DCC Editor "Change Palette" cannot be closed by the window's X button HOT 1
- merge `dccwidget` and `dc6widget` HOT 5
- need to merge DT1 sub-tile flags edit/preview UI
- refactor logging throughout the app HOT 1
- DT1 widget: subtitle type scrollbar should be a drop-down HOT 3
- Fix broken build
- Redundant helpers functions in hswidget
- hsdialog: handle keyboard shortcuts inside of popup modal widget
- DAT palette editor needs a refactor
- hswidget/dt1widget: add keyboard shortcuts for switching tile groups
- hswidget: widgetState encoder needs refactor
- remove `giu.Texture` example; use image.RGBA instead HOT 7
- DT1 editor: setting palette does not work HOT 2
- dependencies: back to giu upstream HOT 7
- Creating a new project appends the extension again HOT 1
- Ubuntu 20 - go.sub "malformed module path "embed": missing dot in first path element HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hellspawner.