bugMyPaint - Bugs: bug #20637, [gtk3] brush selection window:...

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #20637: [gtk3] brush selection window: exception thrown in style-reading code (was: Error to load)

Submitted by:  Edgar Gonz├ílez <mred>
Submitted on:  Thu Mar 21 20:02:07 2013  
Severity: 4 - ImportantPriority: 5 - Normal
Status: FixedPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Release: cf723b7..5226073Planned Release: None
Operating System: Linux Mint Nadia

(Jump to the original submission Jump to the original submission)

Mon Jun 23 21:51:51 2014, comment #12:

[This is a canned response, please forgive the broken formatting: it's one of the many things Gna! unfortunately does not do well.]

This bug tracker will shortly be moving to Github. As part of this process, we are reviewing old bug reports on gna.org.

This bug was marked as Fixed long ago, but was still classified as Open. Github does not distinguish between Fixed+Open and Fixed+Closed in the
way we once did here, so this bug is now being marked Closed, and will not be migrated into the github issues tracker.

If you believe that this bug still affects the most recent git master of MyPaint (and thus the next release), please feel free to open a new
issue on Github about it. Our new issue trackers are:


Andrew Chadwick <achadwick>
Project Administrator
Sun Mar 24 14:07:00 2013, comment #11:

Just a note, the command "git grep" can be very handy :-)

Martin Renold <martinxyz>
Project Administrator
Sun Mar 24 04:47:24 2013, comment #10:

All the issues from this bug appear to be solved in my case now. Thanks!

Ryan Hasse <ryanhasse>
Sun Mar 24 04:29:57 2013, comment #9:

Should be fixed in https://gitorious.org/mypaint/mypaint/commit/39dc933631926a96e4c614ed9cb553692d08f06c - can you please test and report any new crashes, or if colours look wrong in a particular standard theme? Thanks.

Andrew Chadwick <achadwick>
Project Administrator
Sun Mar 24 01:21:04 2013, comment #8:

(Okay, maybe it's a little less scary when you lose that redundant "gui/*.py" )

Andrew Chadwick <achadwick>
Project Administrator
Sun Mar 24 01:19:22 2013, comment #7:

Hmm. Not sure what the cause of this is - perhaps the style isn't being set sensibly and up-front outside a DE? In any case, the right thing to do is to rip out or replace any uses of the deprecated gtk.Widget.get_style() with [Gg]tk.Widget.get_style_context() equivalents. We have a few to deal with:

working on swatting those now.

Andrew Chadwick <achadwick>
Project Administrator
Sat Mar 23 21:09:46 2013, comment #6:

I've tried Adwaita, Clearlooks, Delorean, MediterraneanNight, and FlatStudio. All with the same results. I'm not using a DE, but my window manager is Awesome3.

Ryan Hasse <ryanhasse>
Sat Mar 23 20:55:36 2013, comment #5:

Okay - what theme and DE are you guys using? I can't reproduce this with the MediterraneanNight themes[1] for GTK3 - using the unico theme engine - under Xfce4.8.

[1] http://gnome-look.org/content/show.php/MediterraneanNight+Series?content=156782

Andrew Chadwick <achadwick>
Project Administrator
Sat Mar 23 09:06:27 2013, comment #4:

Oh yeah. To trigger it, just press shift-B to display brush selection, or shift-C to open colors window and change it to 3rd tab(grid shaped palette). Removing ~/.mypaint, clearing with scons and running it again(scons -c && scons) and doesn't affect it.

Libra Rian <zrzz>
Sat Mar 23 08:51:18 2013, comment #3:

I have the same issue on lubuntu 12.10. Versions of packages in attach.

It seems that after migration to gtk3 get_style() doesn't return anything in bg[], fg[], et al.

All solutions to the same problem so far involve using widget.get_style_context instead of (deprecated) widget.get_style


https://bugs.launchpad.net/bzr-gtk/+bug/1044991 (has diff)

https://github.com/fossfreedom/coverart-browser/issues/81 (look at last comment for diff)

https://bugs.launchpad.net/parcel-tracker/+bug/1068115 (doesn't has diff in comments, but source code now uses get_style_context())

(file #17523)

Libra Rian <zrzz>
Fri Mar 22 22:17:40 2013, comment #2:

Related, presumable: bug #19230

Edgar: could you report on the versions of packages you're using after the command-line below? Just the ones specified should be enough :)

Andrew Chadwick <achadwick>
Project Administrator
Fri Mar 22 21:41:47 2013, comment #1:

Dumps are good, but please, when reporting a bug please include

  • Exact, step by step instructions for reproducing the bug. Be as detailed as you want, we like it.

See http://forum.intilinux.com/mypaint-help-and-tips/how-to-report-bugs/

For now, please try:

then re-run scons with default options, and try running MyPaint again. Any improvement?

Andrew Chadwick <achadwick>
Project Administrator
Thu Mar 21 20:02:07 2013, original submission:

Traceback (most recent call last):
File "/home/code/mypaint/gui/brushselectionwindow.py", line 366, do_get_preferred_height_for_width(self=<GroupSelector object at 0x380ab90 (gui+brushselectionwindow+GroupSelector at 0x3fb8ef0)>, width=190)
# Height is determined by the layout once we have a concrrete width.
layout = self.lay_out_group_names(width)
w, h = layout.get_pixel_size()
variables: {'width': ('local', 190), 'self.lay_out_group_names': ('local', <bound method GroupSelector.lay_out_group_names of <GroupSelector object at 0x380ab90 (gui+brushselectionwindow+GroupSelector at 0x3fb8ef0)>>), 'layout': (None, [])}
File "/home/code/mypaint/gui/brushselectionwindow.py", line 327, lay_out_group_names(self=<GroupSelector object at 0x380ab90 (gui+brushselectionwindow+GroupSelector at 0x3fb8ef0)>, width=190)
c_bg = _gdk_color_to_hex(style_bg[bg_state])
c_fg = _gdk_color_to_hex(style_fg[fg_state])
variables: {'_gdk_color_to_hex': ('local', <function _gdk_color_to_hex at 0x37b2c08>), 'bg_state': ('local', <enum GTK_STATE_NORMAL of type GtkStateType>), 'c_bg': (None, []), 'style_bg': ('local', [])}
IndexError: list index out of range

Edgar González <mred>


Attached Files
file #17523:  versions added by zrzz (384B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by martinxyz (Posted a comment)
  • -unavailable- added by ryanhasse (Posted a comment)
  • -unavailable- added by zrzz (Updated the item)
  • -unavailable- added by achadwick (Posted a comment)
  • -unavailable- added by mred (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Jun 23 21:51:51 2014achadwickOpen/ClosedOpen=>Closed
    Wed Mar 27 13:07:57 2013achadwickStatusReady For Test=>Fixed
    Sun Mar 24 04:29:57 2013achadwickStatusIn Progress=>Ready For Test
    Sun Mar 24 01:19:22 2013achadwickStatusConfirmed=>In Progress
    Sat Mar 23 20:56:45 2013achadwickSeverity3 - Normal=>4 - Important
    Sat Mar 23 20:55:36 2013achadwickStatusNeed Info=>Confirmed
    Sat Mar 23 20:52:00 2013achadwickSummaryError to load=>[gtk3] brush selection window: exception thrown in style-reading code (was: Error to load)
    Sat Mar 23 08:51:18 2013zrzzAttached File-=>Added versions, #17523
    Fri Mar 22 21:44:02 2013achadwickStatusNone=>Need Info
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup