access violation in AdvSpellCheckdemo

Hello, I'm trying to use the AdvSpellCheck demo, but I keep getting an "Access Violation" message when loading the executable. The error occurs in this function when trying to load the dataset with the TStream:

procedure TCustomAdvSpellCheck.LoadDB(Stream: TStream);
begin
RequiredActiveState;
if Stream.Size = 0 then
CreateTable
else
begin
LockDataSet;
FDataset.Active := false;
try
Stream.Position := 0;
if DoBeforeLoadDB(Stream) then
Exit;
FDataset.LoadFromStream(Stream);
finally
FDataset.Active := true;
ReleaseDataset;
end;
end;
DoAfterLoadDB(Stream);
end;

Is this the latest version?
What Delphi version is this? What OS?
I retested this here with the latest version but couldn't see an issue.
Do you run the demo from the folder where both .EXE & TMSSPELLCHECK.SPLX file are located?

I'm using Delphi XE8 and AdvSpellCheck 1.0.6.6, and the demo is dated April 9, 2024.

The demo executable is in the same directory as the dictionary and TMSSPELLCHECK.SPLX.

So far, I could not reproduce this nor think of a reason.
When you put a breakpoint in LoadDB and step through the code, is it causing the AV on
FDataset.LoadFromStream()?
If so, is FDataset assigned on this line? Is Stream assigned on this line?
If the AV happens on another line, what exact line and what presumably isn't assigned that causes the AV?

The error occurs when attempting to load the TDataset with the TStream. Both are allocated at that moment. The Stream variable's contents were sent to you just before the function where the error occurs was called.

AdvSpellCheckDemo.zip (2.6 MB)
Do you see an issue when you run this demo and the is the attached SPLX file different from the one you have on your machine?

The executable works fine on another machine, but on my machine it continues to give an AV error. My machine uses Windows 10 Pro; the other machine is a Windows Server 2019 Datacenter.

We tested this here both on Win10 and Win11 and in both cases it works.
I can only assume there is something very particular with your Win10 machine. Does it have any kind of special antivirus or security tool that might interfere? Do you have another Win10 machine for testing?

I tested it on another Windows 10 PC, and in this case, the error is: "error loading midas.dll!". I placed midas.dll in the directory, but it still gives the same error. The version of midas.dll is 22.0.19027.8951, dated March 2015.

On my PC, midas.dll is in the path (same 2015 version), but the error is Access Violation.

I retested this here on another Win10 machine, but also here, no issue.
The Midas version on this system is 25.0.26309.314
Do you have access to a newer Midas.dll in case this would be the reason of the issue?

Problem solved. My system was using a midas.dll registered as syswow64 with a 2002 version. Registering the dll from the Delphi XE8 directory resolved the issue. I hadn't realized this dll was being registered. Thank you so much for your help.

1 Like