gyandeep8693 / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

CvSeq empty after creating another one #482

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I want to look at every CvSeq in the following code, but unfortunately srcLines 
is empty after I created lines:

private static CvSeq getExtendedLines(CvSeq srcLines) {
   CvMemStorage storage = CvMemStorage.create();
   System.out.println("srcLines: " + srcLines.total());
   CvSeq lines = CvSeq.create(0, Loader.sizeof(CvSeq.class),
      Loader.sizeof(CvPoint.class) * 2, storage);
   System.out.println("srcLines: " + srcLines.total());

At the end of the method I use storage.release();

What is the expected output? What do you see instead?
I would expect, that the outputs are equal. But I see:
srcLines: 23
srcLines: 0

What version of the product are you using? On what operating system?
JavaCv 0.2
Windows 7 x64

Please provide any additional information below.

Original issue reported on code.google.com by simon.te...@gmail.com on 12 Aug 2014 at 6:20

GoogleCodeExporter commented 9 years ago
Could you please try again with JavaCV 0.9? Thank you

Original comment by samuel.a...@gmail.com on 17 Aug 2014 at 10:50

GoogleCodeExporter commented 9 years ago
Unfortunately this is not possible because I had to change the whole code to 
make it work. I now use no cvSeq where to push the elements but a ArrayList. I 
know this is not optimal style, but I had no other possibility to make it work.

While debugging I saw that the adress of both CvSeq were the same, so the old 
entry was overwritten.
May as well be a mistake in my code...

Original comment by simon.te...@gmail.com on 19 Aug 2014 at 1:25

GoogleCodeExporter commented 9 years ago
Ok, if you ever find the cause of this problem, please let us know! Thanks

Original comment by samuel.a...@gmail.com on 22 Aug 2014 at 12:49