Page 1 of 1

Zeoslib 7.2.10 AV in GetBooksmark

Posted: 27.07.2021, 18:26
by StTu
after updating to 7.2.10 from like 7.2.4 (viewtopic.php?f=40&t=142634) I'm facing new issue I'm getting AV inside GetBookmark

EAccessViolation
Access violation at address 0040A842 in module 'my.exe'. Read of address 00000018

Image

delphi 10.3, win64, win32 app, fb 3.0.7, after reverting back to ~ 7.2.4 issue is gone, any idea what can be wrong?
stack is from grid connected to datasource with TZQuery

Re: Zeoslib 7.2.10 AV in GetBooksmark

Posted: 27.07.2021, 21:24
by aehimself
Smells like a nullpointer / invalid pointer AV. I'd put a breakpoint on your .GetBookMark call and see where things go south, what is returning this TRecordBuffer record.

I have a slight memory of fixing something like this in v8... @Jan, do you think the commits

a59e1689324f9ce30b3312f3372cbba741d801df
aehimself: ZAbstractRODataSet GetBookmarkData and InternalGotoBookmark should handle "Data" as the same type
marsupilami79 on 5/28/2020, 9:17:55 PM

and

00365e0987f37c6d99e7da4da7b03bd136fa56b7
aehimself: ZAbstractRODataSet GetBookmarkData and InternalGotoBookmark should handle "Data" as the same type (PInteger instead of PNativeInt)
marsupilami79 on 5/29/2020, 1:07:44 PM

have to be merged back to v7? Unfortunately I don't use this version anymore to be able to test.

Re: Zeoslib 7.2.10 AV in GetBooksmark

Posted: 28.07.2021, 09:49
by marsupilami
@StTu: Could you please try to create some sample code and maybe a sample database script? This really would help with debugging.

From the screenshot I would say that GetBookmarkFlag gets called with a strange valu in Buffer or even a null value for Buffer.

@aehimself: Maybe - I will check if these patches can be applied. But I highly doubt it because I think, Egonhugeist changed a lot of things there...

Re: Zeoslib 7.2.10 AV in GetBooksmark

Posted: 29.07.2021, 08:19
by marsupilami
aehimself wrote: 27.07.2021, 21:24 @Jan, do you think the commits

a59e1689324f9ce30b3312f3372cbba741d801df
aehimself: ZAbstractRODataSet GetBookmarkData and InternalGotoBookmark should handle "Data" as the same type
marsupilami79 on 5/28/2020, 9:17:55 PM

and

00365e0987f37c6d99e7da4da7b03bd136fa56b7
aehimself: ZAbstractRODataSet GetBookmarkData and InternalGotoBookmark should handle "Data" as the same type (PInteger instead of PNativeInt)
marsupilami79 on 5/29/2020, 1:07:44 PM

have to be merged back to v7?
Unfortunately no. It seems like your patches reverted some changes that were done between 7.2 and 8.0. All places in 7.2 handle Bookmarpointers as PInteger....