The delphi 7 host application crashed (rarely) when the visual plugin (c#) started

Hi all.

We have D7 application. Sometimes, when we stated visual plugin, the host application crashed without delphi 7 exception. In Windows events (Application group) appeared the next error :

Faulting application name: CrystalCentral.exe, version: 1.29.35.499, time stamp: 0x2a425e19
Faulting module name: clr.dll, version: 4.0.30319.269, time stamp: 0x4ee9ae83
Exception code: 0xc0000005
Fault offset: 0x00001898
Faulting process id: 0x1394
Faulting application start time: 0x01cd32af51988b1d
Faulting application path: C:\FiplanKUL\Crystal\Central\CrystalCentral.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Report Id: a001e561-9ea2-11e1-964e-00155d00023d

Any suggestion what can we solve it?

Hi,

Unfortunately we are not aware of problem like this one, and with just this error entry it is hard to say what can go wrong. Can you try to reproduce this problem with Visual Studio attached, maybe then you will be able to catch real exception?

Also here is MS article - http://support.microsoft.com/kb/2640103 that might be helpful.

Thank you,

it seems that the .NET “hot fix” solved the problem.

Here is the link to hotfix:

http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2640103&kbln=en-us

I was wrong. The hotfix didn’t help.

Now we added to our plagin Dispose method and program executes it when the host program is closing.

    void ICPlugin.executeCmd(string cmd)
    {
        TraceLog("Entering executeCmd cmd: " + cmd);

        if (cmd == "finish")
            this.Dispose();



}

    protected void Dispose()
    {
        TraceLog("Entering Dispose");

        foreach (DevExpress.XtraTab.XtraTabPage tab in this.journalTabControl.TabPages)
        {
            tab.Controls[0].Dispose();
            this.mainConnection.Dispose();
            this.mainCommand.Dispose();
        }

        journalTabControl.Dispose();

        TraceLog("Exiting Dispose");
        
    }

We test it and it seems that this time it helps.

Dear RemObjects team, we have a critical problem. Below I will describe it.
First of all, we have our application in Delphi 7 and this program will start visual plugin in .net (visual studio 2010, c#). Sometimes the host application crashed when we tried to start and close it many times. Please, check the attached video clip (my excuses for the low quality but we did it for the smallest file size).
I think you can test it in the same way as we do.
1- You will install WinTask application (evolution version, The automation GUI software, http://www.wintask.com/index.php).
2- You will create the same folder structure (c:\Test)
3- You will use the attached script for testing and attached host programs and plugin
The crash will apper not all the time. Sometimes the full script will be done without any errors. In our computer (Windows Server 2008R 64bit) it appears usually once every 3—4 script runs.

The problem appears for .Net 3.5, .Net 4 with all last Microsoft updates.

P.S. I can’t attached files (exceeded limit). Please, contact us by mail.

Responded via email.

Files can be downloaded here:

http://dl.dropbox.com/u/80838084/HydraProblem.zip

Hello,
it seems, that I have a similar problem in my application. Has there been a solution? Or do you have any suggestions, what could be the cause of this problem?

Have you tried to attach VS and catch real exception?

can you create a simple testcase that reproduces this problem and attach it here or send to support@, pls ?