-
Notifications
You must be signed in to change notification settings - Fork 65
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
R crash when union = T
in image_line_segment_detector()
#25
Comments
I can only reproduce this crash on Windows, not on an Ubuntu Linux machine which I have access to. |
If it helps, I came across it running macOS (full details in the sessionInfo) |
what do you get when you run the code using |
Maybe a basic question, but how do I actually run the code using |
I thought on Mac this was |
Hmm, I get
when I run |
Ok, I'll find another way to debug this using GDB. |
Debug trace using the address sanitizer RDsan using wch1/r-debug
coming from here https://github.com/bnosac/image/blob/master/image.LineSegmentDetector/src/lsd.c#L2599 caused by |
Hello @rafael-grompone-von-gioi |
Hi, I'm not sure of understanding the problem, but I see that lines 2339 to 2346 are different from the equivalent in my code which are:
As you can see, there is no memory freed in my version. Do you know why was it changed? Anyway, all that about I take the oportunity to point out a small bug (which was discovered by someone I can't remember now who). In lines 2600 and 2601 it should be
while in line 2601 we now read I hope this helps. Don't hesitate if there are further questions. Best! |
Hi again, I just see another difference with my code, probably the important for this problem. In my code, at the begining of the function
As you can see, the first check is that the image size is larger than zero. So this may explain why the check may be needed. As my code was done assuming those conditions were satisfied, I would not remove those checks because there are probably many other places were they are assumed. best |
That was needed in order to make CRAN happy, which didn't like the use of printf. And I didn't put time to replace it with the Rprintf R equivalent which was allowed and just commented it out. I don't think these are the culprit here as the default ones which are used in the example are the ones from the paper
After a second look, I'll see if I can add the check at About this,
I saw that as well and tested out if this might have been the reason of the 💣 but that wasn't the cause
Not sure, I thought I took the C code version 1.6 from http://www.ipol.im/pub/art/2012/gjmr-lsd/ but indeed it looks a bit different. Where is the last version of the code? Is it version 1.6 at http://www.ipol.im/pub/art/2012/gjmr-lsd/ On version 1.6 at ipol now there is in the comments
while this R wrapper has: https://github.com/bnosac/image/blob/master/image.LineSegmentDetector/src/lsd.c#L57
|
Yes, the last version of the LSD code is the 1.6 at Ipol you mention. |
yes, I'll add this check again. I disabled all the error() commands as they used printf and I should use Rprintf on R |
Sorry, I saw you had already commented that, so I removed my comment. |
hi all, any news on this problem? session is still crashing on R 4.3.3 run on W10. |
@spono Can you provide the image where this is happening on your end? |
RStudio (using R 4.3.3 on W10) crashes even with the base example:
|
Similarly to #7 and #19, when I set
union = T
inimage_line_segment_detector()
, R crashes. The following reproduces the error for me:sessionInfo:
The text was updated successfully, but these errors were encountered: