Opened 11 years ago

Closed 6 years ago

#12188 closed defect (fixed)

GtkSendPaintEvents() fails in shaped sample

Reported by: kraymer Owned by:
Priority: normal Milestone:
Component: samples Version: stable-latest
Keywords: crash, backtrace, assert failure Cc:
Blocked By: Blocking:
Patch: no

Description

Because I started a project which involves some mouse dragging I came across the shaped sample. When I tried it, the dragging stuff worked but when I choose the "transparent window" menu item, I get an assert:

../src/gtk/window.cpp(3678): assert "Assert failure" failed in GtkSendPaintEvents(): unsupported background style
../src/gtk/window.cpp(3678): assert "Assert failure" failed in GtkSendPaintEvents(): unsupported background style
Detaching after fork from child process 6570.


^C
Program received signal SIGINT, Interrupt.
0x0000003e2d6d5318 in poll () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install GConf2-2.28.0-4.fc12.2.x86_64 ORBit2-2.14.17-3.fc12.x86_64 atk-1.28.0-1.fc12.x86_64 bzip2-libs-1.0.5-6.fc12.x86_64 cairo-1.8.8-3.fc12.x86_64 dbus-libs-1.2.16-9.fc12.x86_64 expat-2.0.1-8.fc12.x86_64 fontconfig-2.8.0-1.fc12.x86_64 freetype-2.3.11-3.fc12.x86_64 gamin-0.1.10-5.fc12.x86_64 glibc-2.11.2-1.x86_64 gtk-nodoka-engine-0.7.2-8.fc12.x86_64 gvfs-1.4.3-7.fc12.x86_64 ibus-gtk-1.3.4-2.fc12.x86_64 ibus-libs-1.3.4-2.fc12.x86_64 libXau-1.0.5-1.fc12.x86_64 libXcomposite-0.4.1-2.fc12.x86_64 libXcursor-1.1.10-1.fc12.x86_64 libXdamage-1.1.2-1.fc12.x86_64 libXfixes-4.0.4-1.fc12.x86_64 libXi-1.3-2.fc12.x86_64 libXinerama-1.1-1.fc12.x86_64 libXrandr-1.3.0-5.fc12.x86_64 libXrender-0.9.5-1.fc12.x86_64 libcap-ng-0.6.2-3.fc12.x86_64 libcroco-0.6.2-3.fc12.x86_64 libgsf-1.14.15-4.fc12.x86_64 libjpeg-6b-46.fc12.x86_64 libpng-1.2.43-1.fc12.x86_64 librsvg2-2.26.0-3.fc12.x86_64 libselinux-2.0.90-5.fc12.x86_64 libtiff-3.9.2-3.fc12.x86_64 libudev-145-21.fc12.x86_64 libuuid-2.16.2-9.fc12.x86_64 libxcb-1.5-1.fc12.x86_64 libxml2-2.7.6-2.fc12.x86_64 pango-1.26.2-1.fc12.x86_64 pixman-0.16.6-1.fc12.x86_64 xcb-util-0.3.6-1.fc12.x86_64
(gdb) bt
#0  0x0000003e2d6d5318 in poll () from /lib64/libc.so.6
#1  0x0000003e2ee3ca0c in g_main_context_poll (context=0x694840, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2904
#2  g_main_context_iterate (context=0x694840, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2586
#3  0x0000003e2ee3d075 in IA__g_main_loop_run (loop=0x712e40) at gmain.c:2799
#4  0x0000003e386c078b in IA__gtk_dialog_run (dialog=0x870450 [GtkAssertDialog]) at gtkdialog.c:1089
#5  0x00007ffff6e7a2d2 in wxGUIAppTraits::ShowAssertDialog(wxString const&) () from /home/xxxxx/src/wxWidgets-svn/buildgtk/lib/libwx_gtk2u_core-2.9.so.1
#6  0x00007ffff63848fb in ShowAssertDialog(wxString const&, int, wxString const&, wxString const&, wxString const&, wxAppTraits*) () from /home/xxxxx/src/wxWidgets-svn/buildgtk/lib/libwx_baseu-2.9.so.1
#7  0x00007ffff63870f9 in wxAppConsoleBase::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*) () from /home/xxxxx/src/wxWidgets-svn/buildgtk/lib/libwx_baseu-2.9.so.1
#8  0x00007ffff6e3f6f0 in wxApp::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*) () from /home/xxxxx/src/wxWidgets-svn/buildgtk/lib/libwx_gtk2u_core-2.9.so.1
#9  0x00007ffff6385ee6 in wxDefaultAssertHandler(wxString const&, int, wxString const&, wxString const&, wxString const&) () from /home/xxxxx/src/wxWidgets-svn/buildgtk/lib/libwx_baseu-2.9.so.1
#10 0x00007ffff6382786 in wxOnAssert(char const*, int, char const*, char const*, char const*) () from /home/xxxxx/src/wxWidgets-svn/buildgtk/lib/libwx_baseu-2.9.so.1
#11 0x00007ffff6e859e7 in wxWindow::GtkSendPaintEvents() () from /home/xxxxx/src/wxWidgets-svn/buildgtk/lib/libwx_gtk2u_core-2.9.so.1
#12 0x00007ffff6e85cf0 in gtk_window_expose_callback () from /home/xxxxx/src/wxWidgets-svn/buildgtk/lib/libwx_gtk2u_core-2.9.so.1
#13 0x0000003e38753ae3 in _gtk_marshal_BOOLEAN__BOXED (closure=0x7bafd0, return_value=0x7fffffffd860, n_param_values=<value optimized out>, param_values=0x78a660, invocation_hint=<value optimized out>, 
    marshal_data=<value optimized out>) at gtkmarshalers.c:84
