How do I fix mscorwks.dll error?
Posted on 2009-04-01
I am programming in vb.net 2008, .Net Framework 3.5 SP1 on a Vista computer.
I have ported my vb6 project to vb.net 2008. All was going great except when testing the new number crunching calculations with arrays that can get quite large. This creates and runs a batch file with 25000 runs.
I have tried run the program multiple times with the same input data for each of the 25000 times to make sure that the data is known and reliable each and every time.
Sometimes the program crashes at line 252, the next run at line 776, next at 345...that it to say that it is random. This happens on both a Vista and XP machines.
The first thing I did was check my event viewer:
Faulting application FlawCheck2008.vshost.exe, version 9.0.21022.8, time stamp 0x47316898, faulting module mscorwks.dll, version 2.0.50727.3074, time stamp 0x48ead734, exception code 0xc0000005, fault offset 0x00123bd9, process id 0xd48, application start time 0x01c9ac9433342989.
Event ID: 1000
Researching this error, I found 2 patches for mscorwks.dll, neither of which installs on my computer since apparently I don't need it.
I am currently trying to figure this out with windbg.exe, and don't have much experience with this. I've never had to use it. This is what I have found:
0776fa8c 68d05dda mscorwks!WKS::gc_heap::mark_object_simple1+0x148
0776fab8 68c9f515 mscorwks!WKS::gc_heap::mark_object_simple+0x19d
0776faec 68c9efc1 mscorwks!WKS::gc_heap::c_drain_mark_list+0x95
0776fb18 68c9f9b3 mscorwks!WKS::gc_heap::c_mark_phase+0xaa
0776fb34 68d0ed65 mscorwks!WKS::gc_heap::gc1+0x59
0776fb4c 68d0edb7 mscorwks!WKS::gc_heap::gc_thread_function+0x9f
0776fb54 75e04911 mscorwks!WKS::gc_heap::gc_thread_stub+0x73
0776fb60 76e3e4b6 KERNEL32!BaseThreadInitThunk+0xe
0776fba0 76e3e489 ntdll!__RtlUserThreadStart+0x23
0776fbb8 00000000 ntdll!_RtlUserThreadStart+0x1b
eax=00000000 ebx=024ac378 ecx=08420a20 edx=0a110000 esi=024aaa38 edi=00000001
eip=68d05f16 esp=0776fa60 ebp=0776fa8c iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010246
68d05f16 f70000000080 test dword ptr [eax],80000000h ds:0023:00000000=????????
I have done some research on the garbage collector and have added the IDisposable class to my number crunching classes.
Program still crashes ungracefully (to put it mildly)
I am having a problem with windbg.exe and using the sos.dll in order to use the !verifyheap to get the 'last good object'.
Any insights would be greatly appreciated.