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

[gsoc22] crash when there are nodes with the same id #164

Open
mwarning opened this issue Sep 11, 2022 · 5 comments
Open

[gsoc22] crash when there are nodes with the same id #164

mwarning opened this issue Sep 11, 2022 · 5 comments
Labels
bug gsoc-idea Potential step of a GSoC project idea

Comments

@mwarning
Copy link

While having two nodes with the same id is probably not valid, netjsongraph.js should at least not crash.

Uncaught TypeError: nodes[data.getRawIndex(...)] is undefined
    update http://localhost:8000/netjsongraph.min.js:55959
    createGraphFromNodeEdge http://localhost:8000/netjsongraph.min.js:56268
    getInitialData http://localhost:8000/netjsongraph.min.js:53647
    init http://localhost:8000/netjsongraph.min.js:94121
    init http://localhost:8000/netjsongraph.min.js:53610
    visitComponent http://localhost:8000/netjsongraph.min.js:75703
    each http://localhost:8000/netjsongraph.min.js:111818
    visitComponent http://localhost:8000/netjsongraph.min.js:75648
    topologicalTravel http://localhost:8000/netjsongraph.min.js:98376
    _mergeOption http://localhost:8000/netjsongraph.min.js:75627
    _resetOption http://localhost:8000/netjsongraph.min.js:75543
    setOption http://localhost:8000/netjsongraph.min.js:75514
    setOption http://localhost:8000/netjsongraph.min.js:79622
    echartsSetOption http://localhost:8000/netjsongraph.min.js:122191
    graphRender http://localhost:8000/netjsongraph.min.js:122398
    onclick http://localhost:8000/netjsongraph.min.js:123301

This happens with MeshGraphViewer when the map is loaded and then updated with a node list that has two nodes of the same id. When I switch to the topology view, the crash happens.

@mwarning mwarning added the bug label Sep 11, 2022
@totallynotvaishnav totallynotvaishnav added this to To do in [GSoC 22] netjsongraph.js via automation Sep 14, 2022
@nemesifier nemesifier moved this from To do to Backlog in [GSoC 22] netjsongraph.js Sep 15, 2022
@nemesifier nemesifier added the gsoc-idea Potential step of a GSoC project idea label Feb 10, 2024
@d1vyanshu-kumar
Copy link

@mwarning, I would like to work on this issue.

@mwarning
Copy link
Author

@d1vyanshu-kumar feel free to fix it. But I do participate in the current GSOC in any way.

@d1vyanshu-kumar
Copy link

d1vyanshu-kumar commented Feb 24, 2024

@mwarning Thank you for your response. I appreciate the opportunity to work on this issue. I am looking for the file or section of code in the netjasongraph.js repository where the network data is stored. I believe this is typically an array of node objects, each with a unique ID. Could you assist me with this?

As a beginner, I am a bit confused. If this Is the issue of meshgraphViewer then why is this an issue open in netjsongraph.js can you please elaborate on this issue in detail?

@d1vyanshu-kumar
Copy link

d1vyanshu-kumar commented Feb 25, 2024

@mwarning
Copy link
Author

hi @d1vyanshu-kumar, I do not know the netjsongraph.js code. I also no proficient JavaScript developer. I plan to use netjsongraph.js for MeshGraphViewer, but for now that is work in progress.

During my tries to integrate netjsongraph.js into MeshGraphViewer, I stumbled over the error I reported above and thought that the netjsongraph.js developers do not want to it to crash even when two nodes entries have the same id.

Your two links point to the data that triggers the error. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug gsoc-idea Potential step of a GSoC project idea
Projects
No open projects
Development

No branches or pull requests

3 participants