View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002378 | JEDI VCL | 00 JVCL Components | public | 2004-12-13 15:14 | 2004-12-14 01:48 |
Reporter | dbarros | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 BETA 2 | ||||
Target Version | Fixed in Version | 3.00 RC 1 | |||
Summary | 0002378: TJvVersionInfo access violation reading properties when file does not exist. | ||||
Description | When creating a TJvVersionInfo, and passing it a filename of a file that does not exists, access violations occur when subsequently trying to read some properties. | ||||
Additional Information | Here is an example: v := TJvVersionInfo.Create(Filename); _comments := v.Comments; _companyName := v.CompanyName; _versionMajor := (HiWord(v.FileLongVersion.MS) shl 16) or (LoWord(v.FileLongVersion.MS)); When the file "Filename" does not exist, the component sets itself to an "Invalid" state. Most properties, like Comments and CompanyName, check its state and return a default even the Filename does not exist. In the case of the FileLongVersion property, it does not do the check and contains code which is set to nil and hence causes access violations. Here is a snippet from JvVersionInfo.pas which shows this: function TJvVersionInfo.GetProductLongVersion: TLongVersion; begin Result.MS := FixedFileInfo^.dwProductVersionMS; Result.LS := FixedFileInfo^.dwProductVersionLS; end; | ||||
Tags | No tags attached. | ||||
2004-12-13 15:50
|
JvVersionInfo.pas (12,241 bytes) |
|
I have uploaded a fix in the attached file. |
|
Fixed in CVS |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-12-13 15:14 | dbarros | New Issue | |
2004-12-13 15:50 | dbarros | File Added: JvVersionInfo.pas | |
2004-12-13 15:51 | dbarros | Note Added: 0005878 | |
2004-12-14 01:48 |
|
Status | new => resolved |
2004-12-14 01:48 |
|
Resolution | open => fixed |
2004-12-14 01:48 |
|
Assigned To | => user72 |
2004-12-14 01:48 |
|
Note Added: 0005881 | |
2004-12-14 01:48 |
|
Assigned To | user72 => |