Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Latest version of SyntaxEdit (2024.6) crashing with Addict spell checker in 64-bit builds

Maybe something changed in SyntaxEdit? I am now getting crashes when this line is called in a 64-bit build of a simple test app:
AddictSpell1->CheckWinControl(LMDEditView1,Ad3spellbase::ctSmart);

But it works with a RichEdit control. No crashes with that component. It also works in 32-bit builds.

Please download below file for simple sample project and screenshots of the call stack and events:

I'm using RAD Studio 12.2 with patch 2.

Call stack text:
:00007FFB8CACE48C System::Move(void const*, void*, long long)()
:0000000050672CB0 Lmdsedview::TLMDCustomEditView::EM_GetFirstVisibleLine(Winapi::Messages::TMessage&)()
:0000000050673025 Lmdsedview::TLMDCustomEditView::EM_GetLine(Winapi::Messages::TMessage&)()
:00007FFB8CAD88E4 System::TObject::Dispatch(void*)()

Exception:
First chance exception at $00007FFB8CACE48C. Exception class 0xc0000005 with message 'Exception 0xc0000005 encountered at address 0x7ffb8cace48c: Access violation writing location 0xffffffffe95e0000'. Process Project5.exe (11204)


UPDATE: Something more (not related to SyntaxEdit) may be going on here but I just thought I'd throw this out there as one of the possibilities because some things were pointing in this direction. It could also be another component or bugs in their new toolchain (new C++ compiler/linker)... and Embarcadero is well known for bugs, especially on the C++ side.

Tagged:

Comments

  • 6 Comments sorted by Votes Date Added
  • edited November 18 Posts: 0Vote Up0Vote Down
    Hi,

    I cannot really check it, since we have no latest Addict version. However, I've fixed a potential bug in EM_GetLine function, where the pointer (by nature) parameter was declared as LongInt. I think, this should fix the issue with the high probability. 
  • edited November 18 Posts: 193Vote Up0Vote Down
    Great. I was wondering if it could be a pointer issue (hopefully that was it). When will the bug fix be available?
  • edited November 19 Posts: 193Vote Up0Vote Down
    Not a Delphi programmer but I searched LMDSedView.pas for 'LongInt' and found this:

    procedure CopyArrToPtr(Arr: TLMDCharArray; ACount: Integer; Addr: LongInt);

    Should Addr be LongInt here?

    Maybe this is the bug that you just found?

    UPDATE: I changed it to NativeInt and recompiled lmdrtsyntax and 'Windows 64-bit' and 'Windows 64-bit (Modern)' builds now work in my small test app!
  • I was doing a quick search through some LMD pas files and possibly found LongInt used where NativeInt should be used in several places in pLMDPeX.pas. Just search that file for "LongInt(". Are these 64-bit bugs or do I not understand something correctly?


  • > procedure CopyArrToPtr(Arr: TLMDCharArray; ACount: Integer; Addr: LongInt);

    Yes, you're right.

    pLMDPeX.pas

    It may be. Need to check. Generally, design-time only code, like property editors, is not a subject for x64 compilation.
  • Ahhh! I didn't realize pLMDPeX.pas was "32-bit only" code... at least until Embarcadero goes to a 64-bit IDE I assume.
Sign In or Register to comment.