问题
I have a mkbundled mono app with mono embedded in it.i have created a standalone package from it using platypus.I use the following to load the Mac Theme(Xamarin)
Gtk.Rc.Parse ("Default/gtkrc");
The theme is the Xamarin theme
from share/theme/xamarin
The thing is that the application does not launch consitantly when using this theme.It launches randomly.Also im using gtk-button-images = 1
in theme file to show the buttons.The app works fine with other themes.
What is the problem here?please help.
UPDATE:
I have tried launching the application manually from console by putting the following ./script.sh
It launches the program sometimes. Otherwise the console stays there with no output.I have the program window icon on the dock during this ,When i close it i can see the following output on the console
./script.sh: line 3: 830 Terminated: 15 ./myapp
The contents in the script are as follows
VAR=`pwd`
export DYLD_FALLBACK_LIBRARY_PATH="$VAR/lib:/usr/lib"
./myapp
On Random successful execution of the program and only upon closing the program.I get the following on the console
Gtk-WARNING **: Can't set a parent on a toplevel widget
Unhandled Exception:
System.MissingMethodException: No constructor found for MonoMac.Foundation.NSObject+MonoMac_Disposer::.ctor(System.IntPtr)
at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0
at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0
at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <filename unknown>:0
at MonoMac.ObjCRuntime.Runtime.GetNSObject (IntPtr ptr) [0x00000] in <filename unknown>:0
at MonoMac.ObjCRuntime.NSObjectMarshaler`1[MonoMac.Foundation.NSObject].MarshalNativeToManaged (IntPtr handle) [0x00000] in <filename unknown>:0
at (wrapper native-to-managed) object:[MonoMac.Foundation.NSObject:IntPtr NativeRetain()] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector)
at (wrapper managed-to-native) MonoMac.ObjCRuntime.Messaging:void_objc_msgSend_intptr_intptr_bool (intptr,intptr,intptr,intptr,bool)
at MonoMac.Foundation.NSObject.Dispose (Boolean disposing) [0x00000] in <filename unknown>:0
at MonoMac.Foundation.NSObject.Finalize () [0x00000] in <filename unknown>:0
Im stuck here.Please help me.
来源:https://stackoverflow.com/questions/33760329/gtk-application-non-consistant-execution-using-xamarin-theme