VR application (Unity with TrinusVR lib) Windows build: Connection reset - c#

I am developing a VR application using Unity 2018.2.8f1 and the TrinusVR lib (a framework that does serverside rendering). When I press play in the editor or build for Linux it works as expected. However, when using the Windows build, only about one frame gets transmitted to the client, then the connection is reset. On the client it shows the errors:
Error streaming video error: java.net.SocketException: Connection reset
Error Error delivering sensor data: java.net.SocketException: Connection reset
Digging into into the logs of the server it seems that this reset is caused by a null reference exception:
Disconnected (Reason: ERROR:ERR_IMG_PROC:Could not deliver frame to client.
System.TypeInitializationException: The type initializer for 'ManagedToNativeWrapper' threw an exception. --->
System.NullReferenceException: Object reference not set to an instance of an object
at System.Drawing.ComIStreamMarshaler+ManagedToNativeWrapper..cctor () [0x00049] in :0`
Does somebody know, what is wrong here? Has anybody seen this problem before?
You can find the complete log files (Windows 10 server and android 7 client) here:
https://transfernow.net/419cp2m92898
Thank you

Turns out that it actually is a problem of the .NET version on Windows as the trinus lib is made for an older version. Setting the right parameters in Edit > Project Settings > Player, section Other Settings, resolves:
Scripting Runtime Version: .NET 3.5 Equivalent
Api Compatibility Level: .NET 2.0

Related

Unable to load libgdiplus in Signal R web application with web sockets (Mac OS)

I downloaded this repository from GitHub and try to run it on my MacOS laptop. It uses Signal R and web sockets.
It builds, it starts, it works
But when I try to open web socket I get an error:
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
An unhandled exception has occurred while executing the request.
System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'libgdiplus' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(liblibgdiplus, 0x0001): tried: 'liblibgdiplus' (no such file), '/System/Volumes/Preboot/Cryptexes/OSliblibgdiplus' (no such file), '/usr/lib/liblibgdiplus' (no such file, not in dyld cache), 'liblibgdiplus' (no such file), '/usr/local/lib/liblibgdiplus' (no such file), '/usr/lib/liblibgdiplus' (no such file, not in dyld cache)
at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)
at System.Drawing.SafeNativeMethods.Gdip..cctor()
--- End of inner exception stack trace ---
I did brew install mono-libgdiplus but it didn't help.
I'm new to C# and Microsoft frameworks so what else can I do? (MacOS Ventura, Apple M1)
Solved: System.Drawing is not supported on my MacOS, so the peaces of code where this library is using should not be executed.
While the project you played with was very well designed for cross platform, it was unfortunately developed before .NET 6 introduced an important breaking change, that System.Drawing related API is only supported on Windows.
Like you found out, commenting out the lines related to System.Drawing works. But if you want similar functionalities, you will have to rewrite that part with another drawing library. There are many such options out there if search engines are used.

An error has occurred during web site deployment in App Service Editor

I made some changes in the QnAMakerBasDialog.cs file, in trying to edit the default threshold. I did not change any other thing. When I tried deploying my changes at first, I was not getting the expected response and so I went back the editor to reverse my changes. It was at this point I started getting this error message.
I need help in reversing all changes if possible but most expecially in getting "test web chart" and all my channels working again.
Please see error message error:
kindly note that I tried this in the kudu console but still got the same error message
\> build.cmd
1 file(s) copied.
Installing Kudu Sync
D:\local\AppData\npm\kudusync -> D:\local\AppData\npm\node_modules\kudusync\bin\kudusync
+ kudusync#0.3.0
added 7 packages from 8 contributors in 3.22s
Handling ASP.NET Core Web Application deployment.
Failed to add 'D:\local\UserProfile\.dotnet\tools' to the PATH environment variable. Add this directory to your PATH to use tools installed with 'dotnet tool install'.
Welcome to .NET Core 3.1!
---------------------
SDK Version: 3.1.301
Telemetry
---------
The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
----------------
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Find out what's new: https://aka.ms/dotnet-whats-new
Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
Write your first app: https://aka.ms/first-net-core-app
--------------------------------------------------------------------------------------
Unhandled exception. System.ComponentModel.Win32Exception (5): Access is denied.
at System.Diagnostics.Process.set_PriorityClassCore(ProcessPriorityClass value)
at System.Diagnostics.Process.set_PriorityClass(ProcessPriorityClass value)
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
at Microsoft.Build.CommandLine.MSBuildApp.Main(String[] args)
MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
System.ComponentModel.Win32Exception (5): Access is denied.
at System.Diagnostics.Process.set_PriorityClassCore(ProcessPriorityClass value)
at System.Diagnostics.Process.set_PriorityClass(ProcessPriorityClass value)
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
Failed exitCode=-532462766, command=dotnet restore "QnABot.sln"
An error has occurred during web site deployment.
Surprisingly, I also encountered this problem. I also encountered this problem in Buid after modifying the Azure Bot code!
Even with this error, my build is successful

<SOLVED> Unity & MySQL | Scripts work in editor but not in build

I have created a simple Unity application that uses MySQL. The app works perfectly in the Unity Editor, however when I build it for PC Standalone or Android, it does not work.
After checking the log files, the following exception has been thrown
PlatformNotSupportedException: Operation is not supported on this platform.
at MySql.Data.MySqlClient.MySqlConfiguration..cctor () [0x00000] in <5bca8ad0d7cb4bf194403b342b8f0938>:0
Rethrow as TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.MySqlConfiguration' threw an exception.
at MySql.Data.MySqlClient.Replication.ReplicationManager..cctor () [0x0001e] in <5bca8ad0d7cb4bf194403b342b8f0938>:0
Rethrow as TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.Replication.ReplicationManager' threw an exception.
at MySql.Data.MySqlClient.MySqlConnection.Open () [0x002be] in <5bca8ad0d7cb4bf194403b342b8f0938>:0
at Main.Start () [0x0008b] in <7257cb8e307a4c4d92671557aa30bf0e>:0
at Main.Update () [0x0000d] in <7257cb8e307a4c4d92671557aa30bf0e>:0
How can MySQL not be supported on either of my platforms (both Android and PC Standalone) yet it works in Unity editor? Furthermore, I have recently created another game that also uses MySQL and works fine on all platforms. What could be the issue?
Feel free to ask me for code files, Unity files or whatever you think you need to help me solve the issue. Thank you!
Edit: Solved | just changed the API compatibility settings to .NET 4.x
I think this because of API Compatibility Level, here are the references to similar problems:
link 1
link 2
API Compatibility Level can be found in:
File > Build Settings > Player Settings > Player > Configuration

Can't build in batchmode on remote linux machine

I have an unusual problem when build on remote machine.
Target is Android and i try build application on remote server (Debian 3.16.7-ckt20-1+deb8u4, unity: unity-editor-5.3.5f1+20160525_amd64.deb).
And what I see:
/opt/Unity/Editor/./Unity
-batchmode
-projectPath
/home/jenkins/sources/client
-executeMethod
Assets.Scripts.Other.Git.BuildTools.BuildProject
-buildLocation
/home/jenkins/builds
-buildTarget
Android
-contour
Developer
-builderName
Jenkins
-quit
-logFile
/home/jenkins/log/01.log
Successfully changed project path to: /home/jenkins/sources/client
/home/jenkins/sources/client
UpdateMenuTitleForLanguage: 10
Using libudev for joystick management
Importing game controller configs
Loading GUID <-> Path mappings...0.000212 seconds
Loading Asset Database...0.000523 seconds
FMOD failed to get number of drivers ... An error occured that wasn't supposed to. Contact support.
(Filename: /home/builduser/buildslave/unity/build/Runtime/Audio/AudioManager.cpp Line: 533)
Audio: FMOD Profiler initialized on port 54900
AudioManager: Using Unknown: NoSound Driver
AssetDatabase consistency checks...0.048590 seconds
Build target platform 'Android' could not be used.
(Filename: /home/builduser/buildslave/unity/build/Editor/Src/Application.cpp Line: 673)
Aborting batchmode due to failure:
Fatal error! Build target platform 'Android' could not be used.
It looks as if the sound card is not installed on the remote machine, but it was found there. Like the the video card, too.
Google advised to install pulseaudio...
Result log below:
mono profile = '/opt/Unity/Editor/Data/Mono/lib/mono/2.0'
Initialize mono
Mono path[0] = '/opt/Unity/Editor/Data/Managed'
Mono path[1] = '/opt/Unity/Editor/Data/Mono/lib/mono/2.0'
Mono path[2] = '/opt/Unity/Editor/Data/UnityScript'
Mono path[3] = '/opt/Unity/Editor/Data/Mono/lib/mono/2.0'
Mono config path = '/opt/Unity/Editor/Data/Mono/etc'
Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56679
Forcing GfxDevice: Null
NullGfxDevice:
Version: NULL 1.0 [1.0]
Renderer: Null Device
Vendor: Unity Technologies
BATCHMODE ARGUMENTS:
/opt/Unity/Editor/./Unity
-batchmode
-nographics
-projectPath
/root/sources/client
-executeMethod
Assets.Scripts.Other.Git.BuildTools.BuildProject
-buildLocation
/root/builds
-buildTarget
Android
-contour
Developer
-builderName
Jenkins
-quit
-logFile
/root/builds/log_17.txt
Successfully changed project path to: /root/sources/client
/root/sources/client
UpdateMenuTitleForLanguage: 10
Using libudev for joystick management
Importing game controller configs
Loading GUID <-> Path mappings...0.000424 seconds
Loading Asset Database...0.074730 seconds
Audio: FMOD Profiler initialized on port 54900
AudioManager: Using ALSA: default
AssetDatabase consistency checks...3.354307 seconds
Build target platform 'Android' could not be used.
(Filename: /home/builduser/buildslave/unity/build/Editor/Src/Application.cpp Line: 673)
Aborting batchmode due to failure:
Fatal error! Build target platform 'Android' could not be used.
I think I have tried everything, but the result remains the same.
On the local machine with a similar configuration everything works fine.
Had met anyone else with a similar problem and if so, how you solved it?

MdilXapCompile.exe -- Windows Phone Device Deployment Error

I'm trying to deploy my appo to my Lumia 930 so I can test it on something other than an emulator, but every time I hit F5 it basses the build but crashes on deplyment.
MIDLXapCompile log file:
CrossGen failed
Error processing assembly C:\Users\mrrey_000\Dropbox\Dev\Windows Store\AnimeWatcherXYZ EX Summer\AnimeWatcherXYZ.WindowsPhone\obj\ARM\Debug\MSIL\Microsoft.Advertising.Mobile.Display.winmd
Raw error code: 2148733978
I tried deleting the reference to the Microsoft Advertising SDK and applying i oce again, I've also tried to remove the previous version of the app from my device - didn't help.
And yeah, I'm deploying a DEBUG package, not RELEASE.
How can I fix this?

Categories

Resources