Bug 53154 - Banshee does not start with Mono 4.8 due to a dbus issue
Summary: Banshee does not start with Mono 4.8 due to a dbus issue
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: 4.8.0 (C9)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-03-08 13:57 UTC by Timotheus Pokorra
Modified: 2017-06-12 12:32 UTC (History)
6 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Timotheus Pokorra 2017-03-08 13:57:06 UTC
There seem to be various reports about Banshee working fine with Mono 4.6 but failing to start with Mono 4.8:

for example:
http://askubuntu.com/questions/886912/banshee-crash-on-startup
http://www.linuxmintusers.de/index.php?topic=40816.0
https://bugzilla.redhat.com/show_bug.cgi?id=1426454

System.MethodAccessException: Method `IBusProxy:.ctor ()' is inaccessible from method `NDesk.DBus.BusObject:.ctor()

for full stacktrace see https://bugzilla.redhat.com/attachment.cgi?id=1257070

Is it a bug?
Is it an incompatibility with a dbus package?
Comment 1 martadinata666 2017-03-24 00:31:14 UTC
also got error, and reproduceable
mono 4.8.0.495

[ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MethodAccessException: Method `IBusProxy:.ctor ()' is inaccessible from method `NDesk.DBus.BusObject:.ctor ()'
Comment 2 Alexander Ivanov 2017-04-11 07:33:29 UTC
Got same error with other project using NDesk.DBus.dll
Comment 3 Ondrej Myska 2017-06-12 12:32:25 UTC
Same error on Mono 5.0.1.1 (custom arm build), but I think it is not a Mono issue.

https://bitbucket.org/hindlemail/dbus-sharp/src/2221231fcae6a115ac72ddcf96d76881f88e57ac/src/TypeImplementer.cs?at=default&fileviewer=file-view-default

if (declType.IsInterface)
  parentType = typeof (BusObject);
else
  parentType = declType;

TypeBuilder typeB = modB.DefineType (proxyName, TypeAttributes.Class | TypeAttributes.Public, parentType);


if declaring type is interface, parentType is set to BusObject type which has default (internal) accessibility.
 
The root of issue is you try to construct public type with base type with default (internal) accessibility.

Mono prior to version 4.8 had probably issue which was fixed and it brakes NDesk.DBus.dll.

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