Code generation fault

2006-08-17 06:19:48 PM
I encountered a strange bug, which took some time to track down, but
the situation is like this:
I use the editors library from Developer Express as a base for my own
The devexpress library is compiled for Delphi with C++ support files
I create a simple TMyComboBox by just inheriting TcxCustomComboBox, and
writing a Register function (no other methods, attributes, properties).
When using this combobox (both design and runtime) I get an AV, always
produced by accessing the ItemIndex.
It turned out that this AV occured because a member pointer in a base
class had been set to zero by the initialization of an AnsiString!?
Checking this further revealed that some base classes had inline
virtual ctors, when the C++ compiler created the implementation of
theese it didn't know/use the correct size for the object, so its
reference to member attributes was of by 7 bytes.
I have checked the alignment options for both the delphi projectfile
for devexpress, and my c++ projekctfile for the combobox, and both are
Now I am lost.
Does anyone have an idea how to create a testcase for this to supply to
Borland, or any ideas about what to try out next ?
Gratefull for any input.