dotnet40 app crash "Process exited with a Mono runtime"

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
whatbug
Level 3
Level 3
Posts: 67
Joined: Sun Mar 14, 2010 4:49 am

dotnet40 app crash "Process exited with a Mono runtime"

Post by whatbug »

Hi,
I've set-up a 32bit wine prefix with:
WINEARCH=win32 WINEPREFIX=~/.wine wine winecfg
with "Windows 7" selected.

In there I need to run an application that requires dotNetFx40_Client_x86_x64.
To make that possible I've uninstalled Mono 4.8 from wine with

WINEARCH=win32 WINEPREFIX=~/.wine wine uninstaller

And after that installed dotnet40 successfully .

When I run my application the following error appears:

0009:fixme:ntdll:EtwEventRegister ({e13b77a8-14b6-11de-8069-001b212b5009}, 0x550b9cc9, 0x5516e048, 0x55175990) stub.
0009:fixme:ntdll:EtwEventRegister ({e13b77a8-14b6-11de-8069-001b212b5009}, 0xabf0178, (nil), 0x32f3b8) stub.
* Assertion: should not be reached at /vagrant/mono/mono/metadata/marshal-ilgen.c:6161


abnormal program termination
0009:err:mscoree:expect_no_runtimes Process exited with a Mono runtime loaded.


I'm using wine 4.3-1 on the prefix I also installed vc_redist.x86 in Windows xp mode .

What could be the cause ?
I also noticed that every time after I install dotnet40 - mono 4.8 appears to come back on the uninstaller list - is that normal ?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: dotnet40 app crash "Process exited with a Mono runtime"

Post by Bob Wya »

@whatbug

MS .Net frameworks installation, under Wine, is still quite poorly supported.
The only "official way" to install these MS frameworks is to use a current version of the winetricks script.

Running:

Code: Select all

winetricks --version
should show version: 20190310

Otherwise see: Github: bobwya / winetricks : README.md ; to setup an auto-update for your winetrticks script(s)...

Than you can retest installing dotnet40, in a clean WINEPREFIX:

Code: Select all

winetricks dotnet40
Note that other, newer versions of dotnet4x, also integrate / install the earlier .Net framework 4.0 version.
So it might also be worth trying:

Code: Select all

winetricks dotnet472
if the dotnet40 verb causes you issues... Again this should be installed to a clean WINEPREFIX.

Bob
whatbug
Level 3
Level 3
Posts: 67
Joined: Sun Mar 14, 2010 4:49 am

Re: dotnet40 app crash "Process exited with a Mono runtime"

Post by whatbug »

Thanks, - using winetricks helped. But now I need to know - how is .net framework handled in wine ?
I'm asking because i need to have this app i different prefixes with different accounts in different setup... and no matter in what prefix i install they have same setting/same data. How is that possible ?
I even removed all prefixes removed wine (removed also lutris as it was connected to few) - and still after reinstalling the settings are still there ... what am I missing here ?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: dotnet40 app crash "Process exited with a Mono runtime"

Post by Bob Wya »

whatbug wrote:Thanks, - using winetricks helped. But now I need to know - how is .net framework handled in wine ?
I'm asking because i need to have this app i different prefixes with different accounts in different setup... and no matter in what prefix i install they have same setting/same data. How is that possible ?
I even removed all prefixes removed wine (removed also lutris as it was connected to few) - and still after reinstalling the settings are still there ... what am I missing here ?
@whatbug

In your shell please ensure that you export your WINEPREFIX env variable:

Code: Select all

export WINEPREFIX= < Linux absolute path >
correctly set.

Then (for a sanity) double check run:

Code: Select all

env | grep 'WINE'
to ensure you have the WINEPREFIX env variable set to the right path, for your current shell session.

If the WINEPREFIX env variable isn't set at any point, e.g.:
  • you log out
  • you switch terminal tabs
  • you start a new terminal session
  • you don't export your WINEPREFIX env variable (or don't specify the WINEPREFIX env variable before every Wine / winetricks -related command)
    etc.
during your setup of a new / existing WINEPREFIX...
Then Wine will fallback, automatically to using:

Code: Select all

~/.wine
# = "${HOME}/.wine"
the default Wine WINEPREFIX path.

Bob
whatbug
Level 3
Level 3
Posts: 67
Joined: Sun Mar 14, 2010 4:49 am

Re: dotnet40 app crash "Process exited with a Mono runtime"

Post by whatbug »

I followed on Your instructions - made the export. But still - even beeing all the time in the same terminal. When I create a new prefix the app remembers what was in the previous one...

Maybe lutris is making this issue ... but for now, any tips on how to remove wine completely ? maybe there is something more than just the package and default ~/.wine prefix ?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: dotnet40 app crash "Process exited with a Mono runtime"

Post by Bob Wya »

whatbug wrote:When I create a new prefix the app remembers what was in the previous one...
Que? I've no idea what you mean here.

How are you installing the application?

If it's with Lutris then that will probably fail... Hard...
Lutris has custom Wine installer scripts for all the games it supports.
So you won't be using a clean WINEPREFIX anymore.

Try running:

Code: Select all

WINEDEBUG=-all wine uninstaller --list
to see what is installed in each WINEPREFIX.

Also make sure that your WINEPREFIX's do not link back to your HOME directory, with:

Code: Select all

winetricks isolate_home
Wine stores file associations and icons (etc.) in:

Code: Select all

"${HOME}/.local/share"
E.g.

Code: Select all

"${HOME}/.local/share/mime/application"
These files are very unlikely to be relevant to your issue.
whatbug wrote:Maybe lutris is making this issue ... but for now, any tips on how to remove wine completely ? maybe there is something more than just the package and default ~/.wine prefix ?
Yes Lutris is not Wine. It is a Wine-wrapper...
As such it is not officially supported, on the WineHQ site, for this very reason (it will do WINEPREFIX management for you - which is opaque - unless you examine the Lutris installer scripts).
See: WineHQ FAQ: 8.7 I used a third party application (PlayOnLinux, WineBottler, etc.) to install or manage applications in Wine and need help

Knock yourself out.. If you want to reinstall your whole OS, be my guest (a common "Ubuntu-esque" solution to any kind of problem)... :lol:

Bob
whatbug
Level 3
Level 3
Posts: 67
Joined: Sun Mar 14, 2010 4:49 am

Re: dotnet40 app crash "Process exited with a Mono runtime"

Post by whatbug »

I must have misused "winetricks isolate_home" - as now when I tried again It works!
turned out that the shared data was in "My Documents" folder.

Ok the main issue is solved. Thanks!
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: dotnet40 app crash "Process exited with a Mono runtime"

Post by Bob Wya »

whatbug wrote:I must have misused "winetricks isolate_home" - as now when I tried again It works!
turned out that the shared data was in "My Documents" folder.

Ok the main issue is solved. Thanks!
I came up with the winetricks isolate_home verb...
I found the pre-existing winetricks sandbox verb had too many issues... Often you can want to access Steam libraries on a different mountpoint, outside of your current WINEPREFIX...
So, anyway, I'm happy this worked out for you! 8)

I did post a patchset (part of 3), to the Wine development mailing list, that would start to resolve Wine's stupid symlinking to HOME issue more satisfactorily, in July 2018...
Unfortunately the assigned reviewer (Huw Davies) has done diddly squat about actually reviewing my intial patchset, after initially critiquing my eariler submissions.
Doesn't really make me inclined to contribute as much to the project any more. Sadly this is a common experience...

Btw I've started to contribute more to winetricks instead. E.g. writing a dynamic BASH completion script for it.
Austin English (the current winetricks maintainer) is a great guy (I've met him at the 2017/2018 Wineconf's) and is very responsive to pull requests (much easier than an antiquated Wine email patch submission process)... 8)

Just my rambling personal opinions, $0.02, etc.! :lol:

Bob
Locked