ARKStatsExtractor
ARKStatsExtractor copied to clipboard
Speech recognition prevents app from loading under mono (linux)
Loading the app in mono with --verify-all crashes with the following error:
System.TypeLoadException: Error verifying ARKBreedingStats.Form1:Form1_Load (object,System.EventArgs): Could not load type ARKBreedingStats.SpeechRecognition at 0x0740
at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00022] in <e37081a3704b4473a59cdf5048ad96bc>:0
at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00029] in <e37081a3704b4473a59cdf5048ad96bc>:0
without verify-all the error is:
System.TypeLoadException: Could not load type 'ARKBreedingStats.SpeechRecognition' from assembly 'ARK Smart Breeding, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00022] in <e37081a3704b4473a59cdf5048ad96bc>:0
at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00029] in <e37081a3704b4473a59cdf5048ad96bc>:0
Hi, it seems the speech-recognition is not supported in mono, as it's using parts of the .NET-environment that are not available in mono.
Did you ever enable the speech-recognition in the settings or did this error appear from its own? If you enabled it, you could disable it manually by editing the settings-file of the tool, which should be somewhere at ~/.local/share/
on your computer (look for a folder named StatsExtractor
or similar). There's a file that contains all settings. Carefully look for the speech-recognition and change the value to false
.
The error appeared on its own when I upgraded from 0.21.4 to 0.22.2. The user.config file did not appear to contain any speech recognition related values, so I wasn't able to change them. Removing the file caused the program to crash with the same change, and not regenerate a new config.
Mono doesn't seem to support the speechrecognition modul. I'll see if I can add a check to prevent a crash.
I just wanted to say that this is still an issue as of 0.23.9.
Hi, sorry for not fixing this yet. I haven't found a way to check programmatically if a library is available or not, which would be the easiest way to fix this. Currently the only way I can think of is to manually remove the speech-recognition-class from the application and recompile it anew. If I cannot find another solution, I might do this, but probably not for every release.
I might have found a solution. I'll include it in the next release, I'll let you know when it's released.
Hi, I released a new version that may solve this, but I wasn't able to test it.
Tested with the latest release 0.23.11. Error is still present. When launched with mono:
System.TypeLoadException: Could not load type of field 'ARKBreedingStats.SpeechRecognition:recognizer' (2) due to: Could not load file or assembly 'System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. assembly:System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 type:<unknown type> member:<none> at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x0001f] in <a98ec586cd3441aeb3d7919d9ad41ff2>:0 at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00023] in <a98ec586cd3441aeb3d7919d9ad41ff2>:0
And with mono --verify-all:
System.TypeLoadException: Error verifying ARKBreedingStats.Form1:Form1_Load (object,System.EventArgs): Could not load type ARKBreedingStats.SpeechRecognition at 0x079f at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x0001f] in <a98ec586cd3441aeb3d7919d9ad41ff2>:0 at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00023] in <a98ec586cd3441aeb3d7919d9ad41ff2>:0
Thanks for the feedback. I'll see if I can fix it in another way.
I tried to remove speech from the program and run it under ubuntu with mono but it seems UI is now broken too:
so I dont think it is possible to use this application under linux anymore
@hudi1 if you edit the code to remove the SpeechRecognition (~2min of work), compile it with mono and then run it with Wine it works ;)
hm I did not tried it with wine. I just tried it with mono an UI seem broken. But I will try it thx for tip
It's been nearly a year since the last update. Has anyone got this working with wine? Crossover? Or is there SpeechRecognition in mono now?
I have gotten the current version working under wine, without having to remove/recompile anything. To do so, create a new 32-bit wine prefix
WINEPREFIX=yourprefix WINEARCH=32 wineboot -u
Then using winetricks install .net, ole32, and gdi
WINEPREFIX=yourprefix WINARCH=win32 winetricks dotnet472 ole32 gdiplus
You should be able to run it using this prefix now.
I am still missing unicode symbols for some things like gender. I don't know what fonts I have to install to fix that, but it's not included in "allfonts" installed by wine tricks. At least it works though.