Hello,
after upgrading to nextcomps5_1013, my application throws AccessViolations in a form with a virtual column in a NextDBGrid.
It took me some hours to track it down:
- NextDBGrid keeps a collection of columns in the type TNxDBColumns, which returns all columns as TNxDBCustomColumn
- A virtual column is not a subclass of TNxDBCustomColumn but is anyway placed in this collection
- In TNextDBGrid I identified a dozen of places with if conditions to check if "column is TNxDBCustomColumn"
- These checks don't seem to work since in TNxDBColumns all objects are casted to TNxDBCustomColumn, so Delphi can't tell the real type any more.
- Thus, in TNextDBGrid.SetFieldObjects the virtual column is casted to TNxDBCustomColumn and then the Field property is set. I don't have to tell you that this results in accesses to uninitialized memory.
This occurs in Delphi 2007 but I assume other versions are affected as well. I would appreciate if you could look into this issue because virtual columns are a really useful feature.
Thanks,
Michael
By the way, my virus scanner (Avast) detected a trojan when accessing your forum this afternoon.
VirtualColumn seems broken
Started by tarnschaf, Oct 20 2013 12:06 AM
3 replies to this topic
#1
Posted 20 October 2013 - 12:06 AM
#2
Posted 21 October 2013 - 07:07 PM
Hm. I will need to check it again.
Can you please tell me on which file your scanner shows a error? Most probably some attachment.
Can you please tell me on which file your scanner shows a error? Most probably some attachment.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#3
Posted 21 October 2013 - 07:58 PM
The alert was on the frontpage, however it was gone when I tried in the evening. I will notify you as soon as it comes up again.
Was "I will need to check it again." related to the actual problem with the virtual column? Only to make sure you didn't overread this
Was "I will need to check it again." related to the actual problem with the virtual column? Only to make sure you didn't overread this
#4
Posted 21 October 2013 - 08:40 PM
Thank you.
Yes.
Was "I will need to check it again." related to the actual problem with the virtual column? Only to make sure you didn't overread this
Yes.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











