Stack overflow in Spring & SFDP layouts

Open
#67 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
julia

Research direction

Start by reproducing the attached data with the NetworkLayout.sfdp and NetworkLayout.spring calls shown in the issue, including the partial-layout arguments. Trace where the StackOverflowError occurs and compare behavior for the directed and undirected graph variants; done means both layouts handle this input without overflowing the stack.

Written by the indexing model from the issue text.

Description

I have some somewhat-large graph data that I'm attempting to do partial layouts on, and I'm hitting StackOverflowErrors when I try. I'm attaching the data, and here's the code I'm using for layout:

using GraphIO.EdgeList, Graphs
using NetworkLayout
using GeometryBasics: Point
using JSON3


println("Loading data")
g = loadgraph("graph.e", EdgeListFormat())
pin = identity.(JSON3.read("pin.json"))
initialpos = identity.(JSON3.read("initialpos.json"))


println("Running layout")
# Both of the following fail
NetworkLayout.sfdp(g; pin, initialpos, iterations = 5)
NetworkLayout.spring(g; pin, initialpos, initialtemp = 3.940695496278636, iterations = 5)

data.tgz

Any thoughts? I did also try converting g to an undirected graph, but that doesn't seem to make any difference.

Dominant language
Julia
Stars
109
Forks
26
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaGraphs/NetworkLayout.jl

All issues in JuliaGraphs/NetworkLayout.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.