On Fri, Sep 30, 2022 at 09:41:02AM +0100, Richard W.M. Jones wrote:
On Fri, Sep 30, 2022 at 08:55:02AM +0100, Daniel P. Berrangé wrote:
> On Thu, Sep 29, 2022 at 07:12:15PM +0100, Richard W.M. Jones wrote:
> > On Thu, Sep 29, 2022 at 04:47:34PM +0200, Laszlo Ersek wrote:
> > >
http://lacos.interhost.hu/livecd-p2v-202209291608-gitc213ae00a337.iso
> > >
> > > (built at c213ae00a337)
> > >
> > > sha256: f3a149aeab0179213d74bb1eac30d5d6f807d4c9cf3a548667903d5434d5699a
> >
> > No spinner!
>
> BTW, is there any possibility your code is invoking GTK3 APIs
> from a thread != main GTK event loop thread ? If so, that is
> a sure way to get non-deterministic wierd behaviour with GTK.
Maybe? This is the code which is run when the "Test Connection"
button is clicked:
https://github.com/libguestfs/virt-p2v/blob/c213ae00a337cb04e63cbfe4fb4b3...
It runs a thread (to test the connection using ssh) and that thread
creates an idle {job? event?} in the new thread.
However I documented it as:
* Idle task called from C<test_connection_thread> (but run on the
* main thread) to start the spinner in the connection dialog.
Whether that is true or not and how I deduced that, I don't recall.
The test_connection_thread code is using g_idle_add to run all
GTK APIs, which results in it running in the main event loop
thread. That is the correct way to deal with GTK from multiple
threads.
As an idea to debug it more, try using the GTK inspector
$ GTK_DEBUG=interactive <app binary>
this will popup a second window, which lets you browse the
widget hierarchy, view properties, etc. This might let you
see something that's set in an incorrect way.
With regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|