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

Linux - Does not run with Mono - DllNotFoundException #38

Closed
bitrot-alpha opened this issue Jan 7, 2023 · 4 comments
Closed

Linux - Does not run with Mono - DllNotFoundException #38

bitrot-alpha opened this issue Jan 7, 2023 · 4 comments

Comments

@bitrot-alpha
Copy link
Contributor

bitrot-alpha commented Jan 7, 2023

I'm guessing something's wrong with Fedora and Mono, because I was able to run MemcardRex in OpenSUSE last I checked.

I followed the instructions on mono-project.com to install the latest stable Mono per MONO.md

[arashi@control-bureau MemcardRex 1.9.cd98032]$ mono --version
Mono JIT compiler version 6.12.0.107 (tarball Wed Dec  9 21:44:58 UTC 2020)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	Interpreter:   yes
	LLVM:          yes(610)
	Suspend:       hybrid
	GC:            sgen (concurrent by default)

When running mono MemcardRex.exe with the latest release, I get this error log:

[arashi@control-bureau MemcardRex 1.9.cd98032]$ mono MemcardRex.exe
Gtk-Message: 01:07:33.511: Failed to load module "pk-gtk-module"
System.DllNotFoundException: dwmapi.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) MemcardRex.glassSupport.DwmIsCompositionEnabled(bool&)
  at MemcardRex.glassSupport.isGlassSupported () [0x00026] in <51d023b1534a4ef9bc3b0d1191357c9c>:0 
  at MemcardRex.mainWindow.applyGlass () [0x00030] in <51d023b1534a4ef9bc3b0d1191357c9c>:0 
  at MemcardRex.mainWindow.applySettings () [0x00034] in <51d023b1534a4ef9bc3b0d1191357c9c>:0 
  at MemcardRex.mainWindow.loadProgramSettings () [0x001f1] in <51d023b1534a4ef9bc3b0d1191357c9c>:0 
  at MemcardRex.mainWindow.Form1_Load (System.Object sender, System.EventArgs e) [0x0009c] in <51d023b1534a4ef9bc3b0d1191357c9c>:0 
  at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x0001f] in <eaa3af9f3e15467aba111734e9f9f2f7>:0 
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00023] in <eaa3af9f3e15467aba111734e9f9f2f7>:0 

Running mono in debug mode and redirecting terminal output with MONO_LOG_LEVEL=debug mono MemcardRex.exe > log.txt I get this text file:
log.txt

After installing the gtk2-engines package, putting /usr/lib64/gtk-2.0/modules/ and /usr/lib64/gtk-2.0/modules/ into a file at /etc/ld.so.conf.d/, and running ldconfig:

[arashi@control-bureau MemcardRex 1.9.cd98032]$ mono MemcardRex.exe
System.DllNotFoundException: dwmapi.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) MemcardRex.glassSupport.DwmIsCompositionEnabled(bool&)
  at MemcardRex.glassSupport.isGlassSupported () [0x00026] in <51d023b1534a4ef9bc3b0d1191357c9c>:0 
  at MemcardRex.mainWindow.applyGlass () [0x00030] in <51d023b1534a4ef9bc3b0d1191357c9c>:0 
  at MemcardRex.mainWindow.applySettings () [0x00034] in <51d023b1534a4ef9bc3b0d1191357c9c>:0 
  at MemcardRex.mainWindow.loadProgramSettings () [0x001f1] in <51d023b1534a4ef9bc3b0d1191357c9c>:0 
  at MemcardRex.mainWindow.Form1_Load (System.Object sender, System.EventArgs e) [0x0009c] in <51d023b1534a4ef9bc3b0d1191357c9c>:0 
  at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x0001f] in <eaa3af9f3e15467aba111734e9f9f2f7>:0 
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00023] in <eaa3af9f3e15467aba111734e9f9f2f7>:0

As I understand it, dwmapi.dll should be provided by Mono. What's going on?
Thanks.

@bitrot-alpha bitrot-alpha changed the title Linux - Does not run with Mono in Fedora 36 - DllNotFoundException Linux - Does not run with Mono - DllNotFoundException Jan 7, 2023
@bitrot-alpha
Copy link
Contributor Author

Update - just tried running MemcardRex on my OpenSUSE Tumbleweed machine and it doesn't work on there either

@ShendoXT
Copy link
Owner

ShendoXT commented Jan 8, 2023

Hm... I think it's only needed for the transparent glass effect on win Vista/7.
Check out this file: https://github.com/ShendoXT/memcardrex/blob/master/MemcardRex/Extras/glassSupport.cs

Maybe it's time to finally get on without it, doesn't look good on modern Windows and is disabled anyway for 10/11...

@ShendoXT
Copy link
Owner

ShendoXT commented Jan 8, 2023

Check out the c391282, I've removed glass altogether and made a binary release while I'm at it.

@bitrot-alpha
Copy link
Contributor Author

RIP Windows Aero.

Both binary release and building from source run on Linux just fine now!

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

No branches or pull requests

2 participants