Comments (3)
Some context from perspective of the MegaMolGraph:
The graph creates modules with the requested ID, including group namespaces, pretty much verbatim (https://github.com/UniStuttgart-VISUS/megamol/blob/master/core/src/MegaMolGraph.cpp#L597). Currently, not even a check for duplicate names is performed. There is no inherent problem for the graph if multiple modules with the same name exist, except that lookup and graph manipulation of these modules will result in undefined behaviour (i.e., 'the user providing the broken graph is to blame'). Multiple modules with the same name will result in distinct entries in the internal std::vector holding modules.
However, since lookup of modules is implemented as sequential search in a std::vector (https://github.com/UniStuttgart-VISUS/megamol/blob/master/core/src/MegaMolGraph.cpp#L526-L530), only the first module with a given name will be found.
This is what happens when deleting modules (https://github.com/UniStuttgart-VISUS/megamol/blob/master/core/src/MegaMolGraph.cpp#L792-L794).
Deleting the module in the group deletes both
The question is: how are you deleting the module in question? Via the GUI? Using Lua? The module deletion code in the graph can only delete one module per deletion request.
If names must be unique over several groups, this is at least something already the loader should check and throw an exception on loading the project
There are different ideas what the project loader should do (load the whole project despite errors -vs.- refuse to instantiate faulty project files).
When executing a .lua project file the lua interpreter can not look ahead to check for such errors. (Neither should the interpreter surpress execution errors and simply continue executing the .lua script) Building a model of the contents of a lua project file before executing it, to catch errors like multiple modules with the same name, ends up being the same thing as instantiating the graph from the project file.
from megamol.
The graph creates modules with the requested ID, including group namespaces
That sounds good from a user perspective that only the combination namespace and module name must be unique and not module name only.
The question is: how are you deleting the module in question? Via the GUI? Using Lua? The module deletion code in the graph can only delete one module per deletion request.
Configurator in the GUI
the lua interpreter can not look ahead to check for such errors.
I am simply meaning something like, when executing mmCreateModule, just not create the module like if any other module creation error would happen, print an error that the module cannot be created, because the name is already in use, and then just continue. This would be way better, than creating the graph anyway, but then strange things happens on graph manipulation later on.
from megamol.
There is some related bug when deleting a module in the Configurator that will be fixed with PR #1221. But this is not the root of this problem.
FYI: When deleting a module, MegaMol breaks when trying to delete the call:
megamol/core/src/MegaMolGraph.cpp
Line 830 in 7d26f59
from megamol.
Related Issues (20)
- Empty index buffer causes crash HOT 1
- Expose additional camera UI parameters
- Save button on STLWriter not working as expected
- Table Histogram Renderer Lacks UI Color Parameter
- Light ImGUI GUI Style Themes Should Affet Default View Background Color Too? HOT 1
- Empty view has broken camera
- LuaCallbacksCollection does not accept unsigned int as function parameter
- Check/reset OpenGL error state for render chains
- SphereRenderer does not utilize connected transfer function
- Sphere Renderer Geometry Mode Misses Shader File HOT 1
- Default value for "host" is unreasonable HOT 1
- About the installation problem HOT 3
- Depth calculation
- Depth buffer and SimpleRenderTarget
- Add option to save only changed parameters
- Both the legacy ScreenShooter and the CinematicView need to use the Screenshot_Service
- GUI Scaling broken for CLI Config and Projects
- Isosurface renderer
- Volumetric Datasource does not realloc memory on dataset change
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 megamol.