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 658871 - gbacktrace: g_get_prgname () isn't called for a NULL argument
gbacktrace: g_get_prgname () isn't called for a NULL argument
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-09-13 03:16 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2012-01-06 19:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gbacktrace: g_get_prgname () isn't called for a NULL argument (1.02 KB, patch)
2011-09-13 03:16 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
gbacktrace: g_get_prgname () isn't called for a NULL argument (1.33 KB, patch)
2011-09-16 00:29 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
gbacktrace: g_get_prgname () isn't called for a NULL argument (1.67 KB, patch)
2011-10-05 20:55 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2011-09-13 03:16:49 UTC
Identified on IRC and caused me to lose a bit of time while debugging
something. Patching so that nobody else will make the same mistake.
Comment 1 Jasper St. Pierre (not reading bugmail) 2011-09-13 03:16:51 UTC
Created attachment 196328 [details] [review]
gbacktrace: g_get_prgname () isn't called for a NULL argument
Comment 2 Matthias Clasen 2011-09-13 11:20:57 UTC
Review of attachment 196328 [details] [review]:

Sorry for your trouble. Patch looks ok as a factual correction, but maybe we still want to point at g_get_prgname() here as a way to obtain the string ?
Comment 3 Jasper St. Pierre (not reading bugmail) 2011-09-16 00:29:36 UTC
Created attachment 196684 [details] [review]
gbacktrace: g_get_prgname () isn't called for a NULL argument
Comment 4 Colin Walters 2011-09-16 02:12:21 UTC
Review of attachment 196684 [details] [review]:

::: glib/gbacktrace.c
@@ +220,3 @@
+ * when the [S]tack trace option is selected. You can get the current
+ * process's "program name" with g_get_prgname(), assuming that you
+ * have called gtk_init() or gdk_init().

Let's not reference gdk_init(), no one should use that.  I'd say:

...assuming that g_set_prgname() has been called, either directly or indirectly via e.g. gtk_init().

(Also note *really* we should be initializing g_prgname via Linux /proc/self/cmdline)
Comment 5 Jasper St. Pierre (not reading bugmail) 2011-09-16 02:32:11 UTC
(In reply to comment #4)
> Review of attachment 196684 [details] [review]:
> 
> ::: glib/gbacktrace.c
> @@ +220,3 @@
> + * when the [S]tack trace option is selected. You can get the current
> + * process's "program name" with g_get_prgname(), assuming that you
> + * have called gtk_init() or gdk_init().
> 
> Let's not reference gdk_init(), no one should use that.  I'd say:

The existing documentation, and g_on_error_query, which I'm not changing, mentions gdk_init(). Should I fix that too?
Comment 6 Jasper St. Pierre (not reading bugmail) 2011-10-05 20:55:26 UTC
Created attachment 198378 [details] [review]
gbacktrace: g_get_prgname () isn't called for a NULL argument
Comment 7 Matthias Clasen 2012-01-06 19:30:18 UTC
Review of attachment 198378 [details] [review]:

Sure, looks ok to me
Comment 8 Jasper St. Pierre (not reading bugmail) 2012-01-06 19:41:21 UTC
Attachment 198378 [details] pushed as 021e116 - gbacktrace: g_get_prgname () isn't called for a NULL argument