Glade can't find gui.glade - c#

I'm using in my code:
Glade.XML gxml = new Glade.XML (null, "gui.glade", "PublicanCreators", null);
The gui.glade file is placed in the same directory as the Program.cs (which runs the code).
The compiling process has suceeded. But while running the exe i'm getting:
Stacktrace:
at <0xffffffff> at (wrapper managed-to-native)
Glade.XML.gtksharp_glade_xml_get_filename (intptr) at Glade.XML.get_Filename () at
(wrapper runtime-invoke) .runtime_invoke_object__this__
(object,intptr,intptr,intptr) at
<0xffffffff> at Glade.XML..ctor
(System.Reflection.Assembly,string,string,string) at PublicanCreators.GladeApp..ctor (string[]) [0x00018] in
/home/sascha/RiderProjects/PublicanCreators/PublicanCreators/Program.cs:40
at PublicanCreators.GladeApp.Main (string[]) [0x00002] in
/home/sascha/RiderProjects/PublicanCreators/PublicanCreators/Program.cs:34
at (wrapper runtime-invoke) .runtime_invoke_void_object
(object,intptr,intptr,intptr)
What can i do?

Looks like you need gui.glade in the bin folder, not the source folder. Make sure it is included in your project file and is copied on compile.

It looks like the solution is to change the code to:
Glade.XML gxml = new Glade.XML ("gui.glade", "PublicanCreators", null);
There it finds the file.

Related

Unity Failed running python.exe when building webgl

I'm trying to build a unity3d project, however when I do I get an error and cannot figure out where the error actually is, it started around the same time I introduced the newsoft and restsharp dll's, though the error remained after I removed those two packages.
The entire message looks as following:
Exception: Failed building WebGL Player.
UnityEditor.WebGL.ProgramUtils.StartProgramChecked (System.Diagnostics.ProcessStartInfo p) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/ProgramUtils.cs:48)
UnityEditor.WebGL.WebGlBuildPostprocessor.EmscriptenLink (UnityEditor.Modules.BuildPostProcessArgs args, System.Boolean wasmBuild, System.String sourceFiles, System.String sourceFilesHash) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:425)
UnityEditor.WebGL.WebGlBuildPostprocessor.LinkBuild (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:474)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:937)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at C:/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:27)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:287)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Failed running "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe" "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc" #"A:\code\Workspaces\unity3d_project\verifi3d\Assets\..\Temp\emcc_arguments.resp"
stdout:
stderr:WARNING:root:--separate-asm works best when compiling to HTML. Otherwise, you must yourself load the '.asm.js' file that is emitted separately, and must do so before loading the main '.js' file. [-Wseparate-asm]warning: unexpected number of arguments 2 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 2 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 5 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 2 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 3 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0error: unresolved symbol: SendRoomDataJSONAborting compilation due to previous errors | undefinedTraceback (most recent call last): File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc", line 10, in <module> python_selector.run(__file__, profile=True) File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\python_selector.py", line 43, in run sys.exit(run_by_import(filename, main) if on_allowed_version() else run_by_subprocess(filename)) File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\python_selector.py", line 13, in run_by_import return getattr(importlib.import_module(os.path.basename(filename)), main)() File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py", line 1611, in run final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args) File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\shared.py", line 2009, in emscripten call_emscripten(cmdline) File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 2340, in _main temp_files.run_and_clean(lambda: main( File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\tempfiles.py", line 93, in run_and_clean return func() File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 2345, in <lambda> DEBUG=DEBUG, File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 2251, in main temp_files=temp_files, DEBUG=DEBUG) File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 99, in emscript glue, forwarded_data = compiler_glue(metadata, settings, libraries, compiler_engine, temp_files, DEBUG) File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 226, in compiler_glue glue, forwarded_data = compile_settings(compiler_engine, settings, libraries, temp_files) File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 532, in compile_settings cwd=path_from_root('src'), error_limit=300) File "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\jsrun.py", line 132, in run_js raise Exception('Expected the command ' + str(command) + ' to finish with return code ' + str(assert_returncode) + ', but it returned with code ' + str(proc.returncode) + ' instead! Output: ' + str(ret)[:error_limit])Exception: Expected the command ['C:/Program Files/Unity/Editor/Data\\Tools\\nodejs\\node.exe', '--stack_size=8192', '--max-old-space-size=4096', 'C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\Emscripten\\src\\compiler.js', 'C:\\Users\\thijser\\AppData\\Local\\Temp\\tmpftpsvx.txt', 'C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Audio.js', 'C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Cursor.js', 'C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Eval.js', 'C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\FileSystem.js', 'C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Logging.js', 'C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Profiler.js', 'C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\SystemInfo.js', 'C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\UnetWebSocket.js', 'C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Video.js', 'C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\WebCam.js', 'C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\WebGL.js', 'C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\WebRequest.js', 'A:\\code\\Workspaces\\unity3d_project\\verifi3d\\Assets\\Plugins\\webCommunication.jslib', 'A:\\code\\Workspaces\\unity3d_project\\verifi3d\\Assets\\Plugins\\jsCommunication.jslib', 'C:\\Program Files\\Unity\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\Emscripten\\src\\library_pthread_stub.js'] to finish with return code 0, but it returned with code 1 instead! Output: // The Module object: Our interface to the outside world. We import// and export values on it. There are various ways Module can be used:// 1. Not defined. We create it here// 2. A function parameter, function(Module) { ..generated code.. }// 3. pre-run appended it, var Module = {}; ..generated
0x00000001415381D8 (Unity) StackWalker::GetCurrentCallstack
0x000000014153E716 (Unity) StackWalker::ShowCallstack
0x000000014140D4EB (Unity) GetStacktrace
0x00000001408B1580 (Unity) DebugStringToFile
0x00000001418DD198 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x0000000046FCB630 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,string,UnityEngine.Object)
0x0000000046FCB503 (Mono JIT Code) [DebugLogHandler.cs:10] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x0000000046FCAD85 (Mono JIT Code) [Logger.cs:48] UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x0000000046FCAA19 (Mono JIT Code) [Debug.bindings.cs:117] UnityEngine.Debug:LogError (object)
0x000000004602D0FB (Mono JIT Code) [ProgramUtils.cs:48] UnityEditor.WebGL.ProgramUtils:StartProgramChecked (System.Diagnostics.ProcessStartInfo)
0x000000004602645B (Mono JIT Code) [BuildPostprocessor.cs:425] UnityEditor.WebGL.WebGlBuildPostprocessor:EmscriptenLink (UnityEditor.Modules.BuildPostProcessArgs,bool,string,string)
0x0000000045F5F86B (Mono JIT Code) [BuildPostprocessor.cs:475] UnityEditor.WebGL.WebGlBuildPostprocessor:LinkBuild (UnityEditor.Modules.BuildPostProcessArgs)
0x00000000193947D3 (Mono JIT Code) [BuildPostprocessor.cs:939] UnityEditor.WebGL.WebGlBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs)
0x0000000019392D81 (Mono JIT Code) [DefaultBuildPostprocessor.cs:31] UnityEditor.Modules.DefaultBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs,UnityEditor.BuildProperties&)
0x000000001939206F (Mono JIT Code) [PostprocessBuildPlayer.cs:288] UnityEditor.PostprocessBuildPlayer:Postprocess (UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,string,string,string,int,int,UnityEditor.BuildOptions,UnityEditor.RuntimeClassRegistry,UnityEditor.Build.Reporting.BuildReport)
0x0000000019392510 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_int_object_object_object_int_int_int_object_object (object,intptr,intptr,intptr)
0x00007FFA769CA65B (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FFA76951B72 (mono-2.0-bdwgc) [object.c:2915] do_runtime_invoke
0x00007FFA7695AB5F (mono-2.0-bdwgc) [object.c:2962] mono_runtime_invoke
0x0000000140C0734A (Unity) scripting_method_invoke
0x0000000140BFF710 (Unity) ScriptingInvocation::Invoke
0x0000000140D819EF (Unity) CallMono
0x0000000140D8D1ED (Unity) PostprocessPlayer
0x0000000140D84E89 (Unity) DoBuildPlayer_PostBuild
0x0000000140D845BC (Unity) DoBuildPlayer
0x0000000140D76D55 (Unity) BuildPlayer
0x0000000142291FDA (Unity) BuildPipeline::BuildPlayerInternalNoCheck
0x00000001422900EC (Unity) BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck
0x00000000006DEBA3 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,UnityEditor.BuildOptions,bool)
0x00000000006DDFEB (Mono JIT Code) [BuildPlayerWindowBuildMethods.cs:170] UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
0x00000000006D647B (Mono JIT Code) [BuildPlayerWindowBuildMethods.cs:95] UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
0x0000000045D563B3 (Mono JIT Code) [BuildPlayerWindow.cs:892] UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform)
0x0000000045D4C63B (Mono JIT Code) [BuildPlayerWindow.cs:818] UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings ()
0x0000000045D26EBB (Mono JIT Code) [BuildPlayerWindow.cs:415] UnityEditor.BuildPlayerWindow:OnGUI ()
0x0000000045F67D30 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007FFA769CA65B (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FFA76951B72 (mono-2.0-bdwgc) [object.c:2915] do_runtime_invoke
0x00007FFA7695AD32 (mono-2.0-bdwgc) [object.c:3067] mono_runtime_invoke_checked
0x00007FFA7695B4C9 (mono-2.0-bdwgc) [object.c:5253] mono_runtime_try_invoke_array
0x00007FFA7695ACC6 (mono-2.0-bdwgc) [object.c:5131] mono_runtime_invoke_array_checked
0x00007FFA768FFDC4 (mono-2.0-bdwgc) [icall.c:3357] ves_icall_InternalInvoke
0x000000003ECEA6A6 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
0x000000003ECFFA5B (Mono JIT Code) System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
0x000000003ECFF71F (Mono JIT Code) System.Reflection.MethodBase:Invoke (object,object[])
0x000000003EDBB8B3 (Mono JIT Code) [HostView.cs:295] UnityEditor.HostView:Invoke (string,object)
0x000000003EDBB703 (Mono JIT Code) [HostView.cs:289] UnityEditor.HostView:Invoke (string)
0x0000000045D24EA3 (Mono JIT Code) [HostView.cs:105] UnityEditor.HostView:OldOnGUI ()
0x000000004123AFC4 (Mono JIT Code) [IMGUIContainer.cs:216] UnityEngine.Experimental.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,bool)
0x00000000412395F3 (Mono JIT Code) [IMGUIContainer.cs:378] UnityEngine.Experimental.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event)
0x000000003EDB26EB (Mono JIT Code) [IMGUIContainer.cs:355] UnityEngine.Experimental.UIElements.IMGUIContainer:HandleEvent (UnityEngine.Experimental.UIElements.EventBase)
0x000000003EDA5384 (Mono JIT Code) [EventDispatcher.cs:265] UnityEngine.Experimental.UIElements.EventDispatcher:DispatchEvent (UnityEngine.Experimental.UIElements.EventBase,UnityEngine.Experimental.UIElements.IPanel)
0x00000000411EB4CB (Mono JIT Code) [UIElementsUtility.cs:244] UnityEngine.Experimental.UIElements.UIElementsUtility:DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel)
0x00000000411EAA2B (Mono JIT Code) [UIElementsUtility.cs:74] UnityEngine.Experimental.UIElements.UIElementsUtility:ProcessEvent (int,intptr)
0x00000000411EA394 (Mono JIT Code) [GUIUtility.cs:171] UnityEngine.GUIUtility:ProcessEvent (int,intptr)
0x00000000411EA5B3 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_bool_int_intptr (object,intptr,intptr,intptr)
0x00007FFA769CA65B (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FFA76951B72 (mono-2.0-bdwgc) [object.c:2915] do_runtime_invoke
0x00007FFA7695AB5F (mono-2.0-bdwgc) [object.c:2962] mono_runtime_invoke
0x0000000140C0734A (Unity) scripting_method_invoke
0x0000000140BFF710 (Unity) ScriptingInvocation::Invoke
0x0000000140BFA7CA (Unity) ScriptingInvocation::Invoke<bool>
0x00000001404182F9 (Unity) IMGUIScriptingClasses::ProcessEvent
0x0000000141399634 (Unity) GUIView::ProcessRetainedMode
0x00000001415D0242 (Unity) GUIView::OnInputEvent
0x00000001413995BC (Unity) GUIView::ProcessInputEvent
0x00000001415D159A (Unity) GUIView::ProcessEventMessages
0x00000001415CACCD (Unity) GUIView::GUIViewWndProc
0x00007FFACDF86CC1 (USER32) CallWindowProcW
0x00007FFACDF86693 (USER32) DispatchMessageW
0x00000001415EA0A4 (Unity) MainMessageLoop
0x00000001415EC2C8 (Unity) WinMain
0x000000014243127A (Unity) __scrt_common_main_seh
0x00007FFACFBB3034 (KERNEL32) BaseThreadInitThunk
0x00007FFAD0A01461 (ntdll) RtlUserThreadStart
Build completed with a result of 'Succeeded'
0x00000001415381D8 (Unity) StackWalker::GetCurrentCallstack
0x000000014153E716 (Unity) StackWalker::ShowCallstack
0x000000014140D4EB (Unity) GetStacktrace
0x00000001408B1580 (Unity) DebugStringToFile
0x00000001418DD198 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x0000000046FCB630 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,string,UnityEngine.Object)
0x0000000046FCB503 (Mono JIT Code) [DebugLogHandler.cs:10] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x0000000046FCAD85 (Mono JIT Code) [Logger.cs:48] UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x000000004C616F1C (Mono JIT Code) [Debug.bindings.cs:98] UnityEngine.Debug:Log (object)
0x00000000006DE523 (Mono JIT Code) [BuildPlayerWindowBuildMethods.cs:190] UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
0x00000000006D647B (Mono JIT Code) [BuildPlayerWindowBuildMethods.cs:95] UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
0x0000000045D563B3 (Mono JIT Code) [BuildPlayerWindow.cs:892] UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform)
0x0000000045D4C63B (Mono JIT Code) [BuildPlayerWindow.cs:818] UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings ()
0x0000000045D26EBB (Mono JIT Code) [BuildPlayerWindow.cs:415] UnityEditor.BuildPlayerWindow:OnGUI ()
0x0000000045F67D30 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007FFA769CA65B (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FFA76951B72 (mono-2.0-bdwgc) [object.c:2915] do_runtime_invoke
0x00007FFA7695AD32 (mono-2.0-bdwgc) [object.c:3067] mono_runtime_invoke_checked
0x00007FFA7695B4C9 (mono-2.0-bdwgc) [object.c:5253] mono_runtime_try_invoke_array
0x00007FFA7695ACC6 (mono-2.0-bdwgc) [object.c:5131] mono_runtime_invoke_array_checked
0x00007FFA768FFDC4 (mono-2.0-bdwgc) [icall.c:3357] ves_icall_InternalInvoke
0x000000003ECEA6A6 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
0x000000003ECFFA5B (Mono JIT Code) System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
0x000000003ECFF71F (Mono JIT Code) System.Reflection.MethodBase:Invoke (object,object[])
0x000000003EDBB8B3 (Mono JIT Code) [HostView.cs:295] UnityEditor.HostView:Invoke (string,object)
0x000000003EDBB703 (Mono JIT Code) [HostView.cs:289] UnityEditor.HostView:Invoke (string)
0x0000000045D24EA3 (Mono JIT Code) [HostView.cs:105] UnityEditor.HostView:OldOnGUI ()
0x000000004123AFC4 (Mono JIT Code) [IMGUIContainer.cs:216] UnityEngine.Experimental.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,bool)
0x00000000412395F3 (Mono JIT Code) [IMGUIContainer.cs:378] UnityEngine.Experimental.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event)
0x000000003EDB26EB (Mono JIT Code) [IMGUIContainer.cs:355] UnityEngine.Experimental.UIElements.IMGUIContainer:HandleEvent (UnityEngine.Experimental.UIElements.EventBase)
0x000000003EDA5384 (Mono JIT Code) [EventDispatcher.cs:265] UnityEngine.Experimental.UIElements.EventDispatcher:DispatchEvent (UnityEngine.Experimental.UIElements.EventBase,UnityEngine.Experimental.UIElements.IPanel)
0x00000000411EB4CB (Mono JIT Code) [UIElementsUtility.cs:244] UnityEngine.Experimental.UIElements.UIElementsUtility:DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel)
0x00000000411EAA2B (Mono JIT Code) [UIElementsUtility.cs:74] UnityEngine.Experimental.UIElements.UIElementsUtility:ProcessEvent (int,intptr)
0x00000000411EA394 (Mono JIT Code) [GUIUtility.cs:171] UnityEngine.GUIUtility:ProcessEvent (int,intptr)
0x00000000411EA5B3 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_bool_int_intptr (object,intptr,intptr,intptr)
0x00007FFA769CA65B (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FFA76951B72 (mono-2.0-bdwgc) [object.c:2915] do_runtime_invoke
0x00007FFA7695AB5F (mono-2.0-bdwgc) [object.c:2962] mono_runtime_invoke
0x0000000140C0734A (Unity) scripting_method_invoke
0x0000000140BFF710 (Unity) ScriptingInvocation::Invoke
0x0000000140BFA7CA (Unity) ScriptingInvocation::Invoke<bool>
0x00000001404182F9 (Unity) IMGUIScriptingClasses::ProcessEvent
0x0000000141399634 (Unity) GUIView::ProcessRetainedMode
0x00000001415D0242 (Unity) GUIView::OnInputEvent
0x00000001413995BC (Unity) GUIView::ProcessInputEvent
0x00000001415D159A (Unity) GUIView::ProcessEventMessages
0x000000
By the end unity tells me the build succeeded but changes in the editor do not actually prograde to the editor itself (I changed the text in a button and it remains the same). This suggests that the build failed even if the message tells me that the build completed with the result of "success".
I also think the jslib file might be involved in this
var WebInteraction = {
$TestScript: {
unityTestVariable:"test_var_declared";
},
GetUnityTestVariable: function () {
return TestScript.unityTestVariable;
},
Init: function () {
TestScript.unityTestVariable = "test_var_initiated";
console.log("initiated");
},
AlertTest: function () {
},
ConsoleTest: function (consoleTestText) {
console.log(Pointer_stringify(consoleTestText));
},
CreateScreenShotImageTest: function(){
console.log("taking screenshot, lol");
},
VariableChangeTest: function(json){
json=Pointer_stringify(json);
__VUE_DEVTOOLS_GLOBAL_HOOK__.store.state.unityObject=json;
s
},
ProvideCallback: function(obj)
{
console.log("ProvideCallback");
console.log(obj);
TestScript.callback = obj;
Runtime.dynCall('v', obj, 0);
}
};
autoAddDeps(WebInteraction, '$TestScript');
mergeInto(LibraryManager.library, WebInteraction);
Anybody got any idea what file I should look at for the error?

Calling Mono exe from C does not find libc

In Ubuntu, I am calling a C# executable from C using Mono (v3.2.8) and the embedded Mono runtime. When I call the exe (.NET 4.5) from the command line (ie, mono testFile.exe), it works fine. However, when I run my C test program, it throws a C# exception:
libc at at (wrapper managed-to-native) System.Platform:uname (intptr)
at System.Platform.get_IsMacOS () [0x00000] in <filename unknown>:0
at System.Net.WebRequest.GetSystemWebProxy () [0x00000] in <filename unknown>:0
at System.Net.WebRequest.GetDefaultWebProxy () [0x00000] in <filename unknown>:0
at System.Net.WebRequest.get_DefaultWebProxy () [0x00000] in <filename unknown>:0
at System.Net.GlobalProxySelection.get_Select () [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequest..ctor (System.Uri uri) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Net.HttpWebRequest:.ctor (System.Uri)
at System.Net.HttpRequestCreator.Create (System.Uri uri) [0x00000] in <filename unknown>:0
at System.Net.WebRequest.Create (System.Uri requestUri) [0x00000] in <filename unknown>:0
at System.Net.WebRequest.Create (System.String requestUriString) [0x00000] in <filename unknown>:0
at MyClass.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
I've narrowed it down to this one line of code:
WebRequest request = WebRequest.Create("http://www.google.com");
Looking through the call stack and the mono source code, I believe the failure is associated with the calling of the native 'uname' function in libc.so (the CheckOS() function, line 50 of mcs/class/System/System/Platform.cs):
if (uname (buf) == 0) {
I think what is happening is that the p/Invoke layer cannot locate libc.so. However, when I make the same call in my executable's Main() function, it executes fine, I am confused why it works in one place but not the other. It is also strange that the exception message is not a DllNotFoundException, but rather this generic "libc" message (though I have confirmed that I get the same message when I try to p/Invoke with a bogus .so).
My C code:
int main(int argc,const char* argv[]) {
MonoDomain* domain=mono_jit_init("testFile.exe");
MonoAssembly* assembly=mono_domain_assembly_open(domain,"testFile.exe");
MonoImage* image=mono_assembly_get_image(assembly);
const char* args[1];
args[0]="testFile.exe";
mono_jit_exec(domain,assembly,1,(char**) args);
}
My C# code:
namespace MyClass {
class MainClass {
public static void Main (string[] args) {
WebRequest request=WebRequest.Create("http://www.google.com");
}
}
}
gcc compile options are:
gcc cTest.c -I/usr/include/mono-2.0 -DREENTRANT -lmono-2.0 -lm -lrt -ldl -lpthread
mono compile options are:
dmcs -out:testFile.exe -platform:anycpu -sdk:4.5 -target:exe -unsafe+ -main:MyClass.MainClass -reference:System,System.Configuration,System.Data,System.ServiceModel,System.Web,System.Xml *.cs
Update:
I used MONO_LOG_LEVEL and MONO_LOG_MASK to trace the .so search sequence and found that the sequence on the successful call was entirely different from the unsuccessful one. So it is searching, just not very well. I then copied my libc.so.6 to the current directory, renamed to libc.so, and then set LD_LIBRARY_PATH to the same location. This gave me success. I am now having my Linux guru look into what can be done to make this solution more 'correct', but at least I have a running program. This may be the same problem as mine (though the solution's not working for me).
The problem is you are missing the dll mapping (mono_config_parse). The following will work with mono 3.x and 4.x embedding and avoid your libc error.
#include <mono/jit/jit.h>
#include <mono/metadata/environment.h>
#include <stdlib.h>
int
main(int argc, char* argv[]) {
MonoDomain *domain;
const char *file;
int retval;
mono_config_parse (NULL);
domain = mono_jit_init ("textFile.exe");
MonoAssembly *assembly;
assembly = mono_domain_assembly_open (domain, "testFile.exe");
mono_jit_exec (domain, assembly, argc, argv);
retval = mono_environment_exitcode_get ();
mono_jit_cleanup (domain);
return retval;
}
Certain features of the runtime like Dll remapping depend on a configuration file, to load the configuration file, just add:
mono_config_parse (NULL);
Which will load the Mono configuration file (typically /etc/mono/config).
http://www.mono-project.com/docs/advanced/embedding
FYI: On Ubuntu 15.04, I am using:
gcc main.c `pkg-config --cflags --libs mono-2`
You can update that of course to grab the mono-sgen vs. the boehm jit.
On OS-X:
gcc main.c -m32 -framework Foundation -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk \
-lmonosgen-2.0 \
-I/Library/Frameworks/Mono.framework/Headers/mono-2.0 \
-L/Library/Frameworks/Mono.framework/Libraries
I've run into this issue as well. What I noticed is that the mkbundle output lists the assemblies which it embeds, and that the System.Net.dll was not included. After adding it manually on the mkbundle command line, it all worked fine.
The command line I'm using now:
mkbundle my.exe --deps --keeptemp --static --config /etc/mono/configlibc --machine-config /etc/mono/4.5/machine.config System.Net.dll -o bssetup.exe
The configlibc file is a modified copy of the default config file in that directory. The modifications were to remove all mapping lines, except the one for libc.
Hope it helps anyone!
Based on your update, it looks like the application is searching for libc.so instead of libc.so.6. You got it working by manually pointing your LD_LIBRARY_PATH to the current folder having the libc.so that you copied.
Suggestion: ask your Linux guru to symlink libc.so to libc.so.6 in your normal search paths for your application to work.

Mono gets native exception when trying to access MVC site

I could use a hand in figuring out what's wrong in my mono + mod-mono + MVC setup:
I'm trying to get my Asp.Net MVC3 site deployed on an Apache server running on CentOS 6.5. I think I have a working mono 3.10.1 installation, as I can run C# console programs by issuing mono myprogram.exe on the Linux platform. Also, I have mod_mono (3.8) configured and I can access simple web applications. I've tested with a simple aspx page that prints out the current date, just to see that my Apache and mod_mono are actually communicating correctly.
But the problem arises when I try to deploy a MVC3 site. When trying to access it on a browser, I get 500 error and the httpd/error_log says:
Stacktrace:
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes (System.Reflection.Assembly,bool) <0xffffffff>
at System.Reflection.Assembly.GetTypes () <0x00018>
at Mono.CSharp.ReflectionImporter.ImportAssembly (System.Reflection.Assembly,Mono.CSharp.RootNamespace) <0x00037>
at Microsoft.CSharp.RuntimeBinder.DynamicContext.Create () <0x00223>
at Microsoft.CSharp.RuntimeBinder.CSharpSetMemberBinder.FallbackSetMember (System.Dynamic.DynamicMetaObject,System.Dynamic.DynamicMetaObject,System.Dynamic.DynamicMetaObject) <0x00013>
at System.Dynamic.DynamicObject/MetaDynamic/<BindSetMember>c__AnonStorey1.<>m__0 (System.Dynamic.DynamicMetaObject) <0x0001c>
at System.Dynamic.DynamicObject/MetaDynamic.CallMethodReturnLast (string,System.Dynamic.DynamicMetaObjectBinder,System.Linq.Expressions.Expression[],System.Linq.Expressions.Expression,System.Dynamic.DynamicObject/MetaDynamic/Fallback) <0x00012>
at System.Dynamic.DynamicObject/MetaDynamic.BindSetMember (System.Dynamic.SetMemberBinder,System.Dynamic.DynamicMetaObject) <0x0014b>
at System.Dynamic.SetMemberBinder.Bind (System.Dynamic.DynamicMetaObject,System.Dynamic.DynamicMetaObject[]) <0x0007a>
at System.Dynamic.DynamicMetaObjectBinder.Bind (object[],System.Collections.ObjectModel.ReadOnlyCollection`1<System.Linq.Expressions.ParameterExpression>,System.Linq.Expressions.LabelTarget) <0x00155>
at System.Runtime.CompilerServices.CallSiteBinder.BindCore<T> (System.Runtime.CompilerServices.CallSite`1<T>,object[]) <0x00090>
at System.Dynamic.UpdateDelegates.UpdateAndExecute2<T0, T1, TRet> (System.Runtime.CompilerServices.CallSite,T0,T1) <0x0040f>
at BoaCommander.Controllers.HomeController.Index () <0x000e8>
at (wrapper dynamic-method) object.lambda_method (System.Runtime.CompilerServices.Closure,System.Web.Mvc.ControllerBase,object[]) <0x0002f>
at System.Web.Mvc.ActionMethodDispatcher.Execute (System.Web.Mvc.ControllerBase,object[]) <0x0001b>
at System.Web.Mvc.ReflectedActionDescriptor.Execute (System.Web.Mvc.ControllerContext,System.Collections.Generic.IDictionary`2<string, object>) <0x0016f>
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod (System.Web.Mvc.ControllerContext,System.Web.Mvc.ActionDescriptor,System.Collections.Generic.IDictionary`2<string, object>) <0x00019>
at System.Web.Mvc.ControllerActionInvoker/<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12 () <0x00066>
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter (System.Web.Mvc.IActionFilter,System.Web.Mvc.ActionExecutingContext,System.Func`1<System.Web.Mvc.ActionExecutedContext>) <0x000dc>
at System.Web.Mvc.ControllerActionInvoker/<>c__DisplayClass15/<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14 () <0x0001f>
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters (System.Web.Mvc.ControllerContext,System.Collections.Generic.IList`1<System.Web.Mvc.IActionFilter>,System.Web.Mvc.ActionDescriptor,System.Collections.Generic.IDictionary`2<string, object>) <0x00250>
at System.Web.Mvc.ControllerActionInvoker.InvokeAction (System.Web.Mvc.ControllerContext,string) <0x0015a>
at System.Web.Mvc.Controller.ExecuteCore () <0x00064>
at System.Web.Mvc.ControllerBase.Execute (System.Web.Routing.RequestContext) <0x0005f>
at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute (System.Web.Routing.RequestContext) <0x00016>
at System.Web.Mvc.MvcHandler/<>c__DisplayClass6/<>c__DisplayClassb.<BeginProcessRequest>b__5 () <0x00026>
at System.Web.Mvc.Async.AsyncResultWrapper/<>c__DisplayClass1.<MakeVoidDelegate>b__0 () <0x00015>
at (wrapper delegate-invoke) System.Func`1<System.Web.Mvc.Async.AsyncVoid>.invoke_TResult () <0xffffffff>
at System.Web.Mvc.Async.AsyncResultWrapper/<>c__DisplayClass8`1<System.Web.Mvc.Async.AsyncVoid>.<BeginSynchronous>b__7 (System.IAsyncResult) <0x00019>
at (wrapper delegate-invoke) System.Web.Mvc.Async.EndInvokeDelegate`1<System.Web.Mvc.Async.AsyncVoid>.invoke_TResult_IAsyncResult (System.IAsyncResult) <0xffffffff>
at System.Web.Mvc.Async.AsyncResultWrapper/WrappedAsyncResult`1<System.Web.Mvc.Async.AsyncVoid>.End () <0x0006f>
at System.Web.Mvc.Async.AsyncResultWrapper.End<System.Web.Mvc.Async.AsyncVoid> (System.IAsyncResult,object) <0x00027>
at System.Web.Mvc.Async.AsyncResultWrapper.End (System.IAsyncResult,object) <0x00017>
at System.Web.Mvc.MvcHandler/<>c__DisplayClasse.<EndProcessRequest>b__d () <0x0001b>
at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0 (System.Action) <0x00011>
at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust (System.Action) <0x00018>
at System.Web.Mvc.MvcHandler.EndProcessRequest (System.IAsyncResult) <0x000b3>
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest (System.IAsyncResult) <0x00016>
at System.Web.HttpApplication.async_handler_complete_cb (System.IAsyncResult) <0x000d1>
at System.Web.Mvc.Async.AsyncResultWrapper/WrappedAsyncResult`1<System.Web.Mvc.Async.AsyncVoid>.Begin (System.AsyncCallback,object,int) <0x0016a>
at System.Web.Mvc.Async.AsyncResultWrapper.BeginSynchronous<System.Web.Mvc.Async.AsyncVoid> (System.AsyncCallback,object,System.Func`1<System.Web.Mvc.Async.AsyncVoid>,object) <0x0012b>
at System.Web.Mvc.Async.AsyncResultWrapper.BeginSynchronous (System.AsyncCallback,object,System.Action,object) <0x00027>
at System.Web.Mvc.MvcHandler/<>c__DisplayClass6.<BeginProcessRequest>b__2 () <0x00333>
at System.Web.Mvc.SecurityUtil/<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a () <0x00018>
at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0 (System.Action) <0x00011>
at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust (System.Action) <0x00018>
at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust<TResult> (System.Func`1<TResult>) <0x00117>
at System.Web.Mvc.MvcHandler.BeginProcessRequest (System.Web.HttpContextBase,System.AsyncCallback,object) <0x00137>
at System.Web.Mvc.MvcHandler.BeginProcessRequest (System.Web.HttpContext,System.AsyncCallback,object) <0x0003f>
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest (System.Web.HttpContext,System.AsyncCallback,object) <0x00019>
at System.Web.HttpApplication/<Pipeline>c__Iterator1.MoveNext () <0x037f7>
at System.Web.HttpApplication.Tick () <0x00035>
at System.Web.HttpApplication.Start (object) <0x001a3>
at System.Web.HttpApplication.System.Web.IHttpHandler.ProcessRequest (System.Web.HttpContext) <0x00057>
at System.Web.HttpRuntime.Process (System.Web.HttpWorkerRequest) <0x00223>
at System.Web.HttpRuntime.RealProcessRequest (object) <0x0007b>
at System.Web.HttpRuntime.ProcessRequest (System.Web.HttpWorkerRequest) <0x00043>
at Mono.WebServer.MonoWorkerRequest.ProcessRequest () <0x00083>
at Mono.WebServer.BaseApplicationHost.ProcessRequest (Mono.WebServer.MonoWorkerRequest) <0x00073>
at Mono.WebServer.ModMonoApplicationHost.ProcessRequest (int,string,string,string,string,string,int,string,int,string,string[],string[],object) <0x003ef>
at (wrapper remoting-invoke-with-check) Mono.WebServer.ModMonoApplicationHost.ProcessRequest (int,string,string,string,string,string,int,string,int,string,string[],string[],object) <0xffffffff>
at (wrapper xdomain-dispatch) Mono.WebServer.ModMonoApplicationHost.ProcessRequest (object,byte[]&,byte[]&,int,string,string,string,string,string,int,string,int,string,string[],string[]) <0xffffffff>
at (wrapper xdomain-invoke) Mono.WebServer.ModMonoApplicationHost.ProcessRequest (int,string,string,string,string,string,int,string,int,string,string[],string[],object) <0xffffffff>
at (wrapper remoting-invoke-with-check) Mono.WebServer.ModMonoApplicationHost.ProcessRequest (int,string,string,string,string,string,int,string,int,string,string[],string[],object) <0xffffffff>
at Mono.WebServer.Apache.ModMonoWorker.InnerRun () <0x006e3>
at Mono.WebServer.Apache.ModMonoWorker.Run (object) <0x0001b>
at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>
Native stacktrace:
/usr/bin/mono() [0x80f1342]
[0xb76f4600]
Debug info from gdb:
warning: File "/usr/bin/mono-sgen-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "/usr/share/gdb/auto-load:/usr/lib/debug:/usr/bin/mono-gdb.py".
To enable execution of this file add
add-auto-load-safe-path /usr/bin/mono-sgen-gdb.py
line to your configuration file "$HOME/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "$HOME/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
[New LWP 2106]
[New LWP 2105]
[New LWP 2101]
...
Thread 1 (Thread 0xb74fa700 (LWP 2087)):
#0 0xb76f4405 in __kernel_vsyscall ()
#1 0xb769d3ac in pthread_cond_wait##GLIBC_2.3.2 () from /lib/libpthread.so.0
#2 0x0825106f in _wapi_handle_timedwait_signal_handle (handle=0x400, timeout=0x0, alertable=1, poll=0) at handles.c:1595
#3 0x08251167 in _wapi_handle_wait_signal (poll=0) at handles.c:1528
#4 0x082654c6 in WaitForMultipleObjectsEx (numobjects=2, handles=0xbfece7dc, waitall=0, timeout=4294967295, alertable=1) at wait.c:637
#5 0x081c9201 in wait_for_tids_or_state_change () at threads.c:2718
#6 mono_thread_manage () at threads.c:2921
#7 0x080c7caf in mono_main (argc=8, argv=0xbfecebb4) at driver.c:2021
#8 0x08057c83 in mono_main_with_options (argc=8, argv=0xbfecebb4) at main.c:91
#9 main (argc=8, argv=0xbfecebb4) at main.c:122
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
[Thu Oct 30 16:17:26 2014] [error] (70014)End of file found: read_data failed
[Thu Oct 30 16:17:26 2014] [error] Command stream corrupted, last command was 1
So, according to the warning I created a file /root/.gdbinit and added line:
add-auto-load-safe-path /usr/bin/mono-sgen-gdb.py
No effect. I verified that mono-gdb.py and mono-sgen-gdb.py files exist, also tried adding the folder only: add-auto-load-safe-path /usr/bin/ - no effect again. Tried running gdb and issuing the command 'add-auto-load-safe-path /usr/bin/mono-sgen-gdb.py' on gdb - no effect. So there must be something I'm doing wrong, or something wrong in my setup.
Any idea what this could be all about and where should I continue in searching for solution?

Using Spire.Doc in Xamarin C#

Help me to correct this exception, idk what's that. I couldn't find any information about that. What do I need to do?
using System;
using Spire.Doc;
using Spire.Doc.Documents;
namespace TOC
{
class MainClass
{
public static void Main (string[] args)
{
Document document = new Document();
}
}
}
Unhandled Exception:
System.TypeLoadException: Could not load type 'Spire.Doc.Document'
from assembly 'Spire.Doc, Version=5.2.48.3040, Culture=neutral,
PublicKeyToken=663f351905198cb3'.
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException:
Could not load type 'Spire.Doc.Document' from assembly
'Spire.Doc, Version=5.2.48.3040, Culture=neutral,
PublicKeyToken=663f351905198cb3'.
I tried to create the solution again, then the problem disappeared and appear another one.
Unhandled Exception:
System.InvalidProgramException: Invalid IL code in
Spire.Doc.Document:ᜤ (): IL_0003: pop
at Spire.Doc.Document..ctor () [0x00000] in <filename unknown>:0
at TOC.MainClass.Main (System.String[] args) [0x00001] in
/Users/mac/Documents/Csharp/TOC/Program.cs:11
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidProgramException:
Invalid IL code in Spire.Doc.Document:ᜤ (): IL_0003: pop
at Spire.Doc.Document..ctor () [0x00000] in <filename unknown>:0
at TOC.MainClass.Main (System.String[] args) [0x00001] in
/Users/mac/Documents/Csharp/TOC/Program.cs:11
It looks like so weird...
You have to contact Spire.Doc vendor as,
Mono CLR is different from .NET CLR, and therefore the obfuscated assembly optimized for .NET might not work for Mono. They should provide you probably another obfuscated version.
Mono API is not 100% the same as .NET API, so you need the vendor to confirm that they fully test the product against Mono.
Don't simply rely on MoMA for compatibility testing. That's only a prototype and it only provides very basic functionality.

System.EntryPointNotFoundException CreateActCtx error's

I'm trying to make an C# program in mono, so i can port it to Windows, Linux and Mac very easy.
But I've got this error:
System.EntryPointNotFoundException has been thrown
CreateActCtx
System.EntryPointNotFoundException: CreateActCtx
at (wrapper managed-to-native) WebKit.NativeMethods:CreateActCtx (WebKit.NativeMethods/ACTCTX&)
at WebKit.ActivationContext.Initialize () [0x00000] in <filename unknown>:0
at WebKit.WebKitBrowser..ctor () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) WebKit.WebKitBrowser:.ctor ()
at TW_Overview.globalVars..cctor () [0x00000] in <filename unknown>:0
Here is some code:
public static void Main (string[] args)
{
Application.Init ();
MainWindow win = new MainWindow ();
startUp();
win.Show ();
Application.Run ();
}
public static globalFunc globalfunctions = new globalFunc();
public static void startUp ()
{
while (!globalfunctions.isLoggedIn()) {
globalfunctions.showLogin();
}
}
And here's the globalfunc (part of it)
public Boolean isLoggedIn()
{
if (globalVars.isLoggedIn == true)
{
return true;
}
return false;
}
The line that give's the error is:
while (!globalfunctions.isLoggedIn()) {
I've gotten this type of approach in C# Windows Visual Studio, and there it worked. So i don't understand why it isn't working.
Hope that you guys have an clue about what the problem is...
EDIT 1
I've downloaded the latest version of webkit.net link, unpacked it and put all the dllś and folders in the debug folder of my program. I also added an refrence to the dll in the debug folder.
And i've added everywhere this line:
using WebKit;
So i don't know what the problem is. mayby something with static and not static??? i'm not that good at that part...
EDIT 2
The problem is that this isn't supported bij Mono.
After some searching and looking if it's possible to port the webkit to mono, i came across an site that already did that for us.
https://live.gnome.org/WebKitGtk
I cant test it right now, but i think it should work. If not, then i will incontinent searching and update here if i find the solution.

Categories