View Issue Details

IDProjectCategoryView StatusLast Update
0000401JEDI Code LibraryJclSysInfopublic2005-02-16 01:34
ReporteranonymousAssigned ToRobert Rossmair 
PrioritynormalSeveritymajorReproducibilitysometimes
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000401: ERangeError in GetCPUSpeed
DescriptionOf course, this only happens when range checking is enabled. The JclSysInfo unit is not explicitly used by my project, but implicitly used through a chain of Jcl units.

My project is a Delphi DLL loaded by a VC++ host application.

The exception never happens on my machine (Dual 1.5GHz P4 Xeon), but happens all the time on my coworkers machine (Dual 2.0GHz P4 Xeon).

The biggest part of the problem is that the exception occurs during unit initialization, where exception handling mechanisms are sparse if present at all. Thus, the exception propagates back to the host application. Perhaps this is a symptom of a larger issue--exception handling needs to be improved in all initialization sections of Jcl units.
Additional InformationHere is a stack trace as generated from the TJclStackInfoList using TD32 debug info. The JCL version in use is 1.21. I checked, and version 1.22 doesn't change the GetCPUSpeed function in any way.

The line that is flagged as raising the exception is:
      Freq := Round(Cycles / Ticks);

ERangeError: Range check error[01730221]
PeekPeerMapExceptTrace.ExceptNotify (Line 21, "PeekPeerMapExceptTrace.pas")[0172BD6B]
JclHookExcept.TNotifierItem.DoNotify (Line 197,
"JclHookExcept.pas")[0172BE31] JclHookExcept.DoExceptNotify (Line 225,
"JclHookExcept.pas")[0172BECC] JclHookExcept.HookedRaiseException (Line
249, "JclHookExcept.pas")[01726BC4] JclSysInfo.GetCPUSpeed (Line 2293,
"JclSysInfo.pas")[016F283E] System.ErrorAt (Line 2944,
"system.pas")[017268CC] JclSysInfo.GetCpuInfo (Line 2195,
"JclSysInfo.pas")[016F41B3] System.@StartLib (Line 10710,
"system.pas")First-chance exception at 0x77e73887 in Peek.exe: 0x0EEDFADE:
0xeedfade.
TagsNo tags attached.
Fixed in GIT commit
Fixed in SVN revision
IDE version

Relationships

has duplicate 0000801 closedRobert Rossmair JEDI Code Library JclSysInfo.GetCPUSpeed - division by zero 
has duplicate 0000981 closedRobert Rossmair JEDI Code Library Division by zero in JclSysInfo 
has duplicate 0001007 closedRobert Rossmair JEDI Code Library GetCPUSpeed() crashes on Hyperthreading CPUs 
has duplicate 0001020 closedRobert Rossmair JEDI VCL GetCPUInfo results in Floating Point Division by Zero (Runtime Error 216 ) 

Activities

anonymous

2002-10-31 10:14

viewer   ~0000797

Last edited: 2002-10-31 11:59

This note is from the original bug submitter.

Correction: my coworkers machine is a Dual 2.2GHz P4 Xeon.

The GetCpuInfo procedure is called from JclGraphUtils.SetupFunctions, which is invoked from its initialization section.

edited on: 10-31 11:59

2003-06-28 12:43

 

JclSysInfo.zip (20,286 bytes)

Robert Rossmair

2003-06-28 12:45

developer   ~0002270

Fixed as of 2003-05-17, see attached file.

Issue History

Date Modified Username Field Change
2005-02-16 01:34 Robert Rossmair Status resolved => closed