VB6 WMP.DLL Access Violation

Tech-Archive recommends: Fix windows errors by optimizing your registry




I'm trying to create an OCX using VB6 with WMP 10 embedded, and I'm having some
stability issues. When I exit my application that uses the OCX, I get an access
violation. The steps to reproduce this and details on the exception are
included below. Can anyone explain why this is happening and provide a fix?

Create a project with one form.
Add a component reference to wmp.dll
Add a User Control to the project
Add an instance of the wmp control to the user control
Add an instance of the user control to the main form
Compile the program
Open the program in the debugger (WinDbg)
Run the program and close the main form window

You will get the following exception:

(13ec.32c): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=00000004 ebx=00d81d84 ecx=7c809f12 edx=feeefeee esi=00001000 edi=feeefef1
eip=7c809eec esp=0012feb4 ebp=0012fee0 iopl=0 nv up ei pl zr na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010246
*** ERROR: Symbol file could not be found. Defaulted to export symbols for
C:\WINDOWS\system32\kernel32.dll -
kernel32!IsBadReadPtr+0x39:
7c809eec 8a02 mov al,[edx] ds:0023:feeefeee=??
c0000

The system seems to be freeing something twice (off the heap, I
presume). The application doesn't exit properly.

Tnx!
Eric
.



Relevant Pages

  • Re: Terminating program in ProcessWndProcException
    ... Heap corruption has deep implications; what is really going to happen ... Note that calling exit() invokes the onexit handler, which will do things like call ... Except that now there is no longer an exception handler present, ...
    (microsoft.public.vc.mfc)
  • Re: Timer Callback and Overlap
    ... they may exit due to exceptions. ... however if the code behaves in a stateful way (by ... exception is to exit the call back. ... > Your calls will NOT exit the callback function midway. ...
    (microsoft.public.dotnet.framework)
  • Re: Timer Callback and Overlap
    ... they may exit due to exceptions. ... > exception is to exit the call back. ... >> Your calls will NOT exit the callback function midway. ... >> its threads for your timer. ...
    (microsoft.public.dotnet.framework)
  • Re: exit call in script causes unit test to not run (newby)
    ... I currently have a ruby script which I'm trying to create some ... If I comment out the exit then my tests actually run. ... something I commonly do in bourne shell scripts and it made sense to ... Especially shell does not have exception handling. ...
    (comp.lang.ruby)
  • Re: User control event problem
    ... Catch ex As Exception ... >I have a grid and a user control on the same page. ... > happens the page renders, but I need to update the grid information before ...
    (microsoft.public.dotnet.framework.aspnet)