1 (edited by joan 2010-11-23 09:44:48)

Hi

I've used dual screen mode to make a synchronisation that compares two athletes technique. I can save each screen individually but when I click the save video button to save in dual screen mode I get the following message(any advice much appreciated):

Microsoft .NET Framework

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at sws_scale(SwsContext* , Byte** , Int32* , Int32 , Int32 , Byte** , Int32* )
   at Kinovea.VideoFiles.VideoFileWriter.EncodeAndWriteVideoFrame(SavingContext _SavingContext, Bitmap _InputBitmap)
   at Kinovea.VideoFiles.VideoFileWriter.SaveFrame(Bitmap _image)
   at Kinovea.ScreenManager.ScreenManagerKernel.bgWorkerDualSave_DoWork(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3615 (GDR.050727-3600)
    CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Kinovea
    Assembly Version: 0.8.11.28232
    Win32 Version: 0.8.11.0
    CodeBase: file:///C:/Program%20Files/Kinovea/Kinovea.exe
----------------------------------------

(edited for clarity)

2

Hi,
Thanks for the report.
Does it happen with the dual snapshot button (to save an image) ?
Does the crash occur right away or after a few seconds of saving ?
Do you have the overlay function activated (bug 220) ?
Thanks

3

Hi Joan

No it doesn't happen with the dual snapshot - that worked fine. The error message pops up immediately after I choose where to save the file, and if I click continue it saves a file that is only 1kb. No I don't have the overlay function activated but I have tried to save that since and I get the same issue.

Andrew

4 (edited by joan 2010-11-23 11:14:41)

Thanks
It is indeed probably the same issue as bug 220 but another variation. When the saving dialog box is closed, the screen try to refresh itself and the image is used from two different places at the same time (display and record).
To validate this hypothesis, you may try to relocate the saving dialog box somewhere not directly above any of the images, before clicking save, if it's possible.
I'll open a new bug to track this.

Edit: created bug 227.

5

I tried relocating the dialog box but still encountered the same problem.

Thanks

6

Hello

I found the same problem also. I had two high-speed video clips of two different athletes and wanted to save a comparing clip. What I observed was that the error message appears when trying to save directly from the editing board. However, when I first saved the edited clips in two separate .mkv files and then read them back, saving went without errors. Didn´t do any operations on the videos in between though. Haven´t tried if the error appears when I do.

Thank you for creating this very useful open-source code big_smile
I´ve just started using kinovea yesterday, first in an ancient linux-box (arch) under wine, and now in a win7 laptop. The 0.8.11 runs OK in both.

Pertsa

7

I would like to study this issue but I can't reproduce it.
Could someone attach a log file to the bug 227 please.
(remember to collect the log right after the issue, before you reopen Kinovea, because logs are rotating. Check the log in notepad, it should have the exception text at the end.)

Thanks

8

Someone that used to experience this bug, please retry with the latest version (0.8.12) to confirm whether it is corrected or not.
Thanks !

9

Still got a problem with saving dual screen mode here on 0.8.12 I'm afraid.
I'm running two monitors so took the dialogue box right off onto the other screen
I used to get the read/write protected memory error, now I get different errors
Saving mkv I get "Parameter is not valid" then if I continue I get "Out of memory" then "Not enough storage"
Saving avi I get "Parameter is not valid" then if I continue I get "Out of Memory"
Don't know which memory it's looking at, I've got 840 Gb free on drive and 4GB RAM
I've saved each of the error logs - would you like them here or onto a new bug report?

Mike

10

Does seem file size (ie memory?) related - happening on Win7 64bit PC and 32bit laptop - won't save over a certain duration - a 17Mb edit saved OK as a dual screen, a one second longer edit crashes at 17.4Mb.
PC has done a few "Won't save - try a different format" glitches even saving a staight open (.mov) and close (.avi or .mkv)
?

11

Thanks for the test!
I have reopened bug 227 - Could you attach the logs there?
Thank you.

12

Logs added to 227
Lovely function - the short dual clip that worked looks great

13

Been trying again with this - same problem with dual save and I seem to have lost the ability to save even normal video only files
Couple of buffer errors in the log.txt - added to 227 with more details
:-)

14 (edited by Archer4 2011-05-15 21:48:34)

Don't know if this is supposed to have been fixed in 0.8.15, I still had the problem in 0.8.14 but, for me at least, it is now working perfectly

Again, many thanks big_smile

15

Great !
Yes, some stuff has been done regarding memory in the saving routine. Initially to work around an issue for capture with large image size, but it should help with dual screen saving and regular save as well.