-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
cluster_label_prop()
crashes R when using fixed labels
#1434
Comments
I've narrowed down the issue, there are
|
@Antonov548 Can you run this using ASAN and see if it's still present in the dev version (to become 2.0.4)? When not using ASAN, a lack of crash does not indicate that there is no bug (I can't repro it on my machine, but that doesn't mean no bug). |
Is there a good way to get you system log information from the time the crash happens which could help diagnose the problem? |
I'm not sure, I don't think so. It's good to note that passing NA values to igraph functions is almost never valid (certainly not here). The exceptions are storing attributes (NA values can be stored) and where a NA scalar has special meaning (e.g. That said, there should not be a crash. I believe the major issue here is that the R interface does not do any validation when converting to an integer vector ( rigraph/src/rinterface_extra.c Lines 3380 to 3388 in 128182d
This is related to #1140, but for vectors rather than scalars. I noted it with a yellow mark in #840. Note that doing it for vectors may have a noticeable performance impact. @krlmlr I would not make this issue block 2.0.4. A proper fix will be very time consuming. |
Agreed, the |
Yes, of course this should be fixed. The problem is that the proper fix is time-consuming, and requires a lot of care, as it involves reviewing some of the fundamental glue code between R and C, and not just this single function. This is why I recommended not blocking the next release on this issue. |
What happens, and what did you expect instead?
I'm using the LPA algorithm implemented in
cluster_label_prop
on an undirected graph of moderate size (1042 vertices, 1124 edges) and when fixing the labels on a subset of the vertices, the function crashes R.To reproduce
Minimal reproducible example file: lpa.g.debug.zip
System information
The text was updated successfully, but these errors were encountered: