Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speech recognition prevents app from loading under mono (linux) #237

Open
TheFeshy opened this issue Apr 3, 2017 · 14 comments
Open

Speech recognition prevents app from loading under mono (linux) #237

TheFeshy opened this issue Apr 3, 2017 · 14 comments
Labels

Comments

@TheFeshy
Copy link

TheFeshy commented Apr 3, 2017

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 
@cadon
Copy link
Owner

cadon commented Apr 3, 2017

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.

@TheFeshy
Copy link
Author

TheFeshy commented Apr 5, 2017

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.

@cadon cadon added the bug label May 1, 2017
@cadon
Copy link
Owner

cadon commented May 1, 2017

Mono doesn't seem to support the speechrecognition modul. I'll see if I can add a check to prevent a crash.

@TheFeshy
Copy link
Author

TheFeshy commented Jul 8, 2017

I just wanted to say that this is still an issue as of 0.23.9.

@cadon
Copy link
Owner

cadon commented Jul 9, 2017

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.

@cadon
Copy link
Owner

cadon commented Jul 9, 2017

I might have found a solution. I'll include it in the next release, I'll let you know when it's released.

@cadon
Copy link
Owner

cadon commented Jul 16, 2017

Hi, I released a new version that may solve this, but I wasn't able to test it.

@Red-Pyramid
Copy link

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

@cadon
Copy link
Owner

cadon commented Jul 23, 2017

Thanks for the feedback. I'll see if I can fix it in another way.

@hudi1
Copy link

hudi1 commented Aug 10, 2017

I tried to remove speech from the program and run it under ubuntu with mono but it seems UI is now broken too:
statextractor
so I dont think it is possible to use this application under linux anymore

@rubensayshi
Copy link

@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 ;)

@hudi1
Copy link

hudi1 commented Sep 4, 2017

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

@lineber
Copy link

lineber commented Aug 31, 2018

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?

@TheFeshy
Copy link
Author

TheFeshy commented Dec 8, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants