[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: itl library question



ahmed el-helw writes:
 > salam 3alaikum -
 > hope insha'Allah everyone is doing well.
 > 
 > as you may have seen, i was writing a small front end tray app in gtk2
 > for prayer times.  i am almost done with the development, but there is
 > one odd problem that has me stumped... if i redo a calculation with the
 > exact same inputs, i get different results for shuruq and maghrib.
 > 
 > i've managed to isolate this problem to a simple test case main which
 > i've attached -- oddly enough, when thamer compiled and ran it, he got
 > the correct results, but i get different results between the first and
 > second run.  [the test main i've attached calls calculate twice -- i get
 > different results from the second call than the first, but thamer gets
 > the same results between the two].
 
Good news :-). I'm now able to reproduce this problem by using an
older gcc version (3.2 vs. 3.3) and no optimization flag enabled. The
bug is related to how values are being stored and updated into the
global variable "Astro astro" after consecutive calls. Just to
demonstrate the problem, here is the bad results of the attached
testcase:

5:25
6:39
12:57
16:30
19:15
20:30
---
5:25
20:54
12:57
16:30
6:35
20:30
---

This problem is now fixed on CVS. It would be great if you can confirm
this by downloading the updated files available right here:

http://cvs.arabeyes.org/viewcvs/projects/itl/libs/prayertime/src/

Although we should probably not make a habit of it, but if this bug is
confirmed as fixed, I think it is a major enough problem (for GUI
apps) to deserve an 0.6.2 release.

Regards,
Thamer Mahmoud