Re: Windows GTK hang 'not responding'




	Hi,

Thanks to all for the helpful hints, even with my vague descriptions. It turns out that it was a problem under Windows in getting the current time. Using timeGetTime() from the multimedia timers I wanted to convert it to microseconds in keeping with the value from gettimeofday that's used in the rest of my program. Anyway, when multiplying that value by 1000 and assigning it to a larger data type of 'long long' it multiplied it within a single 32bit integer and overflowed it.

/* doesn't work */
long long usecs;
long msecs;
msecs = timeGetTime();
usecs = msecs * 1000;
/* ----- */

Changing to this though, works

/* works */
long long usecs;
long long msecs;
msecs = timeGetTime();
usecs = msecs * 1000;
/* ------- */

The resulting negative difference from the 'time now' to the previous one was a bug in my program that didn't count on that happening (too used to programming under Linux I guess) and it failed to call the GTK update functions at the required intervals. D'oh. So, that was my bug (or bugs). I thought I'd post that here for the sake of completeness.

	Thanks,

	Derek

Tor Lillqvist wrote:
Derek Piper writes:
 > Any help or hints would be very appreciated.

It would help a lot if you could distill the problematic program down
to a bare minimum (but still complete and compileable) sample program
that still exhibits the problem, open a bug report on
bugzilla.gnome.org, and attach the sample program (plain source code)
to the bug.

--tml



--
Derek Piper - dcpiper indiana edu - (812) 856 0111
IRI 323, School of Informatics
Indiana University, Bloomington, Indiana



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