Issue with MGCB on Linux - Error when clicking with the right button of the mouse on the project

Hey guys,

I started learning Monogame recently and I have been running into a couple of really weird bugs when using the Content Pipeline. When I try to add content/folders clicking with the right button of the mouse, I get the following error:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object at Gtk.Menu.PopupAtPointer (Gdk.Event trigger_event) [0x00014] in <f775ff7b2e4a42d992aca2c382879b7c>:0 at Gtk.Menu.Popup () [0x00000] in <f775ff7b2e4a42d992aca2c382879b7c>:0 at Eto.GtkSharp.Forms.Controls.GridHandler2+GridConnector[TWidget,TCallback].HandleButtonPress (System.Object o, Gtk.ButtonPressEventArgs args) [0x000f7] in <3bbc1daff97142648cd48237c49932b3>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0003b] in <7b0d87324cab49bf96eac679025e77d1>:0
— End of inner exception stack trace —
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00051] in <7b0d87324cab49bf96eac679025e77d1>:0
at System.Delegate.DynamicInvokeImpl (System.Object[] args) <0x7f4dda141ec0 + 0x00231> in <7b0d87324cab49bf96eac679025e77d1>:0
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) <0x7f4dda1460e0 + 0x00066> in <7b0d87324cab49bf96eac679025e77d1>:0
at System.Delegate.DynamicInvoke (System.Object[] args) <0x7f4dda141dd0 + 0x00009> in <7b0d87324cab49bf96eac679025e77d1>:0
at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00034] in <902eeaa2a1d147909254a60264666525>:0
at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00009] in <902eeaa2a1d147909254a60264666525>:0
at GLib.SignalClosure.MarshalCallback (System.IntPtr raw_closure, System.IntPtr return_val, System.UInt32 n_param_vals, System.IntPtr param_values, System.IntPtr invocation_hint, System.IntPtr marshal_data) [0x00136] in <902eeaa2a1d147909254a60264666525>:0
`

I tried fixing it reinstalling Mono, Monogame, gtk-sharp3 but none of them worked. I think is probably something wrong with my Linux (Ubuntu 16.04) but I haven’t been able to pinpoint the issue. I am using mono 5.18.0.240

Did someone experience something similar?

Additionally, I get two different windows when I run the Content Pipeline depending if I use sudo to start it.

Without sudo

With sudo

The different window-styles using ‘sudo’ is normal. Because the root user has a different theme for the window-manager than your user.

My guess is there’s something wrong with GTK. I think the pipelinetool uses gtk2 and you are probably using gtk3?