After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608298 - [OS X] Banshee crashes on first run
[OS X] Banshee crashes on first run
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: general
1.5.3
Other Mac OS
: Normal normal
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-28 00:56 UTC by Brad Taylor
Modified: 2010-01-31 17:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Brad Taylor 2010-01-28 00:56:39 UTC
After copying the Banshee.app folder from the Banshee 1.5.3 dmg and running it, I get:


An unhandled exception was thrown: Extension node not found in path: /Banshee/ServiceManager/Service

  at Mono.Addins.ExtensionContext.AddExtensionNodeHandler (System.String path, Mono.Addins.ExtensionNodeEventHandler handler) [0x00000] in <filename unknown>:0 
  at Mono.Addins.AddinManager.AddExtensionNodeHandler (System.String path, Mono.Addins.ExtensionNodeEventHandler handler) [0x00000] in <filename unknown>:0 
  at Banshee.ServiceStack.ServiceManager.Run () [0x00000] in <filename unknown>:0 
  at Banshee.ServiceStack.Application.Run () [0x00000] in <filename unknown>:0 
  at Banshee.Gui.GtkBaseClient.Initialize (Boolean registerCommonServices) [0x00000] in <filename unknown>:0 
  at Banshee.Gui.GtkBaseClient..ctor (Boolean initializeDefault, System.String defaultIconName) [0x00000] in <filename unknown>:0 
  at Banshee.Gui.GtkBaseClient..ctor () [0x00000] in <filename unknown>:0 
  at Nereid.Client..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
Exception has been thrown by the target of an invocation.

  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0 
  at Banshee.Gui.GtkBaseClient.Startup () [0x00000] in <filename unknown>:0 
  at Hyena.Gui.CleanRoomStartup.Startup (Hyena.Gui.StartupInvocationHandler startup) [0x00000] in <filename unknown>:0 

.NET Version: 2.0.50727.1433
OS Version: Unix 10.2.0.0

Assembly Version Information:

pango-sharp (2.12.0.0)
System.Configuration (2.0.0.0)
Banshee.Widgets (1.5.0.0)
Mono.Media (1.5.0.0)
System.Transactions (2.0.0.0)
NDesk.DBus.GLib (1.0.0.0)
System.Core (3.5.0.0)
Mono.Cairo (2.0.0.0)
System.Data (2.0.0.0)
Mono.Data.Sqlite (1.5.0.0)
NDesk.DBus (1.0.0.0)
System.Xml (2.0.0.0)
gdk-sharp (2.12.0.0)
Mono.Addins (0.4.0.0)
atk-sharp (2.12.0.0)
glib-sharp (2.12.0.0)
Hyena.Gui (1.5.0.0)
Mono.Posix (2.0.0.0)
gtk-sharp (2.12.0.0)
Banshee.Core (1.5.0.0)
Hyena (1.5.0.0)
System (2.0.0.0)
Banshee.Services (1.5.0.0)
Banshee.ThickClient (1.5.0.0)
Nereid (1.5.0.0)
mscorlib (2.0.0.0)

Platform Information: 

Disribution Information:
Comment 1 Gabriel Burt 2010-01-28 01:14:44 UTC
You're not implying it works on the second run, are you?
Comment 2 Aaron Bockover 2010-01-28 01:47:13 UTC
Did you ever run the old builds of Banshee? MA is known to explode with old addin databases. Try nuking ~/.config/banshee-1/addin-db-*
Comment 3 Brad Taylor 2010-01-28 02:03:20 UTC
This was the first run on a clean Snow Leopard install.  rm -rf ~/.config did nothing.
Comment 4 Tom Byrne 2010-01-28 05:02:16 UTC
I get the same error with similar circumstances. Was running 1.4.3 and Mono 2.2 and it works fine. Downloaded Banshee 1.5.3 killed the old config files, copied it over and it won't run. Upgraded to Mono 2.6 and it runs (the second time) but won't play anything.
Comment 5 Brad Taylor 2010-01-28 20:02:34 UTC
Aaron and I diagnosed and fixed the problem today.

The problem was predicated by not having a system mono.  When Mono.Addins scans Banshee's DLLs on first run, it does this by invoking the dll (which happens to also have a Main method) via a shell exec.  This used the command 'mono' without rooted path to invoke Mono.Addins, and since the PATH was not correctly set, the mono that Banshee bundles could not be found.

The fix is to add:

PATH="/bin:/usr/bin:${BIN_DIR}"

