View Issue Details

IDProjectCategoryView StatusLast Update
0005354JEDI VCL00 JVCL Componentspublic2011-06-07 17:27
ReporterchackemAssigned Toobones 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.40 
Target VersionFixed in Version 
Summary0005354: Access Violation on Program Exit
DescriptionI am getting an access violation on program exit when I use several different controls: TjvMemo, TjvEdit, TjvSimpleXML. I do NOT get an access violation with other controls, such as TjvEasterEgg.

The program runs fine, but upon exiting, the access violation shows up. I have tried many version, from older versions of jcl and jvcl all the way up to the nightly builds. I have even reinstalled Codegear RAD Studio 2009 and reinstalled it, to no avail. I believe it has something to do with unicodestrings in some way. When the program crashes, the debugger takes me to the include <system> file and the section below:


{$ELSE} // This is line 13860
asm
        { -> EAX pointer to str }

        MOV EDX,[EAX] { fetch str }
        TEST EDX,EDX { if nil, nothing to do }
        JE @@done
        MOV dword ptr [EAX],0 { clear str }
        MOV ECX,[EDX-skew].StrRec.refCnt { fetch refCnt }
        DEC ECX { if < 0: literal str }
        JL @@done

   // It always breaks at this line:
   LOCK DEC [EDX-skew].StrRec.refCnt { threadsafe dec refCount }
        JNE @@done
        PUSH EAX
        LEA EAX,[EDX-skew].StrRec.codePage { if refCnt now zero, deallocate}
        CALL _FreeMem
        POP EAX
@@done:
end;
{$ENDIF}


When I remove the “#pragma link “JvEdit” the av goes away.

I have placed events “OnClose”, “OnCloseQuery”, “OnDestory” and in the destructor itself. OnClose and OnCloseQuery execute, then the AV occurs.

Please let me know if more information is needed.



Additional InformationThis causes an access violation when the program closes.

//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit3.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "JvEdit"
#pragma link "JvExStdCtrls"
#pragma resource "*.dfm"
TForm3 *Form3;
//---------------------------------------------------------------------------
__fastcall TForm3::TForm3(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------

This does not cause an access violation when the program closes because JvEdit is no longer linked. It has been commented out.

#include <vcl.h>
#pragma hdrstop

#include "Unit3.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
//#pragma link "JvEdit"
#pragma link "JvExStdCtrls"
#pragma resource "*.dfm"
TForm3 *Form3;
//---------------------------------------------------------------------------
__fastcall TForm3::TForm3(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------
TagsNo tags attached.

Relationships

related to 0005353 resolvedoutchy JEDI Code Library Application crash on terminating when compiled statically 

Activities

2010-10-07 20:02

 

examples.zip (29,099 bytes)

chackem

2010-10-07 20:06

reporter   ~0017758

BTW, I am running Windows XP SP3 with 2 Gig.

I have tried everything I can think of in the way of options. Using dynamic runtime, not using dynamic runtime. Compile with/without packages. Installing JVCL with and without dxgettext support, etc.

I also downloaded and installed gnu gettext for windows.

obones

2010-10-08 16:43

administrator   ~0017844

What version of Delphi/C++ are you using?

chackem

2010-10-08 16:50

reporter   ~0017846

I'm using Codegear RAD Studio 2009. It builds it from the D12 packages.

chackem

2010-10-08 16:53

reporter   ~0017847

By "IT" I mean the Installer, BTW.

akm

2010-10-21 22:31

reporter   ~0017937

I have the same problem.
In 3.39 all run well, in 3.40 AV jn exit.

obones

2010-11-09 14:16

administrator   ~0018031

Please try with the latest SVN content, I believe this was fixed in the JCL

obones

2011-06-07 17:27

administrator   ~0018572

No news, I'm assuming this is fixed

Issue History

Date Modified Username Field Change
2010-10-07 20:02 chackem New Issue
2010-10-07 20:02 chackem File Added: examples.zip
2010-10-07 20:06 chackem Note Added: 0017758
2010-10-08 16:43 obones Note Added: 0017844
2010-10-08 16:43 obones Status new => feedback
2010-10-08 16:43 obones Relationship added related to 0005353
2010-10-08 16:50 chackem Note Added: 0017846
2010-10-08 16:53 chackem Note Added: 0017847
2010-10-21 22:31 akm Note Added: 0017937
2010-11-09 14:16 obones Note Added: 0018031
2011-06-07 17:27 obones Note Added: 0018572
2011-06-07 17:27 obones Status feedback => resolved
2011-06-07 17:27 obones Resolution open => fixed
2011-06-07 17:27 obones Assigned To => obones