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 350221 - Include assertion message in g_{assert,critical} bugs
Include assertion message in g_{assert,critical} bugs
Status: RESOLVED FIXED
Product: bug-buddy
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Bug-buddy Maintainers
Bug-buddy Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-07 03:43 UTC by James "Doc" Livingston
Modified: 2008-10-01 12:28 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
patch (4.23 KB, patch)
2008-09-26 23:30 UTC, Cosimo Cecchi
none Details | Review

Description James "Doc" Livingston 2006-08-07 03:43:01 UTC
It would be useful if when reporting "crashes" caused by g_assert* or g_critical with the fatal option, bug-buddy would include the assertion message in the bug it files.
Comment 1 Fernando Herrera 2006-12-13 22:52:57 UTC
The asserting message is already present on the stack trace (a little hard to read because of the c-style formatting) and quite possible in the newly included .xsession-errors
Comment 2 James "Doc" Livingston 2007-02-06 10:30:24 UTC
Unfortunately the message is generally only present in the stack trace if the user had glib debug symbols available. Having the message available when they don't have debug symbols would be very nice, as the majority of the time when the message would be useful is for people without symbols.

Of the recent assertions bugs I've seen filed, the .xsession-errors log very rarely contains the message.
Comment 3 Cosimo Cecchi 2008-09-26 09:38:53 UTC
I think this is a good idea and probably can be done playing with g_log_set_handler. I will try to come up with a patch soon.
Comment 4 Cosimo Cecchi 2008-09-26 23:30:42 UTC
Created attachment 119452 [details] [review]
patch

Here's the patch, it works fine. The only doubt I have is about the placement of the warnings in the report (right now they are placed before the stack trace) and about the usefulness of .xsession-errors.
I will mail gnome-bugsquad to gather feedback for this before committing.
Comment 5 Diego Escalante Urrelo (not reading bugmail) 2008-09-27 01:42:36 UTC
How does it look?

Make sure we can process it so it's easy to hook it with simple dup search and similar. I can't honestly tell how correct the patch is, but looks good to me, visually at least :p.
Comment 6 André Klapper 2008-09-27 14:07:58 UTC
> of the warnings in the report (right now they are placed before the stack
> trace) and about the usefulness of .xsession-errors.

Place them at the end, just before any .xsession-errors. Putting them at the beginning will make it harder to use simple-dup-finder.
Comment 7 William Lachance 2008-09-30 00:53:10 UTC
I'd been meaning to play with doing something like this for a while.

Is there anything that limits the size of the logged message buffer? It doesn't seem like there is, looking at your patch. You should consider using a ring buffer to log these messages, as suggested here:

http://www.gnome.org/~federico/news-2006-10.html#05

With this change, you might want to consider logging all messages, not just the critical ones. It's more likely that you're going to care about a recent non critical message than an ancient critical one.
Comment 8 Cosimo Cecchi 2008-10-01 12:28:04 UTC
William, thanks for the suggestion; I implemented a ring buffer of 15 slots to handle the critical and fatal warnings. I'll leave the other messages out for now.
Also, I moved the files included with the --include option down after the stacktrace.

Closing as FIXED.

2008-10-01  Cosimo Cecchi  <cosimoc@gnome.org>

	* gnome-breakpad/gnome-breakpad.cc:
	* src/bug-buddy.c: (unknown_app_finished), (fill_custom_info),
	(main):
	Implement a logger for critical and fatal warnings, which will be
	included in the bug report sent to bugzilla (#350221).
	This also moves the files included with the --include option down
	at the bottom of the stacktrace (if present).
	* src/gnome-crash.c: (main):
	Update the test to contain a critical warning.