after the Banshee/Mono/GStreamer environment section in /Applications/Banshee.app/Contents/MacOS/Banshee.
Comment 6 Philippe 2010-01-28 22:26:26 UTC
The fix doesn't work for me.
I've modified /Applications/Banshee.app/Contents/MacOS/Banshee to read:
...
# Banshee/Mono/GStreamer environment
export DYLD_LIBRARY_PATH="$LIB_DIR:$LIB_DIR/banshee-1"
export GST_PLUGIN_SYSTEM_PATH="$LIB_DIR/gstreamer-0.10"
export BANSHEE_CONFIG_DIR="$XDG_CONFIG_HOME/banshee-1"
BANSHEE_OPTIONS=""
BANSHEE_EXEC_NAME=Banshee
MONO_BIN="$BIN_DIR/mono"
MONO_EXE="$LIB_DIR/banshee-1/Nereid.exe"
MONO_OPTIONS=""

PATH="/bin:/usr/bin:${BIN_DIR}" # <---- ADDED THIS LINE

for arg in $*; do
	if [ "$arg" = --debug ]; then
....

I am still having the exact same stack trace as in comment 1.
Comment 7 Tom Byrne 2010-01-29 01:03:24 UTC
I have got it working with the latest MonoFramework (2.6) installed. From the previous comments it seems like it should work without, but I haven't been able to get it to. 

Also is the location that Philippe mentions correct?
Comment 8 Brad Taylor 2010-01-29 01:37:43 UTC
(In reply to comment #6)
> The fix doesn't work for me.
> I've modified /Applications/Banshee.app/Contents/MacOS/Banshee to read:
> ...
> # Banshee/Mono/GStreamer environment
> export DYLD_LIBRARY_PATH="$LIB_DIR:$LIB_DIR/banshee-1"
> export GST_PLUGIN_SYSTEM_PATH="$LIB_DIR/gstreamer-0.10"
> export BANSHEE_CONFIG_DIR="$XDG_CONFIG_HOME/banshee-1"
> BANSHEE_OPTIONS=""
> BANSHEE_EXEC_NAME=Banshee
> MONO_BIN="$BIN_DIR/mono"
> MONO_EXE="$LIB_DIR/banshee-1/Nereid.exe"
> MONO_OPTIONS=""
> 
> PATH="/bin:/usr/bin:${BIN_DIR}" # <---- ADDED THIS LINE
> 
> for arg in $*; do
>     if [ "$arg" = --debug ]; then
> ....
> 
> I am still having the exact same stack trace as in comment 1.

Try rm -rf ~/.config/banshee-1/addin-db* (from comment #2) as well.
Comment 9 Aaron Bockover 2010-01-29 03:35:56 UTC
These bugs should be fixed now. I have respun the DMG image for the 1.5.3 release that should address the PATH issue, and an additional Mono.Addins issue.

Please download the respun image:
http://download.banshee-project.org/banshee/stable/1.5.3/banshee-1-1.5.3.macosx.intel.dmg

Additionally you may want to run rm -rf ~/.config/banshee-1/addin-db* as has been stated a few times before. This will clear the Mono.Addins database, which is likely invalid due to this bug.

http://git.gnome.org/browse/banshee/commit/?id=f30dd80438869a2c6654a1d339beb840f20f7b13

Let me reiterate though - Banshee *should not* require you to install the Mono framework. If installing that "fixes" a bug, then that means there's a real bug in the Banshee bundle, so please report that.

If you have installed the Mono framework just to work around this bug, please remove the Mono framework if you do not need it for other reasons.
Comment 10 Aaron Bockover 2010-01-29 04:19:00 UTC
*** Bug 608384 has been marked as a duplicate of this bug. ***
Comment 11 Philippe 2010-01-29 06:57:16 UTC
Thanks, I downloaded the new dmg and deleted ~/.config/banshee-1/.
But I still get the same stack trace...

(BTW: Only deleting ~/.config/banshee-1/addin-db* didn't work. The window showing the exception had boxes [▯] instead of letters. Like it couldn't find the font or something. Deleting ~/.config/banshee-1/ fixed that)
Comment 12 Philippe 2010-01-29 09:51:47 UTC
Reading through the comments, I see that one particularity was not mentioned yet.
The window with the error described above disappears after about 2 seconds on my computer.
This behavior was already mentioned here: https://bugzilla.gnome.org/show_bug.cgi?id=597768#c11

When I run Banshee in the Terminal (philippe@Gogol:/Applications/Banshee.app> Contents/MacOS/Banshee), I get this stack trace after the other stack trace above:
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.NullReferenceException: Object reference not set to an instance of an object
  at Banshee.Metadata.SaveTrackMetadataService.<SaveTrackMetadataService>m__2D () [0x00000] in <filename unknown>:0 
  at Banshee.Gui.GtkBaseClient+<RunTimeout>c__AnonStorey19.<>m__8C () [0x00000] in <filename unknown>:0 
  at GLib.Timeout+TimeoutProxy.Handler () [0x00000] in <filename unknown>:0 
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at GLib.Timeout+TimeoutProxy.Handler()
   at Gtk.Dialog.gtk_dialog_run(IntPtr )
   at Gtk.Dialog.Run()
   at Hyena.Gui.CleanRoomStartup.Startup(Hyena.Gui.StartupInvocationHandler startup)
   at Banshee.Gui.GtkBaseClient.Startup()
   at Banshee.Gui.GtkBaseClient.Startup(System.String[] args)
   at Nereid.Client.Main(System.String[] args)

Hope this helps...
Comment 13 Marcus P S 2010-01-30 17:57:40 UTC
I deleted ~/.config/banshee-1/*, downloaded the new DMG, and I still have the exact same problem: when I start Banshee from Finger, the icon appears on the dock for a moment, and then it vanishes (no error messages or anything).

From the command line I get

/Applications/Banshee.app/Contents/MacOS/Banshee: line 96: /Users/msilvaApplications/Banshee.app/Contents/Resources/bin/mono: No such file or directory
/Applications/Banshee.app/Contents/MacOS/Banshee: line 96: exec: /Users/msilvaApplications/Banshee.app/Contents/Resources/bin/mono: cannot execute: No such file or directory

which makes sense.  If I go to / and then run the script again (the script uses $PWD in the paths, which I don't understand, that is why I go to /), I get

[Info  12:54:11.074] Running Banshee 1.5.3: [source-tarball (darwin10.2.0, i386) @ 2010-01-27 16:23:20 EST]

(/Applications/Banshee.app/Contents/Resources/lib/banshee-1/Nereid.exe:915): GLib-WARNING **: g_set_prgname() called multiple times
Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: libgtk-quartz-2.0.0.dylib
  at (wrapper managed-to-native) Gtk.Application:gtk_init (int&,intptr&)
  at Gtk.Application.Init () [0x00000] in <filename unknown>:0 
  at Banshee.Gui.GtkBaseClient.InitializeGtk () [0x00000] in <filename unknown>:0 
  at Banshee.Gui.GtkBaseClient.Initialize (Boolean registerCommonServices) [0x00000] in <filename unknown>:0 
  at Banshee.Gui.GtkBaseClient..ctor (Boolean initializeDefault, System.String defaultIconName) [0x00000] in <filename unknown>:0 
  at Banshee.Gui.GtkBaseClient..ctor () [0x00000] in <filename unknown>:0 
  at Nereid.Client..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0 
  at Banshee.Gui.GtkBaseClient.Startup () [0x00000] in <filename unknown>:0 
  at Hyena.Gui.CleanRoomStartup.Startup (Hyena.Gui.StartupInvocationHandler startup) [0x00000] in <filename unknown>:0 

(/Applications/Banshee.app/Contents/Resources/lib/banshee-1/Nereid.exe:915): GLib-WARNING **: g_set_prgname() called multiple times

Unhandled Exception: System.DllNotFoundException: libgtk-quartz-2.0.0.dylib
  at (wrapper managed-to-native) Gtk.Application:gtk_init (int&,intptr&)
  at Gtk.Application.Init () [0x00000] in <filename unknown>:0 
  at Hyena.Gui.CleanRoomStartup.Startup (Hyena.Gui.StartupInvocationHandler startup) [0x00000] in <filename unknown>:0 
  at Banshee.Gui.GtkBaseClient.Startup[Client] () [0x00000] in <filename unknown>:0 
  at Banshee.Gui.GtkBaseClient.Startup[Client] (System.String[] args) [0x00000] in <filename unknown>:0 
  at Nereid.Client.Main (System.String[] args) [0x00000] in <filename unknown>:0 
/

I am on OSX 10.5.8
Comment 14 Marcus P S 2010-01-30 18:00:27 UTC
I should emphasize that libgtk-quartz-2.0.0.dylib is in fact in the Banshee.app/Contents/Resources/lib directory
Comment 15 Aaron Bockover 2010-01-30 18:20:47 UTC
The problems mentioned in comments #12 and #13 are completely separate issues. Philippe, Marcus - please file new bugs for these issues.
Comment 16 Marcus P S 2010-01-30 19:09:45 UTC
I am confused because bug 608384 (the bug I originally filed) was marked as a duplicate of this bug, then this bug has a status change to RESOLVED, but bug 608384 remains unfixed (which was the point of comment #13).

I will file another bug, if that is what it takes.
Comment 17 Aaron Bockover 2010-01-31 17:44:31 UTC
The first trace in bug 608384 is identical to the first trace in this bug. As this bug was filed first, the other bug was marked as a duplicate of this bug. Any other data on the other bug is irrelevant. New issue, new bug.

This bug is about PATH not being set correctly, and thus Mono.Addins not being able to invoke itself to scan assemblies.

If you file a new bug for the DllImport issue (which is likely a problem on 10.5 and I'm not seeing it on 10.6) we can work through the problem there.

Thanks!