Log in

View Full Version : access violation during mem read


kallenin
3rd July 2007, 06:35
Hey all,

I've been getting VDub crashes during 3rd or 4th pass multi-pass encodes with the latest divx (6.6.1). I had this error before and it seemed to be fixed when I disabled my Creative mp3 codec, but it suddenly started up again. Curiously, it seems to happen only at the end of a pass. Here's the crash report, copied from a 3rd pass fail:

VirtualDub crash report -- build 24469 (release)
--------------------------------------

Disassembly:
01411d20: 0000 add [eax], al
01411d22: 008b45ec8b1b add [ebx+1b8bec45], cl
01411d28: 8b5004 mov edx, [eax+04h]
01411d2b: 8955e8 mov [ebp-18h], edx
01411d2e: 3bda cmp ebx, edx
01411d30: 75cb jnz 01411cfd
01411d32: c745fcffffffff mov dword ptr [ebp-04h], ffffffff
01411d39: 8b45ec mov eax, [ebp-14h]
01411d3c: 8b7004 mov esi, [eax+04h]
01411d3f: 8b1e mov ebx, [esi]
01411d41: 3bde cmp ebx, esi
01411d43: 7425 jz 01411d6a
01411d45: 8bc3 mov eax, ebx
01411d47: 50 push eax
01411d48: 8b1b mov ebx, [ebx]
01411d4a: 8b10 mov edx, [eax]
01411d4c: 8b4804 mov ecx, [eax+04h]
01411d4f: 8911 mov [ecx], edx
01411d51: 8b7804 mov edi, [eax+04h]
01411d54: 8b10 mov edx, [eax]
01411d56: 897a04 mov [edx+04h], edi
01411d59: e886840500 call 0146a1e4
01411d5e: 59 pop ecx
01411d5f: 8b45ec mov eax, [ebp-14h]
01411d62: 834008ff add dword ptr [eax+08h], 0ffh
01411d66: 3bde cmp ebx, esi
01411d68: 75db jnz 01411d45
01411d6a: 8b45ec mov eax, [ebp-14h]
01411d6d: ff7004 push dword ptr [eax+04h]
01411d70: e86f840500 call 0146a1e4
01411d75: 59 pop ecx
01411d76: 8b55ec mov edx, [ebp-14h]
01411d79: 8b7ddc mov edi, [ebp-24h]
01411d7c: 8b75e0 mov esi, [ebp-20h]
01411d7f: 8b5de4 mov ebx, [ebp-1ch]
01411d82: 33c0 xor eax, eax
01411d84: 894204 mov [edx+04h], eax
01411d87: 894208 mov [edx+08h], eax
01411d8a: 8b4df4 mov ecx, [ebp-0ch]
01411d8d: 64890d00000000 mov fs:[00000000], ecx
01411d94: 8be5 mov esp, ebp
01411d96: 5d pop ebp
01411d97: c3 ret
01411d98: 8b410c mov eax, [ecx+0ch]
01411d9b: 85c0 test eax, eax
01411d9d: 7419 jz 01411db8
01411d9f: 8b542404 mov edx, [esp+04h]
01411da3: 3b10 cmp edx, [eax] <-- FAULT
01411da5: 7507 jnz 01411dae
01411da7: c6411001 mov byte ptr [ecx+10h], 01h
01411dab: c21000 ret 0010
01411dae: 52 push edx
01411daf: e830840500 call 0146a1e4
01411db4: 59 pop ecx
01411db5: c21000 ret 0010
01411db8: 8b542404 mov edx, [esp+04h]
01411dbc: ebf0 jmp 01411dae
01411dbe: 90 nop
01411dbf: 90 nop
01411dc0: 8b442404 mov eax, [esp+04h]
01411dc4: 89410c mov [ecx+0ch], eax
01411dc7: ba01000000 mov edx, 00000001
01411dcc: 885110 mov [ecx+10h], dl
01411dcf: 885118 mov [ecx+18h], dl
01411dd2: c20400 ret 0004
01411dd5: 90 nop
01411dd6: 90 nop
01411dd7: 90 nop
01411dd8: 57 push edi
01411dd9: 56 push esi
01411dda: 55 push ebp
01411ddb: 53 push ebx
01411ddc: 8bf1 mov esi, ecx
01411dde: 8b4608 mov eax, [esi+08h]
01411de1: 85c0 test eax, eax
01411de3: c6461800 mov byte ptr [esi+18h], 00h
01411de7: 7515 jnz 01411dfe
01411de9: 8b560c mov edx, [esi+0ch]
01411dec: 33c0 xor eax, eax
01411dee: 894208 mov [edx+08h], eax
01411df1: 8b4e0c mov ecx, [esi+0ch]
01411df4: 88410c mov [ecx+0ch], al
01411df7: 5b pop ebx
01411df8: 5d pop ebp
01411df9: 5e pop esi
01411dfa: 5f pop edi
01411dfb: c20400 ret 0004
01411dfe: 8b4604 mov eax, [esi+04h]
01411e01: 8b5004 mov edx, [eax+04h]
01411e04: 83c208 add edx, 08h
01411e07: 52 push edx
01411e08: 8bce mov ecx, esi
01411e0a: e8a1000000 call 01411eb0
01411e0f: 0fb6442414 movzx eax, byte ptr [esp+14h]
01411e14: 85c0 test eax, eax
01411e16: 7409 jz 01411e21
01411e18: 33c0 xor eax, eax
01411e1a: 5b pop ebx
01411e1b: 5d pop ebp
01411e1c: 5e pop esi
01411e1d: 5f pop edi
01411e1e: c2 db 0c2h
01411e1f: 04 db 04h

