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

Test failures with the development version of igraph #16

Closed
krlmlr opened this issue May 21, 2023 · 10 comments
Closed

Test failures with the development version of igraph #16

krlmlr opened this issue May 21, 2023 · 10 comments

Comments

@krlmlr
Copy link

krlmlr commented May 21, 2023

We're changing the layout of igraph objects. This leads to check failures in your package, see https://github.com/igraph/rigraph/blob/f-igraph-t-idx-revdepcheck/revdep/problems.md and igraph/rigraph#789 for details.

To reproduce, please install the development version of igraph via

# install.packages("pak")
pak::pak("igraph/rigraph")

and run R CMD check on your package.

We plan to release an igraph update on June 12, three weeks from now. Can you please send an update to CRAN that fixes the checks, or tell me that the failure is unexpected and we should be fixing this?

Specifically, the following code now fails:

options(conflicts.policy = list(warn = FALSE))
library(netseg)
ssi(EF3, "race")
#> Error in igraph::induced.subgraph(g, which(ids == b)): At core/core/vector.pmt:1030 : Assertion failed: v->stor_begin != NULL. This is an unexpected igraph error; please report this as a bug, along with the steps to reproduce it.
#> Please restart your R session to avoid crashes or other surprising behavior.

Created on 2023-05-21 with reprex v2.0.2

This is probably us, but I'm having a hard time figuring out what's happening here. Thank you for your help!

@mbojan
Copy link
Owner

mbojan commented May 21, 2023

Thanks. I'll look into it.

@krlmlr
Copy link
Author

krlmlr commented May 21, 2023

Thanks. I just merged an igraph PR that may be necessary to replicate the issue.

@mbojan
Copy link
Owner

mbojan commented May 21, 2023

I can replicate it and it is very strange. I think it is igraph bug because it is igraph::subgraph() tripping on an igraph object, of which there is nothing out of the ordinary as far as i can tell. Will poke some more though.

@mbojan
Copy link
Owner

mbojan commented May 21, 2023

@krlmlr, and so it is in igraph, here is a way to replicate it. I'm not sure why it is breaking:

g <- make_lattice(c(5, 6))
gg <- as.directed(g, mode = "mutual")
V(gg)$id <- V(g)
degs <- igraph::degree(gg, mode="out")
for(i in seq(1, igraph::vcount(gg)))
  E(gg)[.from(i)]$weight <- 1/degs[i]
subgraph(gg, 1)

@krlmlr
Copy link
Author

krlmlr commented May 21, 2023

Thanks, this is useful! We can work with that, no further action needed for now.

@krlmlr krlmlr closed this as completed May 21, 2023
@mbojan
Copy link
Owner

mbojan commented May 21, 2023

That's actually a good nudge to simplify that part in 'netseg' because I don't need the whole vertex sequence as the attribute, just the ids.

cf igraph/rigraph#807

@krlmlr
Copy link
Author

krlmlr commented May 21, 2023

Yeah, I wonder where this usage pattern comes from.

@mbojan
Copy link
Owner

mbojan commented May 21, 2023

I need to compute on various subgraphs of the mastergraph and assign the results to the nodes in the master graph. It seemed cognitively easiest to store the IDs so that they are accessible when working with a subgraph. This was written 2009-ish originally too :)

@krlmlr
Copy link
Author

krlmlr commented May 22, 2023

Storing the IDs is fine, but storing them as raw numbers perhaps also works.

igraph/rigraph#808 fixes this problem, this will probably land soon, also on CRAN.

mbojan added a commit that referenced this issue May 22, 2023
This anticipates igraph changes as described in #16 and
igraph/rigraph#808.
@mbojan
Copy link
Owner

mbojan commented May 22, 2023

By 5eab08f resorting to integer IDs, preemptively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants