GNOME Bugzilla – Bug 616506
Crash changing next track
Last modified: 2010-08-17 06:47:04 UTC
I have changed to next track with the tray icon, and Banshee has closed. It seems that the crash is when it tries to log something related to ReplyGain, because it is what comes after the last sentence in previous changes.
Created attachment 159326 [details] Trace of the crash
From the stacktrace, the crash does happen when trying to log something, but in fact it happens when setting the color on the console output for that log. Are you able to reproduce the problem or was it just a one time thing ? The log related to ReplayGain you mention, which level is it (debug, info, warning or error ) ? Do you have other log line with that same level that look fine ?
Created attachment 159371 [details] [review] patch Maybe the `message` variable in src/Backends/Banshee.GStreamer/Banshee.GStreamer/Service.cs contains a C# formatter string like '{1}'? Can you apply this patch, and `make run` and reproduce the bug and attach the terminal output? It should print out the log msg using Console.WriteLine directly so we can see what the input is that's causing the crash in Log.
It was a one-time thing, I have not been able to reproduce it. The log message that should have appeared (according to the earlier messages) is this (with the patch applied): NativeLogHandler, message: (libbanshee:player) scaled volume: 0,56 (ReplayGain) * 1,00 (User) = 0,56 [16 Debug 16:57:23.302] (libbanshee:player) scaled volume: 0,56 (ReplayGain) * 1,00 (User) = 0,56 I have tried with the same tracks I was playing then, but no crash.
Uff, I have had the same crash with the same log, but with the patch reverted :( It has to be a weird thing if it happens so rarely. I promise I will keep the patch for the next time.
Well, it crashed again. This is the message given by the patch: [1 Debug 17:40:03.288] Player state change: Playing -> Idle [1 Debug 17:40:03.290] Player state change: Idle -> Loading NativeLogHandler, message: (libbanshee:player) [ReplayGain] Added gain: -3,73 to history. This message is not very special, because for example several lines before there is the same message, for the previous song: [1 Debug 17:39:59.198] Player state change: Playing -> Idle [1 Debug 17:39:59.205] Querying model for track to play in song:Next mode [1 Debug 17:39:59.210] Player state change: Idle -> Loading NativeLogHandler, message: (libbanshee:player) [ReplayGain] Added gain: -3,68 to history. [15 Debug 17:39:59.246] (libbanshee:player) [ReplayGain] Added gain: -3,68 to history. Any idea?
Created attachment 161560 [details] test program Actually looks like a Mono bug - int.ToString probably shouldn't be crashing like that. Can you download the attached program and run it with `mono t.exe` and see if it crashes? I runs String.Format ("\x001b[{0}m", 94); (which I believe is exactly what's crashing for you) 5,000,000 times.
No luck, I have run it ten times and got no crash :( My system is Fedora 12, with the following Mono version: Mono JIT compiler version 2.4.3.1 (tarball Thu Jan 14 10:27:43 UTC 2010) Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com TLS: __thread GC: Included Boehm (with typed GC) SIGSEGV: altstack Notifications: epoll Architecture: x86 Disabled: none
I've filed this against Mono: https://bugzilla.novell.com/show_bug.cgi?id=607585
Hey Benjamín, can you run `csharp` from a terminal, and then paste in "String.Format ("\x001b[{0}m", 94);" and hit enter and see if it works? I realized I gave you a binary - perhaps the issue is actually in the compiler?
Well, I have been using Banshee intensively last month and had no crash again. I suppose it has been solved with the last Mono updates. Anyway, there it goes the output: [benja@localhost ~]$ csharp Mono C# Shell, type "help;" for help Enter statements below. csharp> String.Format ("\x001b[{0}m", 94); "" csharp> The second quotation mark and the last line are blue.