View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001167 | JEDI Code Library | JclSysInfo | public | 2003-10-10 02:01 | 2005-02-16 01:34 |
| Reporter | anonymous | Assigned To | Robert Rossmair | ||
| Priority | normal | Severity | crash | Reproducibility | sometimes |
| Status | closed | Resolution | fixed | ||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Summary | 0001167: EZeroDivide is raised in GetCPUSpeed | ||||
| Description | console app, using jvFileUtils, fails to init 1 time of 5. The problem is EZeroDevide exception. | ||||
| Additional Information | Exception is raised in GetCPUSpeed() from JclSysInfo.pas, called from GetCpuInfo(), called from SetupFunctions() called from initialization of JclGraphUtils, used by JclGraphics, used by jvFunctions used by jvFileUtils. I was unable to produce the same error calling GetCPUSpeed directly from GUI App on the same machine, but console app crashes can be reproduced. | ||||
| Tags | No tags attached. | ||||
| Fixed in GIT commit | |||||
| Fixed in SVN revision | |||||
| IDE version | |||||
|
|
I've installed the JCL 1.22 on a 3.2GHz Pentium 4 Laptop and find that the GetCPUSpeed function in jclSysInfo frequently (not always) raises a Divide By Zero exception. This happens when 'Ticks' evaluates to zero and causes the exception on line 2303 when the division is performed. Is this a speed or hyperthreading problem? I think the severity class should be higher than normal. This could become a huge problem as Users start using faster PCs. I've temporarily overcome the problem by forcing 'Ticks' to 1 when it evaluates to zero. Regards Peter Gore |
|
|
Same problem here. P4 3ghz with HT. I was just looking into bug 0001023 when this one was posted. This appears to be the root problem of bug 0001023. Here's what happens to me: Ticks := T1.LowPart - T0.LowPart; // (1023660100 - 1023658960) //Ticks becomes 1140 Ticks := Ticks * 100000; //Ticks becomes 114000000 Ticks := Round(Ticks / (CountFreq.LowPart / 10)); //CountFreq.Lowpart = 2992760000 //Ticks becomes Round(0.38091928520830270385864553121533) = 0 TotalTicks := TotalTicks + Ticks; TotalCycles := TotalCycles + Cycles; //*******Now, divide by 0: Freq := Round(Cycles / Ticks); Total := Freq + Freq2 + Freq3; The old GetCPUInfo noted in bug 0001023 appears to work. edited on: 12-23 13:03 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2005-02-16 01:34 | Robert Rossmair | Status | resolved => closed |