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 316922 - The sound volume applet's slider tends to go down after push it up
The sound volume applet's slider tends to go down after push it up
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: mixer
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
: 317326 318991 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-09-22 10:06 UTC by Sebastien Bacher
Modified: 2005-10-18 00:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
A video of me trying to change the volume (179.20 KB, application/octet-stream)
2005-09-22 15:26 UTC, Julien Olivier
  Details
fix (2.27 KB, patch)
2005-09-30 20:09 UTC, Ronald Bultje
committed Details | Review
patch for 2.12.1 (2.76 KB, patch)
2005-10-16 18:04 UTC, Kazuki Shimura
none Details | Review

Description Sebastien Bacher 2005-09-22 10:06:36 UTC
This bug has been opened here: http://bugzilla.ubuntu.com/show_bug.cgi?id=14560

"In breezy, when I try to push the volume up using the sound volume applet's
slider, it keeps pulling down by itself. To be more precise, it seems that for
each step up, it does one step down on its own... You can easily see it by
trying to push the volume up using the mouse scroll button: you'll notice that
it is very difficult to reach the top of the slider because it keeps goind down
each time you move it up.

If you don't understand what I mean, maybe I can create a video using Istanbul
video recorder ?
...
I've been having this problem, too.

If, instead of using the mouse wheel, you simply click the + button on top and
hold down the button, you'll see that the slider does not move up, it's just
stuck there.

Scrolling the mouse wheel upward slowly one step at a time also causes the same
behavior.

Turning the volume down by any method seems to work perfectly."
Comment 1 Ronald Bultje 2005-09-22 14:54:31 UTC
A short video would be nice.
Comment 2 Julien Olivier 2005-09-22 15:26:03 UTC
Created attachment 52511 [details]
A video of me trying to change the volume

At first, I use the [+] [-] buttons, then I use the mouse wheel.

Sorry for the bad quality of the video. I must be doing something wrong...
Comment 3 Julien Olivier 2005-09-22 15:27:18 UTC
PS: this is an OGG/Theora video.
Comment 4 Ronald Bultje 2005-09-30 19:03:40 UTC
*** Bug 317326 has been marked as a duplicate of this bug. ***
Comment 5 Ronald Bultje 2005-09-30 19:10:33 UTC
Apparently really happens, confirming... I don't know why yet.
Comment 6 Sebastien Bacher 2005-09-30 19:17:07 UTC
that happens on my laptop, let me know if you need any debug on the topic ...
Comment 7 Ronald Bultje 2005-09-30 20:09:36 UTC
Created attachment 52886 [details] [review]
fix

It's a rounding error in the new code that was added to support multiple
tracks. Attached patch should fix it.
Comment 8 Danielle Madeley 2005-10-01 03:06:48 UTC
Look fine to me, Ronald. We'll put it into 2.12.1, so commit ASAP.
Comment 9 Sebastien Bacher 2005-10-01 10:55:14 UTC
The patch works fine, you rock Ronald :)
Comment 10 Ronald Bultje 2005-10-01 14:50:24 UTC
Committed to HEAD. Davyd, is there a 2.12 branch for this?
Comment 11 Danielle Madeley 2005-10-01 15:57:41 UTC
Not yet. We're going to branch after 2.12.1. The idea is that at least one
stable release wouldn't get (too) neglected.
Comment 12 Fryderyk Dziarmagowski 2005-10-08 09:38:41 UTC
This change broke mixer applet for me. I'm not able to change volume (scrolling
or moving slider immediately mutes volume). reverting Ronald's patch makes
applet to behave properly. my setup: gtk+ 2.8.6 + gnome 2.12.1 + gstreamer
0.8.11 with alsasink. it's confirmed by two persons using same setup.
Comment 13 Ronald Bultje 2005-10-08 15:55:26 UTC
Aaaaahhh... Can you add a printf() in applet.c in the initialization function,
at line 440:

    gconf_client_notify_add (applet->client, key,
                             cb_gconf, applet, NULL, NULL);
    g_free (key);
------> here <--------
  }

  gtk_widget_show (GTK_WIDGET (applet));

Can you make the following change:

