pinterf / mvtools

mvtools plugin for avisynth
153 stars 17 forks source link

MFlowInter: System exception with certain combination of blksize, overlap, divide and thSCD1 #14

Closed zorrozork closed 6 years ago

zorrozork commented 6 years ago

MFlowInter causes "System exception - access violation at 0x56c3d3ba, reading from 0xf6989f8". Access violation can also happen at different addresses, like 0x56c3d453, 0x56c3d41e, 0x56c3d16f and 0x56c3d0d6.

This crash only happens randomly, like every 10th or 20th time the script is run (even when it is the exact same script and source video). The easiest way to trigger it is to run the script multiple times programmatically or with a batch file. Using a short source video helps too (I used one which was trimmed to 10 frames).

Parameters which trigger the exception are: MAnalyze with blksize=16, overlap=4 and divide=1 or 2. MFlowInter with thSCD1=100 or larger.

So this is pretty much the same thing as in issue #13 , but the parameter is overlap instead of overlapv. The previous version v2.7.28 crashes every time with those parameters so the fix in v2.7.29 is making things a lot better, but not perfect.

Attached here is a script which (sometimes) triggers the exception. If you have problems triggering the exception I'm willing to be a tester.

mvtools_mflowinter_bug2.avs.txt

pinterf commented 6 years ago

I'd need the dimensions of your clip (block layout depends on it)

zorrozork commented 6 years ago

My clip is PAL VHS capture, 720x576.

pinterf commented 6 years ago

Thanks, I did not have crash with this res but found other numbers shoing the bug. But the fix is ready. I hope this fix does not trigger another hidden one.

zorrozork commented 6 years ago

Great, thanks for the fix! I just run my script 1000 times with the latest release and there were no issues. I will do more tests with other parameter combinations, but this one is definitely fixed.