#14 0x0000003e30a0ba8e in IA__g_closure_invoke (closure=0x7bafd0, return_value=0x7fffffffd860, n_param_values=2, param_values=0x78a660, invocation_hint=0x7fffffffd820) at gclosure.c:767
#15 0x0000003e30a20ec3 in signal_emit_unlocked_R (node=<value optimized out>, detail=<value optimized out>, instance=<value optimized out>, emission_return=<value optimized out>, 
    instance_and_params=<value optimized out>) at gsignal.c:3247
#16 0x0000003e30a220fa in IA__g_signal_emit_valist (instance=<value optimized out>, signal_id=<value optimized out>, detail=<value optimized out>, var_args=0x7fffffffda10) at gsignal.c:2990
#17 0x0000003e30a227a3 in IA__g_signal_emit (instance=<value optimized out>, signal_id=<value optimized out>, detail=<value optimized out>) at gsignal.c:3037
#18 0x0000003e3887634f in gtk_widget_event_internal (widget=0x6d0b10 [wxPizza], event=0x7fffffffdba0) at gtkwidget.c:4775
#19 0x0000003e3874bc9c in IA__gtk_main_do_event (event=0x7fffffffdba0) at gtkmain.c:1571
#20 0x0000003e38e42faa in _gdk_window_process_updates_recurse (window=0x7ce1b0 [GdkWindow], expose_region=0x7848d0) at gdkwindow.c:5172
#21 0x0000003e38e42f57 in _gdk_window_process_updates_recurse (window=0x7ce0a0 [GdkWindow], expose_region=0x791c60) at gdkwindow.c:5145
#22 0x0000003e38e3fa6b in gdk_window_process_updates_internal (window=0x7ce0a0 [GdkWindow]) at gdkwindow.c:5331
#23 0x0000003e38e445c1 in IA__gdk_window_process_all_updates () at gdkwindow.c:5439
#24 0x0000003e386b9e81 in gtk_container_idle_sizer (data=<value optimized out>) at gtkcontainer.c:1353
#25 0x0000003e38e1d2a6 in gdk_threads_dispatch (data=0x7737a0) at gdk.c:506
#26 0x0000003e2ee3923e in g_main_dispatch (context=0x694840) at gmain.c:1960
#27 IA__g_main_context_dispatch (context=0x694840) at gmain.c:2513
#28 0x0000003e2ee3cc28 in g_main_context_iterate (context=0x694840, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2591
#29 0x0000003e2ee3d075 in IA__g_main_loop_run (loop=0x705e40) at gmain.c:2799
#30 0x0000003e3874beb7 in IA__gtk_main () at gtkmain.c:1218
#31 0x00007ffff6e6477a in wxGUIEventLoop::Run() () from /home/xxxxx/src/wxWidgets-svn/buildgtk/lib/libwx_gtk2u_core-2.9.so.1
#32 0x00007ffff6385c43 in wxAppConsoleBase::MainLoop() () from /home/xxxxx/src/wxWidgets-svn/buildgtk/lib/libwx_baseu-2.9.so.1
#33 0x00007ffff641e3d5 in wxEntry(int&, wchar_t**) () from /home/xxxxx/src/wxWidgets-svn/buildgtk/lib/libwx_baseu-2.9.so.1
#34 0x00000000004093a6 in main (argc=1, argv=0x7fffffffe0f8) at shaped.cpp:221

I used g++ -o shaped ../../buildgtk/wx-config --libs --cxx-flags shaped.cpp to compile the sample.
My wx version is trunk@r64785.

Change History (2)

comment:1 Changed 11 years ago by kraymer

Btw, with -DNDEBUG the assert goes away, I get the "rainbowed" window but the transparency effects don't work.

comment:2 Changed 6 years ago by pcor

  • Resolution set to fixed
  • Status changed from new to closed

Support for wxBG_STYLE_TRANSPARENT was added in 14421681253f09f119dad82364f5ada40f58f2fc (r70569).

Note: See TracTickets for help on using tickets.