GList *item;
for (item = applet->active_tracks; item; item = item->next) {
  GstMixerTrack *track = item->data;
  printf ("Track %s, vol %d - %d\n",
          track->label, track->min_volume, track->max_volume);
}

Thanks.
Comment 14 Fryderyk Dziarmagowski 2005-10-08 18:29:01 UTC
some compilations troubles:

applet.c: In function `gnome_volume_applet_setup':
applet.c:443: error: structure has no member named `active_tracks'

shouldn't be applet->tracks ?
Comment 15 Ronald Bultje 2005-10-08 19:34:02 UTC
Yes.
Comment 16 Fryderyk Dziarmagowski 2005-10-08 21:31:43 UTC
unfortunetly it prints nothing.
Comment 17 Ronald Bultje 2005-10-09 01:26:24 UTC
Can you also printf (%p\n", applet->active_tracks);?
Comment 18 Ronald Bultje 2005-10-10 14:41:44 UTC
Ping?
Comment 19 Fryderyk Dziarmagowski 2005-10-10 19:34:51 UTC
Pong!
adding printf ("%p\n", applet->active_tracks);
makes no difference:
applet.c: In function `gnome_volume_applet_setup':
applet.c:442: error: structure has no member named `active_tracks'

changing s/active_tracks/tracks/ allow me to compile it, but it still prints
nothing.

could you give me some more detailed infromations how to debug it?
Comment 20 Ronald Bultje 2005-10-10 19:58:24 UTC
Sorry, I wanted you to put it below the } in line 440, rather than within the
curly brackets. It should always print.
Comment 21 Fryderyk Dziarmagowski 2005-10-11 14:54:11 UTC
putting code from #13 below (line 443) bracket changed not much (structure has
no member named `active_tracks' blah, blah). What about patch to close this bug
bit faster? ;)
Comment 22 Ronald Bultje 2005-10-11 21:20:53 UTC
So it has to be printf ("%p\n", applet->tracks);, you could've figured that out
yourself.

I'm trying to debug your problem, because I cannot reproduce it, and have no
clue what is wrong. I'm not making you add those printf()s just for fun.
Comment 23 Fryderyk Dziarmagowski 2005-10-12 13:43:53 UTC
Ronald, don't get me wrong, I really appreciate your help. I want to help
solving this problem too, but given code (printf ("%p\n", applet->tracks); below
} @440) prints nothing (almost)
running mixer_applet2 from terminal (then adding to panel) gives:
(mixer_applet2:5348): Gtk-CRITICAL **: gtk_bin_remove: assertion `bin->child ==
child' failed
0x81ea998
Moving slider, pressing '+' or '-' mutes volume (x appears on speaker icon).
Above message is only output from terminal.
Comment 24 Ronald Bultje 2005-10-12 15:41:51 UTC
OK, so this (the 0x81ea998 string) tells me it found tracks, but initialization
was aborted nonetheless. Given the code, I don't see how that could
theoretically happen, since it's initialized to NULL and only set in a path that
always returns TRUE in select_element_and_track() in applet.c. In short, I don't
think this can happen, so something else may be screwed up. Add up to that that
my patch fixed issues for other people (notably Sebastien), I'd suggest you
double check your CVS checkout for weird stuff, like changes to the HEAD tree,
compile dependency errors, etc. I know this is not nice to ask, since you're a
packager also and have some knowledge of how all this works, but I seriously
don't see how this can possibly happen in the code. It just can't. The codepath
described by your output does not exist. Besides that, I don't see how my patch
could possibly trigger it...
Comment 25 Fryderyk Dziarmagowski 2005-10-12 18:32:30 UTC
I use an official tarball from GNOME ftp for building. I've already checked for
some compilation related things, but all appears to be ok. Previous release
(2.12.0) was working like a charm, removing your patch from 2.12.1 fixes any
problems, so it looks very cryptic for me.
I'm very curious how it works with other distros.
Comment 26 Sebastien Bacher 2005-10-12 19:49:40 UTC
works great for me on Ubuntu and for other people/people who had the issue fixed
by the patch
Comment 27 Julien Olivier 2005-10-12 22:44:12 UTC
I guess this is not a very useful comment, but it works very well for me too, on
Ubuntu Breezy, even if the movement of the slider isn't as fluid as it used to
be a long time ago. But, at least, it doesn't prevent me from using the scroll
wheel.
Comment 28 Ronald Bultje 2005-10-13 00:27:36 UTC
The fluidity (and changed sensitivity) compared to 2.10 will be fixed, I am
aware of those and know what causes them. I need some time to figure them out.
Comment 29 aethyr7 2005-10-15 07:35:15 UTC
I am having the exact same problem as #12.
http://bugs.gnome.org/show_bug.cgi?id=316922#c12
Is there anything I can do to help get this resolved?  I downgraded
gnome-applets to 2.10.1 in the meantime.
Comment 30 Fryderyk Dziarmagowski 2005-10-15 11:31:01 UTC
to #29: could you give us some details of your setup? (compiler, versions of
gtk+, main gnome libs, etc.)
Comment 31 Ronald Bultje 2005-10-15 16:16:41 UTC
Can you guys please get gnome-applets from CVS (HEAD), build the mixer from that
and see if that works? Just to be sure it's not some other version conflict (my
patch may accidently depend on another patch which is not in 2.12.0 or so, which
may totally screw up everything).
Comment 32 aethyr7 2005-10-15 20:37:44 UTC
Ronald, I just made two seperate tests.

