community.to.membership() crashes

Bug #1022850 reported by Higuchi, K.
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
igraph
Fix Released
High
Gábor Csárdi

Bug Description

community.to.membership() crashes in certain cases.

> library(igraph)
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=Japanese_Japan.932 LC_CTYPE=Japanese_Japan.932
[3] LC_MONETARY=Japanese_Japan.932 LC_NUMERIC=C
[5] LC_TIME=Japanese_Japan.932

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] igraph_0.6-2
> g <- graph.famous("Zachary")
> fc <- fastgreedy.community(g)
> community.to.membership(g,fc$merges,8)
[Crashes here!]

By the way, thank you very much for this really nice and useful software!

Changed in igraph:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Gábor Csárdi (gabor.csardi)
milestone: none → 0.6.1
Revision history for this message
Charles Cara (charlesc-u) wrote :

For me a similar crash is occurring with the Plotting with Transparency example (http://igraph.sourceforge.net/screenshots2.html#3)

library(igraph) ; library(Cairo)

g <- barabasi.game(100, power=0.6, m=10)
V(g)$name <- seq(vcount(g))-1
g <- simplify(g)
l <- layout.fruchterman.reingold(g)
l <- layout.norm(l, -1,1, -1,1)

fcs <- fastgreedy.community(simplify(as.undirected(g)))
Q <- round(max(fcs$modularity), 3)
fcs <- community.to.membership(g, fcs$merges, steps=which.max(fcs$modularity)-1 )
####Crashes here######

> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252

attached base packages:
[1] datasets splines grDevices utils grid stats graphics methods base

other attached packages:
 [1] caTools_1.13 bitops_1.0-4.1 Hmisc_3.9-3
 [4] survival_2.36-14 scales_0.2.1 ggplot2_0.9.1
 [7] XLConnect_0.2-0 XLConnectJars_0.2-0 rJava_0.9-3
[10] cairoDevice_2.19 XMLSchema_0.7-0 XML_3.9-4.1
[13] RQuantLib_0.3.8 Rcpp_0.9.13 reshape_0.8.4
[16] plyr_1.7.1 latticeExtra_0.6-19 lattice_0.20-6
[19] RColorBrewer_1.0-5 PerformanceAnalytics_1.0.4.4 quantmod_0.3-17
[22] TTR_0.21-1 xts_0.8-6 zoo_1.7-7
[25] Defaults_1.1-1 sp_0.9-99 SSOAP_0.8-0

loaded via a namespace (and not attached):
 [1] cluster_1.14.2 codetools_0.2-8 colorspace_1.1-1 dichromat_1.2-4 digest_0.5.2 labeling_0.1
 [7] MASS_7.3-19 memoise_0.1 munsell_0.3 proto_0.3-9.2 RCurl_1.91-1.1 reshape2_1.2.1
[13] stringr_0.6.1 tools_2.15.1

Revision history for this message
Julian Hagenauer (hagenauer) wrote :

I can confirm this bug. It does also exist in v0.62.

Revision history for this message
Gábor Csárdi (gabor.csardi) wrote :

Thanks everyone for the reports and comments. Fixed in revision #2975 (0.7-main) and #2945 (0.6-main). It will be in 0.6.1 or 0.7, whichever comes first.

Changed in igraph:
status: Confirmed → Fix Released
Revision history for this message
Gábor Csárdi (gabor.csardi) wrote : Continue on github

The development of igraph has moved to github, so please do not comment on this bug here. You are of course welcome to comment on github, here:
https://github.com/igraph/igraph/issues/111

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.