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
getHeight()' on a null object reference #65
Comments
Hi, so 5k nodes are definitely too much for GraphView as it is not yet optimized for it. Which version do you use? Actually there should be no npe at this place. |
is there any alternative option ? what max node size ? i'm really looking for this but now i'm stuck here |
Well there is already a newer version 0.6.1. I would suggest you try again with an update. Unfortunately it is not possible to draw so many nodes at the same time with the current approach. |
okay I'll try after update and notify you. but what's max limit or the graph ? |
In theory, there is no limit. It depends on how complex you design the nodes View and the runtime of the chosen algorithm. |
hey i updated version and now im getting this error. java.lang.StackOverflowError: stack size 8192KB |
Stackoverflow can be an indicator that you have a loop in your structure. It could be something else without having more information. |
yes. i have loop and I'm using hashmap to store nodes. |
BuchheimWalker does not support loops because it was developed for tree structures. You could use the Sugiyama for this. |
I'm not using algorithm inside loop but i used loop for create nodes only. algorithm is outside the loop. i will check that and will notify you. thank you. |
No, I meant a loop in your data structure, for example: a -> b -> c -> a (loop here) |
actually my first loop here
first loop to create all nodes.
|
@GregorBlock didn't mean your loop statements. He is talking about a loop or cycle (in graph theory) in your graph. |
i will try Sugiyama. hope it will help. |
I'm closing this issue due to inactivity. If you have further input on the issue, don't hesitate to reopen this issue or post a new one. |
Hey there i want to know what is limit of graph? i have more than 5k records with nodes.
i need help to solve this.
java.lang.NullPointerException: Attempt to invoke virtual method 'int de.blox.graphview.Size.getHeight()' on a null object reference
at de.blox.graphview.Node.getHeight(Node.java:45)
at de.blox.graphview.tree.BuchheimWalkerAlgorithm.firstWalk(BuchheimWalkerAlgorithm.java:69)
at de.blox.graphview.tree.BuchheimWalkerAlgorithm.firstWalk(BuchheimWalkerAlgorithm.java:89)
at de.blox.graphview.tree.BuchheimWalkerAlgorithm.firstWalk(BuchheimWalkerAlgorithm.java:89)
at de.blox.graphview.tree.BuchheimWalkerAlgorithm.firstWalk(BuchheimWalkerAlgorithm.java:89)
at de.blox.graphview.tree.BuchheimWalkerAlgorithm.firstWalk(BuchheimWalkerAlgorithm.java:89)
at de.blox.graphview.tree.BuchheimWalkerAlgorithm.firstWalk(BuchheimWalkerAlgorithm.java:89)
at de.blox.graphview.tree.BuchheimWalkerAlgorithm.firstWalk(BuchheimWalkerAlgorithm.java:89)
at de.blox.graphview.tree.BuchheimWalkerAlgorithm.firstWalk(BuchheimWalkerAlgorithm.java:89)
at de.blox.graphview.tree.BuchheimWalkerAlgorithm.firstWalk(BuchheimWalkerAlgorithm.java:89)
at de.blox.graphview.tree.BuchheimWalkerAlgorithm.firstWalk(BuchheimWalkerAlgorithm.java:89)
at de.blox.graphview.tree.BuchheimWalkerAlgorithm.firstWalk(BuchheimWalkerAlgorithm.java:89)
at de.blox.graphview.tree.BuchheimWalkerAlgorithm.firstWalk(BuchheimWalkerAlgorithm.java:89)
at de.blox.graphview.tree.BuchheimWalkerAlgorithm.firstWalk(BuchheimWalkerAlgorithm.java:89)
at de.blox.graphview.tree.BuchheimWalkerAlgorithm.run(BuchheimWalkerAlgorithm.java:345)
at de.blox.graphview.BaseGraphAdapter.notifySizeChanged(BaseGraphAdapter.java:41)
at de.blox.graphview.GraphNodeContainerView.onMeasure(GraphNodeContainerView.java:367)
at android.view.View.measure(View.java:24549)
at android.view.ViewGroup.measureChild(ViewGroup.java:6799)
at android.view.ViewGroup.measureChildren(ViewGroup.java:6776)
at com.otaliastudios.zoom.ZoomLayout.onMeasure(ZoomLayout.java:104)
at android.view.View.measure(View.java:24549)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1204)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:723)
at android.view.View.measure(View.java:24549)
at androidx.constraintlayout.widget.ConstraintLayout.internalMeasureChildren(ConstraintLayout.java:1227)
at androidx.constraintlayout.widget.ConstraintLayout.onMeasure(ConstraintLayout.java:1572)
at android.view.View.measure(View.java:24549)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:143)
at android.view.View.measure(View.java:24549)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)
at androidx.appcompat.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:401)
at android.view.View.measure(View.java:24549)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:24549)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
at android.view.View.measure(View.java:24549)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6828)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:742)
at android.view.View.measure(View.java:24549)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3007)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1834)
2020-03-19 23:40:57.893 27200-27200/com.kishanmaniar.treeview E/AndroidRuntime: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2123)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1722)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7605)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1029)
at android.view.Choreographer.doCallbacks(Choreographer.java:852)
at android.view.Choreographer.doFrame(Choreographer.java:787)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1014)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7403)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
The text was updated successfully, but these errors were encountered: