Access violation when reopening form Zeoslib 7.1.4

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
Alancj
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 10.01.2017, 21:51

Access violation when reopening form Zeoslib 7.1.4

Post 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
Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 280
Joined: 08.05.2014, 12:08

Re: Access violation when reopening form Zeoslib 7.1.4

Post 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
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Access violation when reopening form Zeoslib 7.1.4

Post 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
Alancj
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 10.01.2017, 21:51

Re: Access violation when reopening form Zeoslib 7.1.4

Post 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
Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 280
Joined: 08.05.2014, 12:08

Re: Access violation when reopening form Zeoslib 7.1.4

Post by Fr0sT »

Try to use FastMM4 with FullDebugMode and ReportMemoryLeaksOnShutdown := True; it looks like memory corruption because of interface disposed too early
Post Reply