Visual Studio debugger hits breakpoint when running in coherence

Discussion in 'Installation and Configuration of Parallels Desktop' started by boreno, Sep 19, 2007.

  1. boreno

    boreno Bit poster

    Messages:
    7
    Description:
    The Visual Studio 2005 debugger reports a memory error while unloading DLL:s when terminating a debugged program while running in coherence mode.

    Tested on:
    Windows XP SP2 (with and without security updates)
    Visual Studio .NET 2005 (withou Service Pack 2)
    Parallels Desktop for Mac 3.0 RC2
    Parallels Desktop for Mac 3.0 build 5160

    Steps to repeat:
    1. Create a new Parallels image, install Windows XP SP2 using the automated installation.
    2. Install Visual Studio .NET 2005.
    3. Start coherence mode.
    4. Start Visual Studio and create a new Win32 GUI project using the project wizard. Use standard settings.
    5. Compile and run the created project in the debugger.
    6. Exit the Win32 application.

    Bug: The Visual Studio Debugger will report a memory error while unloading DLL:s.

    Notes:
    This only occurs in coherence mode. I've tried it in two existing Parallels images and one freshly new one created as described above. The problem is not limited to the default Win32 project in Visual Studio; it happens for all tested debugged programs.

    This problem is preventing our developers from using Coherence Mode in Parallels desktop. It also caused a fairly large amount of time to be spent on isolating the problem :).

    ::Ludvig A. Norin, HansaWorld Development, http://www.hansaworld.com
     
  2. serv

    serv Forum Maven

    Messages:
    817
    Ludvig,

    Thanks a lot for your detailed report. The problem will be fixed in our next update for Parallels Desktop.
    For the time being please try to ignore this freed heap modification error.
     
    Last edited by a moderator: Sep 20, 2007
  3. boreno

    boreno Bit poster

    Messages:
    7
    Great, that's all I needed to know!
    ::Ludvig A. Norin
     
  4. MikkoS

    MikkoS Bit poster

    Messages:
    1
    Sorry for resurrecting an old thread, but part of this problem is still evident even in the latest (5.0 build 9220) version. I've located the issue in the COM initialization: If CoInitialize() is called during the application lifetime, parts of the heap gets written after it is freed. This is of course a minor issue but is a real annoyance in day-to-day development.

    Steps to reproduce:
    - Start Visual Studio.NET 2008
    - Start New project wizard, create a new MFC Application with default settings (click Finish in the wizard)
    - Go to Coherence or Crystal mode
    - Start the application with debugging in Visual Studio
    - Quit the application
    - Visual studio will detect heap corruption at the application exit with the following message:
    ******
    HEAP[asdf.exe]: HEAP: Free Heap block 15e220 modified at 15e278 after it was freed
    Windows has triggered a breakpoint in asdf.exe.

    This may be due to a corruption of the heap, which indicates a bug in asdf.exe or any of the DLLs it has loaded.
    ******

    Running the same application in Windowed of Fullscreen modes does not exhibit the same behavior.
     

Share This Page