« first day (50 days earlier)      last day (2803 days later) » 

7:36 AM
You don't ask a question because room is empty? Well, it's empty because you haven't asked the question!
44
 
well its more of an advice then a questio :P
can you point me to some resources about memory leak debugging?
 
The best offense is a good defence
Smart pointers and containers will fix 99% problems
 
well
 
For the remaining 1% there's Valgrind
 
i have a memory leak that i have to fix
and yes i know its a dumb question
but i have never done that
 
7:39 AM
try valgrind on linux
 
i'm on windows
:)
 
...yeah, the valgrind is a linux tool
Dr. Memory is a windows equivalent
but I haven't tried it
 
yeah but i doubt i will manage to solve it anyway
 
such tool will tell you when did you allocate the leaked memory chunk
which is as good information as any
 
 
2 hours later…
nwp
10:13 AM
I used dr memory before, many false positives, not a fan
 
 
3 hours later…
1:07 PM
@Proxy do you have a posted Q that we can look at it?
 
Rok
if I have an openCV specific question is it ok if i post it here or should I just make a question under opencv tag? (I don't really see any opencv chatrooms)
 
@Rok completely okay
 
@Rok don't expect an answer though, because I'm not sure whether anyone knows OpenCV
 
Rok
ah :/
 
@Rok just ask the Q. It might me a simple or an obvious solution and someone will read it and reply
I am a little bit familiar with EmguCV (The C# wrapper of OpenCV)
 
Rok
1:19 PM
well the thing is that after some point instead of it showing me a pic it throws an access violation exception which is really confusing me because the image wasn't edited at all
i'm converting older openCV code that uses iplimage and such to a new version that would use Mat
so i have a working version that I can compare results with and till that point everything seems fine (from data that I can read)
 
Can we see the minimal code where you get the run time error?
 
Rok
yeah sure .. the thing about it is it's still pretty long
i'll just put it in a pastebin if that's ok
 
try to remove the (what you believe) unneeded codes and maybe use an online compiler and post the link
 
Rok
ok
i'm not quite sure how I'd manage to put code that uses opencv objects into the compiler and expect it to work though
 
Well I just wanted to look it
but not to paste it here as a whole
Try this pastebin.com
 
Rok
1:28 PM
ye i know i'm just trying to make it readable
 
Paste and send the link
For future: If it is compileable, coliru
 
Rok
ok
i don't really know how to reduce it any further :/
 
Which line it throws the error?
 
Rok
it doesn't print the last printf
but it does wait on 67
 
user406009
@Rok Can you paste the complete code? We want a single file which compiles.
 
user406009
1:31 PM
(Or at least, it's easier to help when that's provided)
 
Rok
this is the full cpp file pastebin.com/eqHc4Sdf
 
@Rok Does it save a valid image if you try to save it?
 
Rok
at what point do you mean ?
 
instead of the last imshow
Also you mentioned that you are confused because "the image was not edited at all" but here you are accessing its pixels: nmsEdges.at<float>(i, j) = 0;
 
Rok
oh no .. the nmsEdges is being edited
it's just that when i exited the function
and tried to show a random picture that has not yet been edited
it threw an exception
the imshow that's inside the for loop does show the image nmsEdges correctly
also to answer your previous question
it doesn't save
 
1:40 PM
Also throws an exception or it does not save a valid image (full black, full white .. etc)?
 
Rok
yes
 
yes .. what :)? it does not save and throws an exception
or
It saves but not a valid image
 
Rok
it does throw the exception and it does not save
 
Can we see the full exception please?
 
Rok
Exception thrown at 0x00000000779B1577 (ntdll.dll) in GeoMatch - updated.exe: 0xC0000005: Access violation reading location 0x00000F1364304A68.
 
1:43 PM
Is there an inner exception too?
 
Rok
um where can i check that?
 
Also one more thing, did you "close" the image
after you used used it?
I am not sure of the correct syntax in c++. Let me see
 
Rok
as far as I know it's not needed
I made another program before where I edited an image pixel by pixel
and that didn't require any closing
 
ehm.
I think you should close so any function holding the image, releases it. But nevermind if you are saying you know what you are talking about
Inner exception can be found under "view details" when the exception gets thrown
 
Rok
there doesn't seem to be any inner exceptions because I don't see "view details"
 
1:49 PM
You said last printf does not print, this you mean: printf("%d", numOfCoordinates); ?
 
Rok
yes
 
so this is throwing the exception and not imshow?
 
Rok
i'm assuming it's imshow because it doesn't even open the window to show it
(waitkey shows the picture)
 
which line of code the compiler tells that it threw an exception
 
Rok
actually my bad ... printf throws it
but if i remove imshow it goes further
 
1:54 PM
What do you see if you add numOfCoordinates to a watch (or hoover your mouse on it when steping throw the code)

Also try #include <iostream> and then use its "cout".
What happens?
oh ..
 
Rok
yeah it just crashes further in ...
i'll have to check it tomorrow because i have to go now... sorry :/
 
so the same cv::imshow("nms", nmsEdges); works inside the for loop, but then after the for loop it causes problems
 
How is your GeoMatch class declared
 
I think you should make sure no thing is holding the image. And to close it
and good luck
 
also
Aug 10 at 9:43, by milleniumbug
Don't use new
 
Rok
1:58 PM
if i'll still have problems i'll come back into the chatroom to check if you're around

@milleniumbug I'll replace that
thank you anyways :)
 
no problem
good bye
:)
 

« first day (50 days earlier)      last day (2803 days later) »