Unable to execute UWP App's Release build with UrhoSharp referenced.

KyleColdenKyleColden USMember ✭✭

Just pulled the latest source from the Urho Samples repository and attempted to execute the Release build of the UWP application. It crashes immediately.

Debug output shows the following at the end:

The program '[7652] Urho.Samples.UWP.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.
Activation of the Windows Store app 'c35a2e49-fae8-4f76-b75e-d236747202a4_z10v2vk4de6hc!App' failed with error 'The app didn't start'.

This also happens in the application that my team is developing as well as another test application I've created.

Running on Windows 10, Visual Studio 2015. Release builds include the Compile with .NET Native tool chain setting checked. Unchecking that does allow the app to run.

Does anyone have any thoughts on what might be happening?

Thanks,
Kyle

Tagged:

Posts

  • hutchinskihutchinski USMember ✭✭

    I can't get the debug build to work. Samples compile and run ok, but when you select one of the demo's in the app by clicking on the left hand titles ( e.g. Character Demo, or Charts ) an exception occurs. The apps run ok on WinForms and WPF and even Android. It's just UWP that causes a crash and exception. See below

    An exception of type 'System.DllNotFoundException' occurred in Urho.dll and wasn't handled before a managed/native boundary

    Additional information: Unable to load DLL 'mono-urho': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

  • KyleColdenKyleColden USMember ✭✭

    I'm still digging into this and even with .NET Native tool chain disabled the application still crashes, once the Urho Surface is added. Turning off optimizations and enabling debugging info gets me to the point where it reports it failed to load mono-urho.dll.

    Using process monitor I am able to see that it is finding the mono-urho.dll and it looks as if it's failing to find various other dlls.

    Specifically:

    vccorlib140d_app.dll
    msvcp140d_app.dll
    vcruntime140d_app.dll
    

    This is somewhat concerning as these are all debug dlls (if my understanding of the 'd' in the name is correct).

    Now I do have these files on my system located at....

    C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.Debug_14.0.24210.0_x86__8wekyb3d8bbwe
    

    But the release build is not attempting to look there. It checks...

    C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.24123.0_x86__8wekyb3d8bbwe
    

    Can anyone tell me if the mono-urho.dll that is packaged in the UrhoSharp.Forms nuget package v1.2.21 is actually a debug build?

    On a side note I'm trying to build the mono-urho.dll release build from the Urho git repo and am unable to do so. It looks like the SDL2.lib that it's referencing is a debug build and has some missing externals and release/debug mismatches. That seems to confirm to me that the mono-urho.dll from nuget is a debug build, but perhaps it's built from different source.

    Thanks
    Kyle

  • utekaiutekai USMember ✭✭

    The build has been very problematic for me also, but am able to build, use and deploy. There are some issues with release/debug. Most of my issues were found to be in how I initially obtained the code, and once that was sorted out a basket of seemingly unsolveable issues became solvable.

  • KyleColdenKyleColden USMember ✭✭
    edited March 1

    @utekai How are you obtaining the code now?

    I pulled the repo from Github (https://github.com/xamarin/urho) and ran Step 9 - 'make UWP32'. That works but has 131 warnings (defaulting to Debug build). Note I'm only trying to build UWP.

    I then open the MonoUrho.UWP project in VS and switch to Release mode and attempt to build. It give 2730 unresolved externals.

    The linker settings for Debug vs Release are different. Release doesn't know about Urho3D.lib or SDL2.lib.
    Release: d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies)

    Debug: $(ProjectDir)SdlStub\SDL2.lib;$(ProjectDir)..\lib\Urho3D_d.lib;d2d1.lib;d3d11.lib;dxgi.lib;windowscodecs.lib;dwrite.lib;%(AdditionalDependencies)

    I can get that down to much fewer errors by changing the MakeUWP32 to build -config release (to get the Urho3D.lib) and updating the release linker settings to include:
    $(ProjectDir)SdlStub\SDL2.lib;$(ProjectDir)..\lib\Urho3D.lib;

    However even after that, it still complains about issues with SDL2...

    Severity Code Description Project File Line Suppression State Error LNK1120 4 unresolved externals UrhoSharp.UWP C:\dev\urho\Bin\UWP\mono-urho.dll 1 Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_sysfilesystem.obj) 1 Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_winrtvideo.obj) 1 Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_sysmutex.obj) 1 Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_systhread.obj) 1 Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_winrtpointerinput.obj) 1 Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_winrtkeyboard.obj) 1 Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_winrtmouse.obj) 1 Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_winrtapp_xaml.obj) 1 Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_syscond.obj) 1 Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_winrtapp_direct3d.obj) 1 Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_sysfilesystem.obj) 1 Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_winrtvideo.obj) 1 Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_sysmutex.obj) 1 Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_systhread.obj) 1 Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_winrtpointerinput.obj) 1 Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_winrtkeyboard.obj) 1 Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_winrtmouse.obj) 1 Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_winrtapp_xaml.obj) 1 Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_syscond.obj) 1 Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in ApplicationProxy.obj UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_winrtapp_direct3d.obj) 1 Error LNK2001 unresolved external symbol __CrtDbgReport UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\msvcrtd.lib(_init_.obj) 1 Error LNK2001 unresolved external symbol __CrtDbgReportW UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\msvcrtd.lib(_init_.obj) 1 Error LNK2001 unresolved external symbol __imp___CrtDbgReportW UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_sysfilesystem.obj) 1 Error LNK2001 unresolved external symbol __imp___CrtDbgReportW UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_syscond.obj) 1 Error LNK2001 unresolved external symbol __imp___CrtDbgReportW UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_winrtapp_direct3d.obj) 1 Error LNK2001 unresolved external symbol __imp___invalid_parameter UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_sysfilesystem.obj) 1 Error LNK2001 unresolved external symbol __imp___invalid_parameter UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_syscond.obj) 1 Error LNK2001 unresolved external symbol __imp___invalid_parameter UrhoSharp.UWP C:\dev\urho\Urho3D\Urho3D_UWP\MonoUrho.UWP\SDL2.lib(SDL_winrtapp_direct3d.obj) 1

    These sort of make sense to me, since there's only one SDL2.lib and thus I assume it's a Debug build. I've been searching for a release build, but I'm uncertain of where I can get it. Mainly because I'm not even sure where this copy of the lib came from or what version it is.

    Any help is appreciated.

    Thanks,
    Kyle

  • JinJiaHsuJinJiaHsu USMember ✭✭

    This issue still exists on UrhoSharp.Forms version 1.2.21

  • EgorBoEgorBo BYXamarin Team ✭✭✭

    Oh, the implementation for UWP was quite experimental, I am removing the stub2.lib stuff now.

  • Abhijeet_SuryaAbhijeet_Surya USMember ✭✭✭

    Still exists in 1.5.10

Sign In or Register to comment.