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 616506 - Crash changing next track
Crash changing next track
Status: RESOLVED NOTGNOME
Product: banshee
Classification: Other
Component: general
git master
Other Linux
: Normal critical
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-04-22 12:14 UTC by Benjamín Valero Espinosa
Modified: 2010-08-17 06:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Trace of the crash (2.35 KB, text/plain)
2010-04-22 12:14 UTC, Benjamín Valero Espinosa
  Details
patch (592 bytes, patch)
2010-04-22 22:21 UTC, Gabriel Burt
none Details | Review
test program (3.00 KB, application/octet-stream)
2010-05-20 16:05 UTC, Gabriel Burt
  Details

Description Benjamín Valero Espinosa 2010-04-22 12:14:00 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.
Comment 1 Benjamín Valero Espinosa 2010-04-22 12:14:38 UTC
Created attachment 159326 [details]
Trace of the crash
Comment 2 Bertrand Lorentz 2010-04-22 19:57:37 UTC
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 ?
Comment 3 Gabriel Burt 2010-04-22 22:21:10 UTC
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.
Comment 4 Benjamín Valero Espinosa 2010-04-27 15:04:32 UTC
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.
Comment 5 Benjamín Valero Espinosa 2010-05-12 15:53:38 UTC
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.
Comment 6 Benjamín Valero Espinosa 2010-05-20 15:50:34 UTC
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?
Comment 7 Gabriel Burt 2010-05-20 16:05:40 UTC
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.
Comment 8 Benjamín Valero Espinosa 2010-05-20 16:15:10 UTC
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
Comment 9 Gabriel Burt 2010-05-20 16:33:53 UTC
I've filed this against Mono: https://bugzilla.novell.com/show_bug.cgi?id=607585
Comment 10 Gabriel Burt 2010-08-16 22:04:30 UTC
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?
Comment 11 Benjamín Valero Espinosa 2010-08-17 06:47:04 UTC
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.