Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange debug output in app since upgrade to Visual Studio 2017 15.3.0

My xamarin android app constantly prints the following debug output since I upgraded to Visual Studio 2017 15.3.0:

08-15 09:13:23.275 D/Mono    ( 3119): [0x9a5be930] worker unparking, timeout? no interrupted? no
08-15 09:13:23.275 D/Mono    ( 3119): [0x9a5be930] worker parking
08-15 09:13:23.275 D/Mono    ( 3119): [0x9a6bf930] worker unparking, timeout? no interrupted? no
08-15 09:13:23.275 D/Mono    ( 3119): [0x9a6bf930] worker parking
08-15 09:13:24.275 D/Mono    ( 3119): [0x9a87d930] worker unparking, timeout? no interrupted? no
08-15 09:13:24.276 D/Mono    ( 3119): [0x9a87d930] worker parking

The output is fairly regular, a few times a second.

What does it mean and what could cause it?

Edit: there is now a bug report regarding this

like image 342
thumbmunkeys Avatar asked Aug 15 '17 09:08

thumbmunkeys


1 Answers

I reported the issue to Microsoft. They replicated the issue and have opened a bug report. They also gave me the following work-around, which worked for me: (copied from their email)

.... It seems that the Mono default verbosity has either been changed or the [Mono] messages have been moved into the info loge verbosity level. Here is what I did in order to mitigate this issue:

For Android, I added a new .txt file to the project and set it’s Build Action to AndroidEnvironment. I then put in the following environmental variable:

MONO_LOG_LEVEL=error

After I re-built the solution, I no longer see the [Mono] messages being logged into the Application Output window.

Although I wasn’t not personally able to replicate this on iOS, the above workaround should work the same in iOS, however please let me know if it doesn’t. You can do this by right-clicking on your iOS project -> Options -> iOS Build. Then add the following in the mtouch input field:

--setenv:MONO_LOG_LEVEL=error

These additional Mono environmental variables will set the log verbosity to error, which should have the [Mono] logs get displayed in the output anymore.

You can change the log level to message if you like for added logging however error should be enough for debugging purposes.

If you would like more information on the logging verbosity level, the following documentation can help provide more insight into this: http://www.mono-project.com/docs/advanced/runtime/logging-runtime-events/#trace-levels

like image 116
Edward Caulfield Avatar answered Oct 31 '22 13:10

Edward Caulfield