GNOME Bugzilla – Bug 654066
ClutterTimeline new-frame signal not working correctly on some platforms
Last modified: 2011-07-18 14:27:19 UTC
When emitting a new-frame signal, priv->elapsed_time is passed as a parameter. This is a gint64. The closure marshal uses an INT. On some platforms, this is not received correctly by signal handlers (they receive 0). One solution is to cast priv->elapsed_time to a gint when emitting the signal. Another would be to define the signal using an INT64 as the elapsed parameter.
converting the signal definition to use int64 would probably be the best option. if you could cook up a patch it would be awesome.
Created attachment 191418 [details] [review] Patch to use gint64 for msecs in ClutterTimeline's new-frame signal
The patch is attached, but note that if users of this code don't update their signal handlers to take a gint64, bad things will happen. This won't be caught by the compiler - it will be stack corruption at runtime.
in the end, I went for the "cast the int64 to an int before emitting the signal" approach because you were right, and it was the cleanest solution. thanks a lot for working on this!