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 327587 - use of popt causes critical warning which crashes gnome-volume-manager
use of popt causes critical warning which crashes gnome-volume-manager
Status: RESOLVED FIXED
Product: gnome-volume-manager
Classification: Deprecated
Component: general
2.17.x
Other All
: Normal critical
: ---
Assigned To: Gnome volume manager maintainers
Gnome volume manager maintainers
: 326908 330688 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-01-18 20:59 UTC by John (J5) Palmieri
Modified: 2008-01-18 17:23 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Ports the popt command line parsing code to use GOptions instead (3.05 KB, patch)
2006-01-18 21:00 UTC, John (J5) Palmieri
none Details | Review

Description John (J5) Palmieri 2006-01-18 20:59:36 UTC
Steps to reproduce:
1. start the session

Stack trace:


Other information:
Attaching a patch which fixes this by moving to the GOptions API
Comment 1 John (J5) Palmieri 2006-01-18 21:00:48 UTC
Created attachment 57611 [details] [review]
Ports the popt command line parsing code to use GOptions instead
Comment 2 Jeffrey Stedfast 2006-01-19 15:06:40 UTC
cool, thanks j5 - feel free to commit.

Do you have any idea what is causing the popt crash tho?
Comment 3 John (J5) Palmieri 2006-01-19 20:53:07 UTC
Committed.  There was a NULL somewhere that was causing an assert to be triggered.  Ray and I thought the poptResetContext () API might not actually work but since GOptions is now the recommended way of doing things we figured why not just update it.
Comment 4 Jeffrey Stedfast 2006-01-19 21:14:22 UTC
fair enough. thanks fort he patch
Comment 5 Jeffrey Stedfast 2006-01-19 21:15:18 UTC
*** Bug 326908 has been marked as a duplicate of this bug. ***
Comment 6 Jose M. daLuz 2006-01-19 22:51:29 UTC
I filed dupe 326908. I can confirm this fixed the problem for me.
Comment 7 Jeffrey Stedfast 2006-01-20 15:10:54 UTC
I'm gonna reopen this for myself since unfortunately the fix makes it not build against gnome-2.12 which I need it to :(

Since this didn't crash for me on gnome-2.12 and it *seems* (can anyone confirm?) that this only crashed for people running gnome-2.13, perhaps something in libgnome got broken? the other possibility is a that some versions of popt, other than what I have, got broken?

Comment 8 Jeffrey Stedfast 2006-01-20 17:04:13 UTC
ok, now fixed in CVS by using GOption if available, else falling back to popt.
Comment 9 Jeffrey Stedfast 2006-02-01 17:39:38 UTC
ok, finally found the real problem...

gnome_program_init() calls a pre_args_parse() callback for each module before parsing args. after parsing args it calls a post_args_parse() callback for each. The problem was that libbonoboui was freeing a temp variable that was used in one of its own popt option callbacks.

since g-v-m was resetting the context to parse its own args after gnome_program_init() finished, the libbonoboui popt option callback was getting called (for --screen as passed by the session manager) with the tenmp variables already cleaned up, which then caused an abort().
Comment 10 Jeffrey Stedfast 2006-02-01 17:40:10 UTC
oh yea, and Really Truly Fixed For Real(tm) in 1.5.12
Comment 11 Karsten Bräckelmann 2006-02-10 18:09:09 UTC
*** Bug 330688 has been marked as a duplicate of this bug. ***
Comment 12 Jani Monoses 2008-01-18 12:21:48 UTC
this bug is linked to from http://live.gnome.org/GnomeGoals/PoptGOption implying popt has been replaced by GOption in g-v-m, but AFAIK popt is still used here.
Comment 13 Luis Menina 2008-01-18 13:31:46 UTC
[luis@alcor gnome-volume-manager]$ grep -Ri popt * --include="*.c"
src/manager.c:static const struct poptOption options[] = {
src/manager.c:  { "version", 'v', POPT_ARG_NONE | POPT_ARGFLAG_ONEDASH, &print_version, 'v',
src/manager.c:  { "daemon", 'd', POPT_ARG_STRING | POPT_ARGFLAG_ONEDASH, (char **) &daemon_arg, 'd',
src/manager.c:  { "no-daemon", 'n', POPT_ARG_NONE | POPT_ARGFLAG_ONEDASH, &no_daemon, 'n',
src/manager.c:  { "secret-mode", 's', POPT_ARG_NONE | POPT_ARGFLAG_ONEDASH, &secret_mode, 's',
src/manager.c:                                GNOME_PARAM_POPT_FLAGS, POPT_CONTEXT_POSIXMEHARDER,
src/manager.c:                                GNOME_PARAM_POPT_TABLE, options,

Reopening, as it seems popt is still used...
Comment 14 Luis Menina 2008-01-18 13:37:45 UTC
Note that Goption isn't even used at all...