Re: GDBus usage in multiple processes each hosting a GDbus server for the other process

2015-03-10 Thread Frederik Lotter
Hi

On 10 March 2015 at 10:11, Frederik Lotter 
frederik.lot...@mixtelematics.com wrote:

 Hi,

 We are using DBUS extensively as low bandwidth communication for some APIs
 shared between standalone processes. I was completely new to GDBus (and
 GLIB) when I started implementing this, and now I have made a discovery
 which I would like to check with some experts.

 (I use the gdbus-codegen utility for generating the functions I use)

 It turned out that once one of the processes [re]start,
 the g_bus_watch_name_on_connection() will fire from both processes, each
 discovering the other.

 The problem was that I have implemented all my GDBus calls as synchronous
 calls, and at this point of discovery the two processes entered a live lock
 until one of the calls time out of 25 seconds.

 I have now replaced the call inside the busNameAppeared callback to be
 all Asynchronous. This fixes the problem.

 However, the rest of the client side calls are all synchronous calls
 (blocking) from both sides (both processes).

 Is this a potential problem?

 If both sides are making a sync call to the server at the same time, will
 the server side processing happen in a different thread, or will the same
 live lock issue appear.

 I am not sure how many threads are spawned or if *everything* gdbus runs
 on the main loop thread.

 Any help will be greatly appreciated.

 Frederik Lotter

 Mix Telemtatics, South Africa




I think I now understand my problem better. I think my mistake was stupid,
but due to a lack of experience using GLIB.

The problem seems to be that I should not make synchronous dbus method
calls from inside a g_signal_connect() callback. If the timing works out
that both sides (client calls) do this at the same time to each other's
server, you end up with a deadlock, which only resolves after the Dbus 25
timeout of the first call.

However, it looks like it is still safe to make synchronous calls from
other threads in each process.

Kind Regards,
Fred
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Gtk3 MacOS (OSX) context menu issues

2015-03-10 Thread Jim Charlton
Just to keep the ball rolling on this...  I tested the gtk3-demo code on 
a jhbuild of gtk+-3.14.5 on a MAC Yosemite 10.10 (virtual machine).  I 
get the same result as Konstantin.  I am compiling with XQuartz.


Funny enough, I had a similar problem with an earlier version of gtk-3 
(3.10.7).  In that case, GtkButtons that were in a window that also 
contained gtkEntry boxes would not respond to cursor unless the cursor 
was moved out ot the window first... or one of the entry boxes was first 
clicked.  But the binary of the compiled code ran fine when it was 
installed (with the gtk libraries on another machine.  Go figure...??  
Certainly something strange going on.


jim...   Jim Charlton




On 15-03-05 09:17 AM, Konstantin Dmitriev wrote:

2015-03-03 15:01 GMT+06:00 Vest . vest...@gmail.com:

Hello Konstantin,

I apologize that I probably cannot help you, but I am curious. Do you have
this issue, if you run a simple demo, where GtkMenu is used?
Because it seems that when you move the mouse outside of the menu's
boundaries, something inside the widget is cleared and the menu receives
mouse events again.

Kind regards,
Vest

Hello, Vest!

Thank you for responding!
I have tested the gtk3-demo and (surprise!) the issue seems to be
100%-reproducible there. Here I have recorded a video -
http://youtu.be/X_xAHhQN_lY
Have tested this with GTK 3.14.8 and 3.14.9. Also tested on 32bit and
64bit. Issue persists.

I have tried to build with X11 backend and issue doesn't happen. So,
it seems to be Quartz-only.

I can provide a bash script that I use to unwrap all environment
(creates MacPorts installation from scratch in the custom location and
builds our application - Synfig Studio).

Any help/advice is appreciated.

Best Regards,
Konstantin.


On Sat, Feb 28, 2015 at 12:59 PM, Konstantin Dmitriev
ksee.zelga...@gmail.com wrote:

Hello!

My name is Konstantin Dmitriev, I am a maintainer of Synfig Studio
open-source animation software.

Recently we have ported our software from Gtk2 to Gtk3. Unfortunately,
after that we have encountered issues with context menus on OSX - the
context menus are become insensitive sometimes. This happens randomly,
but quite often.

I have recorded a video to illustrate the problem -
http://www.youtube.com/watch?v=Cscz45WeFEs

I am stuck with this issue and don't know how to solve it. Any help,
hints, suggestions are highly appreciated.

Some information about the build environment:
Gtk version 3.14.8, everything built through MacPorts environment.
Gtk backend type: XQuartz.

I will be happy to provide any additional information.
Thank you!

Konstantin.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GDBus usage in multiple processes each hosting a GDbus server for the other process

2015-03-10 Thread Frederik Lotter
Hi,

We are using DBUS extensively as low bandwidth communication for some APIs
shared between standalone processes. I was completely new to GDBus (and
GLIB) when I started implementing this, and now I have made a discovery
which I would like to check with some experts.

(I use the gdbus-codegen utility for generating the functions I use)

It turned out that once one of the processes [re]start,
the g_bus_watch_name_on_connection() will fire from both processes, each
discovering the other.

The problem was that I have implemented all my GDBus calls as synchronous
calls, and at this point of discovery the two processes entered a live lock
until one of the calls time out of 25 seconds.

I have now replaced the call inside the busNameAppeared callback to be
all Asynchronous. This fixes the problem.

However, the rest of the client side calls are all synchronous calls
(blocking) from both sides (both processes).

Is this a potential problem?

If both sides are making a sync call to the server at the same time, will
the server side processing happen in a different thread, or will the same
live lock issue appear.

I am not sure how many threads are spawned or if *everything* gdbus runs on
the main loop thread.

Any help will be greatly appreciated.

Frederik Lotter

Mix Telemtatics, South Africa
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list