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

dist-upgrades sometimes find bugs



Hi,

I never thought I'd see this, but my recent Sid dist-upgrade found a bug in my code.

It draws CPU temp graphs:
http://www.geocities.com/hugovanwoerkom/modtempdisp.12032006.jpeg

The generation of the X-axis tickmark labels is in a while loop that is never satisfied. Why did it ever run?

...
//      Put times into QByteArray
// while ( !d_time.toString().contains(end_time.toString()) ) { <=== Why did this ever work? [1]
    while ( !d_time.toString().contains("23:55:00") ) {
        d_time_str = d_time2.toString();
sprintf(lines->data()+bumper,"%s",d_time_str.data());//<== [1] segfault
        bumper=bumper+dat_col_size+1;
d_time = d_time.addSecs(DEFAULT_IVAL_SECS); d_time2 = d_time2.addSecs(12*DEFAULT_IVAL_SECS);
    }
    d_time_str = d_time2.toString();
    sprintf(lines->data()+bumper,"%s",d_time_str.data());
...

Kept a backup of the before the upgrade and I'll try that.

I guess I'll never know which upgrade did it.

Hugo



Reply to: