Researched this issue many times but didn't found solution of it. Working with xamarin forms version 5.0.0.2012, on win 10 os (saw many solutions for mac or linux but didn't found any for windows), using PCSC library version 5.0.0. Trying to invoke context.Establish method while debugging on Android 8.0:
public SimpleReader(ISCardContext context, bool releaseContextOnDispose = false)
{
if (context == null)
{
context = (ISCardContext) new SCardContext();
context.Establish(SCardScope.System);
releaseContextOnDispose = true;
}
this._context = context;
this._reader = (ISCardReader) new SCardReader(context);
this._releaseContextOnDispose = releaseContextOnDispose;
this._disconnectReaderOnDispose = true;
}
When, exception occur with message below:
System.DllNotFoundException: libpcsclite.so.1 assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) PCSC.Interop.Linux.LinuxNativeMethods.SCardEstablishContext(intptr,intptr,intptr,intptr&)
at PCSC.Interop.Linux.PCSCliteLinux.EstablishContext (PCSC.SCardScope dwScope, System.IntPtr pvReserved1, System.IntPtr pvReserved2, System.IntPtr& phContext) [0x00006] in C:\Users\danm\src\pcsc-sharp\src\PCSC\Interop\Linux\PCSCliteLinux.cs:39
at PCSC.SCardContext.Establish (PCSC.SCardScope scope) [0x00020] in C:\Users\danm\src\pcsc-sharp\src\PCSC\SCardContext.cs:81
at App1xx.Services.SimpleReader.SimpleReader..ctor (PCSC.ISCardContext context, System.Boolean releaseContextOnDispose) [0x00023] in C:\Users\vzhynkin\source\repos\App1xx\App1xx\App1xx\Services\SimpleReaderLib\SimpleReader.cs:59
at App1xx.Services.SimpleReader.SimpleReader..ctor () [0x00000] in C:\Users\vzhynkin\source\repos\App1xx\App1xx\App1xx\Services\SimpleReaderLib\SimpleReader.cs:70
at App1xx.Services.UaIdRLib.IdCardReader.connect () [0x00002] in C:\Users\vzhynkin\source\repos\App1xx\App1xx\App1xx\Services\UaIdRLib\IdCardReader.cs:371
at App1xx.Views.AboutPage.OnButtonClicked (System.Object sender, System.EventArgs args) [0x0000f] in C:\Users\vzhynkin\source\repos\App1xx\App1xx\App1xx\Views\AboutPage.xaml.cs:22
at Xamarin.Forms.Button.Xamarin.Forms.Internals.IButtonElement.PropagateUpClicked () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Button.cs:187
at Xamarin.Forms.ButtonElement.ElementClicked (Xamarin.Forms.VisualElement visualElement, Xamarin.Forms.Internals.IButtonElement ButtonElementManager) [0x0001f] in D:\a\1\s\Xamarin.Forms.Core\ButtonElement.cs:61
at Xamarin.Forms.Button.SendClicked () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Button.cs:173
at Xamarin.Forms.Platform.Android.ButtonElementManager.OnClick (Xamarin.Forms.VisualElement element, Xamarin.Forms.IButtonController buttonController, Android.Views.View v) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\ButtonElementManager.cs:25
at Xamarin.Forms.Platform.Android.FastRenderers.ButtonRenderer.Android.Views.View.IOnClickListener.OnClick (Android.Views.View v) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\ButtonRenderer.cs:72
at Android.Views.View+IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v) [0x00010] in /Users/builder/azdo/_work/278/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-30/mcw/Android.Views.View.cs:2252
at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.68(intptr,intptr,intptr)
Does anyone faced with this issue?
The PCSC library does not appear to explicitly support Android. In my experience, nugets that work with Xamarin.Android have explicit dependencies set for the platform, but this one does not.
The library tries to use P/Invoke wrappers around native code. You can see that there are implementations for a number of operating systems here, but I don't see any references to Android. The stack trace shows that the code is deciding to use the Linux wrapper, which makes sense. It's looking for the libpcsclite.so.1 native "C/C++" library, but it's not finding it. That library has a home page that does not reference Android.
The PCSC nuget docs state:
pcsc-sharp does not contain any device drivers. A PC/SC compliant
reader + driver is mandatory.
That's the libpcsclite.so.1 . Either your Android device doesn't provide it, or if it does, it's not in a location that your Android app can find it. My Android device (running Android 9) does not have that library in any of /system/*lib* directories, which means that at least for my device someone would need to compile that native library for the CPU (usually arm64) for the device. If you can either compile the native code yourself or find someone who has, AND the native code supports the reader on your Android device, then you could get the whole thing to work.
I don't have any experience with PCSC myself - just some experience with Xamarin and native libraries.
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?
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.
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.