1. With CVS.  Mixer applet was still broken, any adjustments of volume resulted
in  my master volume level going to 0 (confirmed by watching alsamixer while
doing it).

2. With CVS, patch from comment #7 reverted.  Mixer worked fine (as it does in
2.10.1).

Fryderyk, I am using Gentoo with:
gcc 3.3.6
glibc 2.3.5
gtk+-2.8.6
gnome 2.12/2.12.1 (everything is updated to the most recent version available).
alsa (and it's utilities) 1.0.9
kernel 2.6.13 (w/ the Con Kolivas' ck3 patch)
Comment 33 Ronald Bultje 2005-10-15 21:02:56 UTC
Can you apply the patches from comment 13 and 17/20 (read both) and give me the
output of them? I'd like to know what causes this, and maybe an artificial
environment with the values that you will give me will help me.
Comment 34 Fryderyk Dziarmagowski 2005-10-15 21:12:31 UTC
With fresh CVS checkout (already with Ronald's sensitivity changes) mixer is
still broken (behaves as I described before)
Looks like gcc 3.3.6 guys are in trouble (just a wild guess)
Comment 35 Ronald Bultje 2005-10-15 21:14:56 UTC
You may want to change all the floats/gfloats into doubles/gdoubles in my patch
from comment 7. Also, in the commit I did this morning (see webcvs), change the
float into a double. If it's a compiler bug that I'm triggering, that may fix it.
Comment 36 Ronald Bultje 2005-10-15 21:27:09 UTC
Closer guess, change the lrintf() from patch in comment 7 to a rintf(), since
we're passing a float and not a double. That may well fix the bug you're seeing.
Comment 37 Ronald Bultje 2005-10-16 00:47:57 UTC
*** Bug 318991 has been marked as a duplicate of this bug. ***
Comment 38 aethyr7 2005-10-16 02:31:58 UTC
Ronald, I did some further testing based on your recommendations.

From comment #35, in the CVS code, changing all relevant instances of float ->
double and gfloat -> gdouble (including the commit made earlier today), did
nothing to fix the problem.

From comment #36, leaving everything else the same as CVS (i.e. not making the
above changes), and changing lrintf to rintf does not fix the problem.

Just for kicks, I also tried compiling 2.12.1 with CFLAGS="-O0", and no LDFLAGS
set (I normally have them set to "-W1,O1"), and that did not change anything.

I will try your suggestions in comment #33.
Comment 39 aethyr7 2005-10-16 04:29:14 UTC
Ronald, I changed the code in applet.c so it looks like this:

  if (res) {
    /* gconf */
    key = panel_applet_gconf_get_full_key (PANEL_APPLET (applet),
				GNOME_VOLUME_APPLET_KEY_ACTIVE_ELEMENT);
    gconf_client_notify_add (applet->client, key,
			     cb_gconf, applet, NULL, NULL);
    g_free (key);
    GList *item;
    for (item = applet->tracks; item; item = item->next) {
      GstMixerTrack *track = item->data;
      printf ("Track %s, vol %d - %d\n",
	      track->label, track->min_volume, track->max_volume);
    }
    printf ("%p\n", applet->tracks);
    key = panel_applet_gconf_get_full_key (PANEL_APPLET (applet),
				GNOME_VOLUME_APPLET_KEY_ACTIVE_TRACK);
    gconf_client_notify_add (applet->client, key,
			     cb_gconf, applet, NULL, NULL);
    g_free (key);
  }

It produces the following when running from the command line (as instructed in
http://www.davyd.id.au/articles/debugging-gnome-applets.shtml)

./mixer_applet2 

(mixer_applet2:17258): Gtk-CRITICAL **: gtk_bin_remove: assertion `bin->child ==
child' failed
Track Master, vol 0 - 31
0x819b0cc
Comment 40 Ronald Bultje 2005-10-16 17:48:44 UTC
That's the same as me, should be good...

Re: comment 38, can you please apply the patch from comment 7 reversely to CVS
and then confirm that it works again, and then apply it part-by-part and see
which part of the patch breaks it? Something tells me it's one specific chunk
that screws up some part...
Comment 41 Kazuki Shimura 2005-10-16 18:04:12 UTC
Created attachment 53552 [details] [review]
patch for 2.12.1

I could not change volume with mixer applet as well as comment #12, #29.
When having fixed it as follows, I could change volume.

- From comment #35, I changed all the floats/gfloats to doubles/gdoubles.
- In addition, I changed the lrintf() to lrint().

I am using:
gcc-3.3.6
glibc-2.3.3
gtk+-2.8.6
gnome 2.12.1
gstreamer-0.8.10
alsa-1.0.9
kernel-2.6.12
Comment 42 Ronald Bultje 2005-10-16 19:16:55 UTC
Thank you! This confirms some compiler-suspicions of me (thanks to others for
suggesting that). Can the other two reporters please confirm that this patch
fixes it? I'll apply it if it works.
Comment 43 Fryderyk Dziarmagowski 2005-10-16 19:41:08 UTC
Confirmed. Works pretty well with this patch.
Comment 44 Ronald Bultje 2005-10-16 19:52:38 UTC
OK, applied than. Thanks for being helpful, guys!
Comment 45 Daniel Gryniewicz 2005-10-16 23:55:05 UTC
That patch does not fix the problem for me.  If I lower the volume via the
volume applet to zero, withthe mixer open, it mutes, and must be unmuted by
clicking on the mute button.  Please reopen.
Comment 46 Ronald Bultje 2005-10-17 00:25:25 UTC
That is unrelated to this bug, please open a new one.
Comment 47 Daniel Gryniewicz 2005-10-17 00:55:51 UTC
I did, and it was marked a dupe of this one:
http://bugzilla.gnome.org/show_bug.cgi?id=318991
Comment 48 Ronald Bultje 2005-10-17 01:04:07 UTC
No, in that bug report, it states that "if I modify the volume, it mutes", which
is this bug. What you describe is "if I bring the volume down to zero, it
mutes", which is not the same. Please be accurate in bug descriptions, otherwise
we (developers) will be confused and we will not be able to help in fixing the
issue at hand.
Comment 49 Daniel Gryniewicz 2005-10-17 01:07:02 UTC
Ah, I failed to make that distinction.  The "just change" is fixed now, the
"zero mutes" is not fixed, I'll open a new bug for that.
Comment 50 Ronald Bultje 2005-10-17 01:11:39 UTC
Thank you, I'll try to have a look soon.
Comment 51 Daniel Gryniewicz 2005-10-17 01:17:16 UTC
The "mute on zero" problem appears to be bug #170575, so I'm satisfied.
Comment 52 aethyr7 2005-10-18 00:08:15 UTC
Everything works on my end too, thank you Ronald for working with me, and thank
you Kazuki for the patch :)