Bug 1700892 - [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Error verifying KeePass.Program:Main
Summary: [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Error verifying ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: keepass
Version: 30
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Peter Oliver
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1705281 (view as bug list)
Depends On: 1704560
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-17 14:55 UTC by Tim Rhodes
Modified: 2019-05-19 06:13 UTC (History)
13 users (show)

Fixed In Version: keepass-2.41-3.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-19 06:13:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github rpm-software-management rpm issues 673 0 None closed Outdated mono-find-provides 2020-04-26 11:09:09 UTC

Description Tim Rhodes 2019-04-17 14:55:33 UTC
Description of problem:
Unhandled Exception when launching Keepass

[rhodes@fedora ~]$ keepass

Unhandled Exception:
System.TypeLoadException: Error verifying KeePass.Program:Main (string[]): Could not load type KeePass.Program at 0x0001
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Error verifying KeePass.Program:Main (string[]): Could not load type KeePass.Program at 0x0001

Version-Release number of selected component (if applicable):
keepass-2.41-2.fc30.x86_64
mono-core-5.18.1-2.fc30.x86_64

How reproducible:
Base install, install keepass, launch keepass

Steps to Reproduce:
1. Base install
2. Install keepass
3. Launch keepass

Actual results:
Unhandled Exception:
System.TypeLoadException: Error verifying KeePass.Program:Main (string[]): Could not load type KeePass.Program at 0x0001
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Error verifying KeePass.Program:Main (string[]): Could not load type KeePass.Program at 0x0001

Expected results:
Keepass GUI window

Additional info:
This may be an issue with the mono package, which keepass run under.

Comment 1 Peter Oliver 2019-04-17 18:04:18 UTC
Workaround:

    sudo yum install mono-winforms

Comment 2 Peter Oliver 2019-04-17 18:13:08 UTC
In Fedora 30, package mono-devel provides "mono(System.Windows.Forms) = 4.0.0.0" (amongst others).  This doesn't seem correct, and causes mono-devel to be installed in place of mono-winforms.

Comment 3 Tim Rhodes 2019-04-17 18:18:34 UTC
Installing mono-winforms has resolved the issue.  My original keepass install did pick up mono-devel, but not mono-winforms.  Resolving the dependency should be the solution.  Thanks...

Comment 4 Peter Oliver 2019-04-18 12:16:35 UTC
It seemed to me that dropping the patch mono-5.10.0-find-provides.patch should fix this, but I found that that didn't help.

The spec file calls both /usr/lib/rpm/redhat/find-provides and %{buildroot}%{_bindir}/mono-find-provides to gather provides.  It turns out that /usr/lib/rpm/redhat/find-provides calls /usr/lib/rpm/rpmdeps which calls /usr/lib/rpm/mono-find-provides.  This /usr/lib/rpm/mono-find-provides is bundled with the RPM source and hasn't been updated for a decade: https://github.com/rpm-software-management/rpm/blob/master/scripts/mono-find-provides

Comment 5 Timotheus Pokorra 2019-04-27 05:54:57 UTC
mono-find-provides is really old, and probably needs a rewrite.
directhex, the Debian packager at Microsoft, has complained about mono-find-provides before because it makes it difficult to build the Xamarin Mono rpm packages. I cannot find a quote anymore.

I think this is how upstream builds Mono for Fedora/RHEL/CentOS: https://github.com/mono/linux-packaging-mono/blob/centos/mono-core.spec
It does use mono-find-provides, but also hard codes a lot of Provides.

For this specific issue with keepass, I recommend to add a specific Requires for the mono-winforms package instead of or additional to mono(System.Windows.Forms).

Comment 6 Peter Oliver 2019-04-29 00:19:00 UTC
(In reply to Timotheus Pokorra from comment #5)
> mono-find-provides is really old, and probably needs a rewrite.
> directhex, the Debian packager at Microsoft, has complained about
> mono-find-provides before because it makes it difficult to build the Xamarin
> Mono rpm packages. I cannot find a quote anymore.

Seems relevant: https://github.com/mono/mono/issues/14090

> For this specific issue with keepass, I recommend to add a specific Requires
> for the mono-winforms package instead of or additional to
> mono(System.Windows.Forms).

I will do that, but I imagine that other packages will run into similar problems.

Comment 7 Timotheus Pokorra 2019-04-30 04:35:57 UTC
I realized now, that the problem is not in the mono-find-provides script.
I created a new bug 1704560 for Mono.

Comment 8 Peter Oliver 2019-05-01 23:03:40 UTC
*** Bug 1705281 has been marked as a duplicate of this bug. ***

Comment 9 Fedora Update System 2019-05-10 12:25:08 UTC
keepass-2.41-3.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-ca279b1c50

Comment 10 Fedora Update System 2019-05-11 02:10:40 UTC
keepass-2.41-3.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-ca279b1c50

Comment 11 Fedora Update System 2019-05-19 06:13:39 UTC
keepass-2.41-3.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.