Unhandled Exception Memory Access Violation
Solution Available
Cyril P.
Meung Sur Loire, Loiret

Oct 18, 2012
19 Posts

Unhandled exception memory access violation

Hello,

I am using ATEasy 8 (build 148) under Windows 7 32bits and I have a crash of Ateasy when I quit the executable or when I start again my project in dev mode.
I found the problem is caused by the use of my IO module hardware. It seems that the resource is not release when I stop my program.
I already use this IO module under Ateasy 8 and WinXP without problem. The same program doesn't crash on WinXP.
I have contact the supplier of the IO module and he told me that it is working under Win7.
Indeed, I have tried his demo program provide with the dll and no problem.

I have update Ateasy 8 with the last build 148b: no change, still crash.
Here is the error event.
Unhandled exception at 0x77132c39 in C:\Windows\SYSTEM32\ntdll.dll : Memory access violation 0xc0000005
Thread (Current and not ATEasy) ID=0xdd8, Handle=0xfffffffe
    Internal Call Stack
        C:\Windows\SYSTEM32\ntdll.dll
            RtlFreeHeap [Address = 0x77132c39, Offset = 0x3f]
        C:\Windows\system32\kernel32.dll
            HeapFree [Address = 0x759ac3d4, Offset = 0x14]
        C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6195_none_d09154e044272b9a\MSVCR80.dll
            free [Address = 0x72b54c39, Offset = 0xcd]
        C:\Windows\system32\AteRt.DLL
            CAFString::~CAFString [Address = 0x13385793, Offset = 0x13]
            CAArray::Serialize [Address = 0x132ab6f5, Offset = 0x5e5]

Thanks for your support.
Cyril

Cyril P.
Meung Sur Loire, Loiret

Oct 18, 2012
19 Posts

Re: Unhandled exception memory access violation

I have continued my investigation and found the following:
- as I said before, my project works fine under Ateasy 8 build 148 and Windows XP SP3; in dev mode and executable file
- I've execute the build created under WinXP on the Win7 tester and it works fine too: no issue!

So, the same project crash only if build on Win7 or executed in dev mode.

Hope this helps.
Thanks.
Cyril

Albert Q.
Anaheim, CA

Oct 18, 2012
11 Posts

Re: Unhandled exception memory access violation

Hi Cyril,

The problem could be caused by the DLL was not unloaded before the thread that has loaded the DLL is terminated (the IO module DLL may needs to release its resources from the same thread that loaded the DLL).
You can force unload the DLL before the running thread ended by adding UnloadLibrary 'DllLibrary' statement to the OnEnd() event of the driver containg the library (where DllLibrary is the name of IO module library). Please see UnloadLibrary help topic for more details info.

Let me know if this works.

Regards,
Albert

Cyril P.
Meung Sur Loire, Loiret

Oct 19, 2012
19 Posts

Re: Unhandled exception memory access violation

Hi Albert,

thanks for your help but it didn't fix my problem. Still the same error. The UnloadLibrary doesn't change anything.

I tried again another project builded under WinXP and this one crash under Win7.
So my previous reply is not completely true: a build created on WinXP could crash under Win7.

Regards,
Cyril



Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]