Built on KOS-MOS on Sat Nov 04 21:36:36 2006 using compiler version 1200

Windows 5.1 (Windows XP build 2600) [Service Pack 2]

EAX = 03c7fb64
EBX = 0162d888
ECX = 0162c184
EDX = 072c0020
EBP = 0012f41c
ESI = 000002b7
EDI = 00159000
ESP = 0012f3e4
EIP = 01411da3
EFLAGS = 00210202
FPUCW = ffff027f
FPUTW = ffffffff

Crash reason: Access Violation

Crash context:
An out-of-bounds memory access (access violation) occurred in module 'DivX'...

...reading address 03C7FB64.

Pointer dumps:

EBX 0162d888: 0162d658 0162c3e8 072c0020 00159000 000002b7 00000000 00040008 0108006d
ECX 0162c180: 00000001 00000001 0162c3e8 00000003 03c7fb64 00000001 00159000 00000001
EDX 072c0020: b6010000 09b8cf5c 17dffb42 0b388ad7 dd8f7b28 2c6ef8c2 eec717e9 fbe3efc7
EDI 00159000: 0b0b0b0b 0b0b0b0b 0b0b0b0b 0b0b0b0b 0b0b0b0b 0b0b0b0b 0b0b0b0b 0b0b0b0b
ESP 0012f3e0: f3a46d30 01411d23 072c0020 00159000 000002b7 00000000 0162bc18 0422f748
0012f400: 01513498 0162c3e8 0162c184 0012f3f8 0012f450 014b2280 00000000 0012f45c
0012f420: 013fef82 01510ac8 01510ac8 0162bc18 01510ac8 0162bc18 0422f748 0162bc18
0012f440: 0012f420 0162e668 0012f478 0012f424 0012f478 014b2056 00000006 0012f484
EBP 0012f418: 00000000 0012f45c 013fef82 01510ac8 01510ac8 0162bc18 01510ac8 0162bc18
0012f438: 0422f748 0162bc18 0012f420 0162e668 0012f478 0012f424 0012f478 014b2056
0012f458: 00000006 0012f484 013d3539 0162bc18 0422f748 0162bc18 0162bc18 0012f464
0012f478: 0012f4c4 014b18ac ffffffff 0012f4d0 013d34a2 01632b18 013a397f 00000001

