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 164007 - segfault in custom widget example
segfault in custom widget example
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.4
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2005-01-13 23:02 UTC by Marco Scholten
Modified: 2005-01-18 20:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (6.55 KB, patch)
2005-01-13 23:05 UTC, Marco Scholten
none Details | Review
cleaned up patch (6.14 KB, patch)
2005-01-16 12:44 UTC, Marco Scholten
none Details | Review

Description Marco Scholten 2005-01-13 23:02:50 UTC
Segfaults in on_expose_event() because of problem with get_default_colormap() 
(see Bug 163992).
Comment 1 Marco Scholten 2005-01-13 23:05:30 UTC
Created attachment 35984 [details] [review]
patch

Removed colormap in on_expose_event()

Made it draw something nice.
Comment 2 Olav Vitters 2005-01-13 23:14:53 UTC
Is this patch meant to fix the crash reported bug 163992? 
Comment 3 Marco Scholten 2005-01-14 08:26:01 UTC
No it's not, it's meant to make the example work.
I just discovered bug 163992 while working on this, this patch does not fix 
that, just the example.
Comment 4 Murray Cumming 2005-01-14 09:49:03 UTC
1. This patch contains whitespace changes. Please try to remove them so I can
more easily see what has really changed.
2. This patch does more than just what it says in the ChangeLog. Please explain
them.
3. If this patch contains a workaround for another bug, then please wait until
that bug is resolved and/or clearly comment-out that code so that it can be
re-enabled later.

By the way, the gtkmm book gets the code directly from the examples directory,
so it is not necessary to also patch the book.
Comment 5 Marco Scholten 2005-01-16 12:44:23 UTC
Created attachment 36097 [details] [review]
cleaned up patch

1. done that
2. done that
3. Using modify_bg and modify_fg is not really a workaround for bug 163992
although this made it crash on my machine.
I just think this is a simpler way, and i did not think changing this would be
a problem because how we change the colors is not essential to this example.

Question: It doesn't seem to make a difference if on_expose_event() returns
true or false, what is this return value for and how is it used?
Comment 6 Murray Cumming 2005-01-18 20:51:35 UTC
Excellent. Many thanks. Applied.