Occasional errors with 32-bit Delphi 7 application on Windows 7 64-bit
Hi,
I have a 32-bit Delphi 7 application which was deployed on some machines with Windows 7 64-bit. The application occasionally displays errors such as:
"Error reading ppDBText37.Border.Color: Invalid property value"
or
"Error reading Label24.Font.Ch: Property Ch does not exist" (here the name "Charset" was apparently truncated to "Ch")
I checked how those properties are declared on the form where the errors occurred, and all seems ok:
- First form (where "Error reading ppDBText37.Border.Color: Invalid property value" occurs):
Border.BorderPositions = []
*Border.Color = clBlack*
Border.Style = psSolid
- Second form (where "Error reading Label24.Font.Ch: Property Ch does not exist" occurs):
Color = clBtnFace
*Font.Charset = EASTEUROPE_CHARSET*
Font.Color = clNavy
If the form containing those components is closed and opened again (or if the application is restarted), the problem does not reproduce. Also, on 32-bit Windows (e.g. XP) the problem does not show at all. Does anyone have any idea what could be the cause of those errors? Maybe any suggestion on what to check to find out the root cause of the problem?
Thanks in advance
0 jure3/2/2013 6:54:52 PM
jure wrote:
> I have a 32-bit Delphi 7 application which was deployed on some
> machines with Windows 7 64-bit. The application occasionally displays
> errors such as:
>
> "Error reading ppDBText37.Border.Color: Invalid property value"
>
> or
>
> "Error reading Label24.Font.Ch: Property Ch does not exist" (here the
> name "Charset" was apparently truncated to "Ch")
Those errors are related to DFM streaming. Changes are, the DFM resource
inside of your execuable file has been corrupted.
--
Remy Lebeau (TeamB)
0 Remy3/3/2013 7:32:59 PM
Hi Remy,
thanks for the response.
If the DFM resource inside the executable file is corrupted, I guess the error would show up every time this particular resource is accessed, but if the application is restarted, it doesn't show anymore (or at least, not every time). The other thing is that on 32-bit Windows, those errors don't happen although the same executable is copied to those machines. (I hope I didn't misunderstood what you meant.)
However, your comment about the corrupted resource made me think of another possible cause. Do you think it's possible that a 3rd part application (e.g. antivirus software or something similar) somehow "corrupts" the loaded executable image? That would be consistent with the fact that the problem doesn't always reproduce. If so, do you have any suggestion on what to check (e.g. the application stack trace at the moment the exception happens)?
Thanks and regards
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> jure wrote:
>
> > I have a 32-bit Delphi 7 application which was deployed on some
> > machines with Windows 7 64-bit. The application occasionally displays
> > errors such as:
> >
> > "Error reading ppDBText37.Border.Color: Invalid property value"
> >
> > or
> >
> > "Error reading Label24.Font.Ch: Property Ch does not exist" (here the
> > name "Charset" was apparently truncated to "Ch")
>
> Those errors are related to DFM streaming. Changes are, the DFM resource
> inside of your execuable file has been corrupted.
>
> --
> Remy Lebeau (TeamB)
0 jure3/3/2013 9:42:30 PM
jure wrote:
> However, your comment about the corrupted resource made me think
> of another possible cause. Do you think it's possible that a 3rd part
> application (e.g. antivirus software or something similar) somehow
> "corrupts" the loaded executable image?
Possibly.
--
Remy Lebeau (TeamB)