Thread call stack:
01411da3: DivX!DriverProc [01370000+3fd0+9ddd3]
01411d23: DivX!DriverProc [01370000+3fd0+9dd53]
013fef82: DivX!DriverProc [01370000+3fd0+8afb2]
013d3539: DivX!DriverProc [01370000+3fd0+5f569]
013d34a2: DivX!DriverProc [01370000+3fd0+5f4d2]
013a397f: DivX!DriverProc [01370000+3fd0+2f9af]
01372852: DivX!00002852
013744f3: DivX!DriverProc [01370000+3fd0+523]
75a718a8: MSVFW32!ICSendMessage [75a70000+187d+2b]
004ae64b: VideoSequenceCompressor::finish()
004adf93: VideoSequenceCompressor::~VideoSequenceCompressor()
00477e7c: Dubber::Stop()
0049c881: VDProjectUI::UIRunDubMessageLoop()
00497ffc: VDProject::RunOperation()
7c9106eb: ntdll!RtlAllocateHeap [7c900000+105d4+117]
0051d29f: _heap_alloc()
00470c38: SaveAVI()
0049fc15: func_VirtualDub_SaveAVI()
004da1f1: VDScriptInterpreter::InvokeMethod()
004d9eb8: VDScriptInterpreter::InvokeMethod()
004dab2b: VDScriptInterpreter::Token()
004d98ec: VDScriptInterpreter::ParseExpression()
004d9821: VDScriptInterpreter::ParseExpression()
004d9821: VDScriptInterpreter::ParseExpression()
004d91f6: VDScriptInterpreter::ExecuteLine()
0049dddb: RunScriptMemory()
0048697f: VDJob::Run()
00487815: VDJob::RunAll()
00489200: JobCtlDlgProc()
7e432632: USER32!OpenDesktopA [7e410000+22329+309]
7e418734: USER32!GetDC [7e410000+86c7+6d]
7e423745: USER32!PrivateExtractIconExW [7e410000+13493+2b2]
7e423591: USER32!PrivateExtractIconExW [7e410000+13493+fe]
7e42765c: USER32!GetWindowRgn [7e410000+1752f+12d]
7e41b903: USER32!SendMessageW [7e410000+b8ba+49]
7e44fd1d: USER32!CreateMDIWindowA [7e410000+3fb60+1bd]
7e446561: USER32!DeregisterShellHookWindow [7e410000+30288+62d9]
7e426df4: USER32!IsDlgButtonChecked [7e410000+15d75+107f]
7e418816: USER32!GetDC [7e410000+86c7+14f]
7e41885a: USER32!GetDC [7e410000+86c7+193]
7e41882a: USER32!GetDC [7e410000+86c7+163]
7e41f896: USER32!CallNextHookEx [7e410000+f85b+3b]
7e4184fc: USER32!000084fc
7e4185a4: USER32!000085a4
7e43b04a: USER32!SoftModalMessageBox [7e410000+2a2a7+da3]
7e418734: USER32!GetDC [7e410000+86c7+6d]
7e418816: USER32!GetDC [7e410000+86c7+14f]
7e41f805: USER32!EnableMenuItem [7e410000+f787+7e]
7e4189cd: USER32!GetWindowLongW [7e410000+88a6+127]
7e431b3c: USER32!AppendMenuA [7e410000+21ace+6e]
7e418a10: USER32!DispatchMessageW [7e410000+8a01+f]
7e42d99d: USER32!IsDialogMessageW [7e410000+1d8c2+db]
7e43c69b: USER32!IsDialogMessage [7e410000+2c651+4a]
00483857: guiCheckDialogs()
00483912: VDModelessDialogHookW32()
7e4318e3: USER32!UnhookWinEvent [7e410000+2186c+77]
7e41f7f6: USER32!EnableMenuItem [7e410000+f787+6f]
7e41f94b: USER32!CallNextHookEx [7e410000+f85b+f0]
7c90eae3: ntdll!KiUserCallbackDispatcher [7c900000+ead0+13]
7e431b3c: USER32!AppendMenuA [7e410000+21ace+6e]
7e42da00: USER32!CallMsgFilterW [7e410000+1d9ac+54]
7e42d91c: USER32!IsDialogMessageW [7e410000+1d8c2+5a]
7e43c69b: USER32!IsDialogMessage [7e410000+2c651+4a]
00483857: guiCheckDialogs()
0048a19f: WinMain@16()
0052084f: WinMainCRTStartup()
7c816fd7: kernel32!RegisterWaitForInputIdle [7c800000+16f8e+49]

-- End of report


I've searched all over and haven't quite found an error report like mine. All of the crashes I've seen in the 'DivX' module involve encode errors, not memory address reads.

I'm using fast recompress to convert a 40 minute 720x480 video from 13GB HuffYUV+PCM encoded to 700MB Divx6.6.1+LameMP3 encode. I do a 4-pass encode, and use the following settings:
Bitrate: 1930
Insane Quality
Adaptive Multiple Consecutive
Quarter-pixel search
Global Motion Compensation
Crop (left: 14, right: 4, top: 56, bottom: 63)
Resize to 640x360 using Bicubic(normal) and SQUARE 1:1 pixels
Noise Reduction: Auto-detect
H.263 Optimized Quantization
De-interlace Source
Psychovisual Enhancement: Shaping (with enhanced I-Blocks)

The command line entry (copied from the "advanced" tab) is: -bvnn 1930000 -vbv 218691200,100663296,100663296 -c 14,4,56,63 -r 640,360,3 -pre 5 -dir "C:\Documents and Settings\Albert Chiou\Application Data\DivX\DivX Codec" -w -pq 8610 -q -g -b 3 -deinterlace=1 -quantization=2 -psychovisual=2 -enhance_texture=1

For audio, I use direct stream copy until the last pass, where I use lameMP3. I haven't even gotten to the last pass yet, though, so I'm not so sure audio is the problem.

-Albert Chiou

foxyshadis
3rd July 2007, 18:28
Transferring this to Divx forum, since that's where the error likely is (unless it's hardware related).

Although the idea of 3+ passes with such a high bitrate (for SD) just boggles my mind.... Normally massively multipass is only used for low bitrates with a large quant spread, or for a codec with totally broken rate control (CCE and ffmpeg, for instance), plus I'd be surprised if you aren't getting mostly q2 and 3 with the h.263 matrix.

kallenin
5th July 2007, 07:01
As far as doing the multi-pass, my source had a lot of noise and I was using the built-in DivX filtering, so I just wanted to make sure none of the details dropped out. Would MPEG-2 or H.263 quantization be better at that bitrate? All those online guides never really say what they mean by "high" or "mid-range" bitrates.


Related to my multipass problem, I found these interesting lines at the end of the map.log file:

82412 1001 P 5680 0.001389 0.039607 1.000000
82413 1001 P 5568 0.000166 0.041090 1.000000
82414 82497238 P 64 0.000265 0.000000 1.000000
82415 1001 P 64 0.000265 0.000000 1.000000
82416 1001 P 64 0.000265 0.000000 1.000000


Is it possible I could fix my problem by changing that "82497238" to "1001" and proceeding to the fourth pass?

-Albert C.