export svg/pdf with no edges causes NPE

Bug #693789 reported by rotten on 2010-12-23
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Gephi
Fix Released
Medium
Mathieu Bastian

Bug Description

When I try to export a graph with several thousand nodes to PDF or SVG, but no edges I get a "java.lang.NullPointerException". The resultant exported file cannot be opened because it is "damaged".

Hi, could you share the dataset so that we can reproduce the bug?

Thanks

Changed in gephi:
milestone: none → 0.7beta
importance: Undecided → Medium
tags: added: preview
rotten (rotten) wrote :

Here is a set of data that causes the NPE. Open the GDF, and then try to export it.

Changed in gephi:
status: New → Confirmed
Luiz Ribeiro (luizribeiro) wrote :

This issue happens because by default, a DHNS instance isn't a directed graph, neither an undirected or mixed graph (by default, DHNS.directed = DHNS.undirected = DHNS.mixed = false). This patch fixes this issue by assuming that a graph that is not directed or undirected, is a mixed graph. I'm not sure if that's the best way to fix this issue, but it does work.

Changed in gephi:
assignee: nobody → Mathieu Bastian (mathieu.bastian)

Patch applied in rev 2147, thank you much Luiz!

Changed in gephi:
status: Confirmed → Fix Committed
Changed in gephi:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments