Page 1 of 1

Access violation when reopening form Zeoslib 7.1.4

Posted: 27.11.2017, 04:20
by Alancj
I have a very strange situation here. When opening a form the first time everything works fine.

However, if I close it and then reopen we get an access violation on ZConnection1.Connected := True.

We thought the problem was that ZConnection1 wasn't being freed. So we've set that to happen. No change in the behaviour. In addition, once that happens, all future attempts to get a TZConnection to connect trigger an AV.

We've checked the version of libmysql.dll. It is for V5.5 which is the version of MySQL we're using.

I doubt this will help - but the av is "Access violation at address 0040c4a7 in module PLSRetail.exe. Read of address 0A78D000."

Any help would be appreciated. Or, to be quite honest, I'm seriously thinking of ditching Zeoslib as not being up to the task. Not a step I'll take lightly as we need to modify over 400 forms.

Thanks.

Alan

Re: Access violation when reopening form Zeoslib 7.1.4

Posted: 27.11.2017, 08:44
by Fr0sT
7.4.1 is quite outdated, you could try 7.2 or 7.3...
If an issue persists, set "Stop on Delphi exceptions" option and track where the AV happens

Re: Access violation when reopening form Zeoslib 7.1.4

Posted: 27.11.2017, 12:40
by marsupilami
Hello Alancj,

if the problems persist even though you tried your luck with Zeos 7.2, there are some things you could do:
- generate a stack trace with MadExcept or the Exception handling window in the Jedi Code Library.
- create a small sample program that triggers the bug. We could use that program to find a fix for the bug.
- The message "Access violation at address 0040c4a7 in module PLSRetail.exe. Read of address 0A78D000." isn't helpful at all since we don't get any other information from it besides the information that some code in your application triggers an AV.

With best regards,

Jan

Re: Access violation when reopening form Zeoslib 7.1.4

Posted: 27.11.2017, 23:22
by Alancj
The AV doesn't seem to occur within the Zeoslib components. It seems to trigger in System. Within an area of inline ASM code within the System unit. Unfortunately I'm not able to track it to exactly where - just yet.

Alan

Re: Access violation when reopening form Zeoslib 7.1.4

Posted: 28.11.2017, 08:17
by Fr0sT
Try to use FastMM4 with FullDebugMode and ReportMemoryLeaksOnShutdown := True; it looks like memory corruption because of interface disposed too early