none
Application Faulting MFC80.DLL or OLEAUT32.DLL or OLE32.dll

    Question

  • Hi,

    We are running a .Net (C#) app on Windows 7 Ultimate 64 bit and Windows 2008 Server 64bit and every so often the application randomly faults and just disappears.

    The app also communicates with some COM objects (Sage Accounts SDO) via an interop. The app is also compiled and targeted for x86 architecture due to the com object been 32 bit only.

    The fault is either in the MFC80.dll or OLEAUT32.dll or OLE32.dll, e.g.

    Faulting application name: [the app name].exe, version: 1.0.0.0, time stamp: 0x4e2d6b2d
    Faulting module name: OLEAUT32.dll, version: 6.1.7601.17567, time stamp: 0x4d673de9
    Exception code: 0xc0000005
    Fault offset: 0x00033d5d
    Faulting process id: 0x1370
    Faulting application start time: 0x01cc4ad7e5004997
    Faulting application path: [the app path].exe
    Faulting module path: C:\Windows\syswow64\OLEAUT32.dll
    Report Id: d730b779-b6cb-11e0-b39b-0023546b85ca

      Faulting application name: [the app name].exe, version: 1.0.0.0, time stamp: 0x4e2d6b2d
    Faulting module name: ole32.dll, version: 6.1.7601.17514, time stamp: 0x4ce7b96f
    Exception code: 0xc0000005
    Fault offset: 0x0002b5f0
    Faulting process id: 0xa2c
    Faulting application start time: 0x01cc4ad91967b75c
    Faulting application path: [path to app].exe
    Faulting module path: C:\Windows\syswow64\ole32.dll
    Report Id: bd858266-b6cd-11e0-b39b-0023546b85ca

    etc

     It seems to be something either to do with 32 bit app running on 64 bit windows, and/or httpwebrequest communication, but that might just be a coincidence.

     We've ensured the latest versions of the vs2008/2010 redistributable runtimes are installed (both x86/x64) which seems to have made the MFC80.dll fault disapear, but the OLEAUT32.dll/OLE32.dll fault seems to have taken it's place!

    As with any application fault, windows just bins the whole thing, so even running it inside Visual Studio is of no help! :(

    Any hints/ideas on how to resolve this would be *very* welcome!

    Monday, July 25, 2011 2:54 PM

All replies

  • If you have the code for the comm object, perhaps a stack dump might be of some use.

     

    Check out Microsoft's debugdiag utility: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=24370

    This will monitor for application crashes, and generate a .dmp file which you can open in Visual Studio. Sometimes they help, sometimes they don't.


    Monday, July 25, 2011 3:00 PM
  • Unfortunately we do not as it is a 3rd party library. Also the app just goes completely without any exceptions or warnings, which is rather annoying!

    Anyone else had similar problems with 32bit on 64bit OS?

    If we could stick a try catch around it we'd work around the problem, but we can't even do that! :(

    Monday, July 25, 2011 7:53 PM
  • Well, an AccessViolation exception means that some part of your (or the 3rd party) code is doing something to memory which it shouldnt. Usually, the best practice is to just kill the application outright.

     

    DebugDiag may still be of some use, as it will give you some details about the function which it crashed in. I'd say, if you can reproduce it, give it a try.

    Monday, July 25, 2011 7:56 PM
  • I'll give that a go and try and isolate the exact line of code that is causing weird faults in MFC80.dll/ole32.dll etc. and report back!

     

    Thanks

    Tuesday, July 26, 2011 7:27 AM
  • Right I've managed to get a crash dump, if someone could enlighten me to what is probably causing the crash that would be helpful!

     

    In [the app name]__PID__2844__Date__07_26_2011__Time_09_08_19AM__800__Second_Chance_Exception_C0000005.dmp the assembly instruction at rpcrt4!NdrStubCall2+2aa in C:\Windows\SysWOW64\rpcrt4.dll from Microsoft Corporation has caused an access violation exception (0xC0000005) when trying to read from memory location 0x1040a074 on thread 8

    Thread 8 - System ID 5472

    Entry point   ole32!CRpcThreadCache::RpcWorkerThreadEntry
    Create time   26/07/2011 08:53:19
    Time spent in user mode   0 Days 0:1:0.777
    Time spent in kernel mode   0 Days 0:2:0.167
    Function     Arg 1     Arg 2     Arg 3   Source
    rpcrt4!NdrStubCall2+2aa     0a78d188     00502200     0056a198   
    ole32!CStdStubBuffer_Invoke+b6     0a78d188     0056a198     00502200   
    oleaut32!CStubWrapper::Invoke+a2     09e243a0     0056a198     00502200   
    ole32!SyncStubInvoke+3c     0056a198     0051fe44     00579498   
    ole32!StubInvoke+b9     0056a198     0056c920     09e243a0   
    ole32!CCtxComChnl::ContextInvoke+fa     00502200     00000000     09e243a0   
    ole32!MTAInvoke+1a     0056a198     00000001     09e243a0   
    ole32!STAInvoke+46     0056a198     00000001     09e243a0   
    ole32!AppInvoke+ab     d0908070     00502200     09e243a0   
    ole32!ComInvokeWithLockAndIPID+372     0056a140     05fafb68     00000000   
    ole32!ComInvoke+c5     0056a140     00000400     005273e0   
    ole32!ThreadDispatch+23     0056a140     00000000     754a9286   
    ole32!ThreadWndProc+161     0007008c     00000400     0000babe   
    user32!InternalCallWinProc+23     754a9286     0007008c     00000400   
    user32!UserCallWinProcCheckWow+109     00000000     754a9286     0007008c   
    user32!DispatchMessageWorker+3bc     754a9286     00000000     0518fd38   
    user32!DispatchMessageW+f     0518fd1c     00000000     75597aa8   
    ole32!CDllHost::STAWorkerLoop+6b     00007530     74e91151     00541860   
    ole32!CDllHost::WorkerThread+d0     0518fd78     7547cd48     75597aa8   
    ole32!DLLHostThreadEntry+d     75597aa8     00000000     00541860   
    ole32!CRpcThread::WorkerLoop+26     00000000     00000000     0518fd94   
    ole32!CRpcThreadCache::RpcWorkerThreadEntry+16     00541860     0518fdd4     770d9ed2   
    kernel32!BaseThreadInitThunk+e     00541860     7219caaf     00000000   
    ntdll!__RtlUserThreadStart+70     7547d864     00541860     00000000   
    ntdll!_RtlUserThreadStart+1b     7547d864     00541860     00000000

    RPCRT4!NDRSTUBCALL2+2AAIn [the app name]__PID__2844__Date__07_26_2011__Time_09_08_19AM__800__Second_Chance_Exception_C0000005.dmp the assembly instruction at rpcrt4!NdrStubCall2+2aa in C:\Windows\SysWOW64\rpcrt4.dll from Microsoft Corporation has caused an access violation exception (0xC0000005) when trying to read from memory location 0x1040a074 on thread 8

    Module Information

    Image Name: C:\Windows\SysWOW64\rpcrt4.dll   Symbol Type: PDB
    Base address: 0x75980000   Time Stamp: Sat Nov 20 12:08:57 2010
    Checksum: 0x000afaa0   Comments:
    COM DLL: True   Company Name: Microsoft Corporation
    ISAPIExtension: False   File Description: Remote Procedure Call Runtime
    ISAPIFilter: False   File Version: 6.1.7601.17514 (win7sp1_rtm.101119-1850)
    Managed DLL: False   Internal Name: rpcrt4.dll
    VB DLL: False   Legal Copyright: © Microsoft Corporation. All rights reserved.
    Loaded Image Name: rpcrt4.dll   Legal Trademarks:
    Mapped Image Name:
      Original filename: rpcrt4.dll
    Module name: rpcrt4   Private Build:
    Single Threaded: False   Product Name: Microsoft® Windows® Operating System
    Module Size: 960.00 KBytes   Product Version: 6.1.7601.17514
    Symbol File Name: c:\symcache\wrpcrt4.pdb\FAC24015130D4D7FAAA77EA36ED5AF1C2\wrpcrt4.pdb   Special Build: &

     

    Does it look like the COM interop stuff?

     

    Thanks!

     

     

     

     

     

    Tuesday, July 26, 2011 8:15 AM
  • Hi Mark,

    I found that the main issue is you want to read from memory somewhere, however, got the access violation exception, right? I'm afraid we cannot find the exact reason of your issue according to your description. If you have any time, could you please show us you code and your dump file?

    The following is my mailbox: v-shysun@microsoft.com You can send me email or share with us in the Internet.

    Looking forward to hearing from you.

     

    Have a nice day,


    Jackie Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, July 28, 2011 2:28 AM
  • We have something similar happening:

     

    Faulting application name: iexplore.exe, version: 9.0.8112.16421, time stamp: 0x4d76255d

    Faulting module name: OLEAUT32.dll, version: 6.1.7601.17567, time stamp: 0x4d673de9

    Exception code: 0xc0000005

    Fault offset: 0x000236b4

    Faulting process id: 0x1384

    Faulting application start time: 0x01cc5121672b3803

    Faulting application path: C:\Program Files (x86)\Internet Explorer\iexplore.exe

    Faulting module path: C:\Windows\syswow64\OLEAUT32.dll

    Report Id: 20325813-bd15-11e0-a04c-00232420d622

    The PC's this happens on are Windows 7 Enterprise, SP1, 64-bit. 32-bit IE 9 being used.

    Tuesday, August 02, 2011 2:53 PM
  • Hi All,

    We are trying to make a small C# winforms app that reproduces this issue, however we've had to leave it for the moment as other client commitments have come up.

    However the winforms app does not so far have this issue, only the windows service (also written in C#) exhibits the issue. We've tried running the service as a logged in admin user but still generates the issue.

    Anyhow, when we get something we can redistribute that shows the fault I'll let you know!

    Many thanks!

    Tuesday, August 02, 2011 4:21 PM
  • Hey All,

    Sorry for reviving this thread, but I bumped into a possible cause for this problem.
    So I decided to share it.

    I am also using a 3rd party like the OP is and made a wrapper class for my own application.
    Everything worked fine, until I changed a signature of a callback.

    Working: protected unsafe void Callback(ref SomeStruct struct)
    Defective: protected unsafe void Callback(SomeStruct struct)

    I hope this will help someone in the future.

    Wednesday, April 18, 2012 10:22 AM