hvr / ThreadScope

Official upstream repo for ThreadScope (issue tracker still using trac)
http://trac.haskell.org/ThreadScope
Other
0 stars 0 forks source link

App locks up when histogram canvas too narrow #18

Closed ghc-mirror closed 10 years ago

ghc-mirror commented 10 years ago

Original reporter: MikolajKonarski

Ts 0.2.1: 100% CPU taken, TS does not respond to any keystrokes, mouse cursor stuck at the resize icon and clicking does not work anywhere on the desktop.

How to trigger this (completely reproducible for me): switch to the Spark sizes tab, resize the sidebar pane slowly (if fast, no problem occurs), when the histogram canvas is a few pixels wide, CPU usage spikes and the app stops responding to input. The best backtrace I managed to get is below.

Perhaps I should just refuse drawing the histogram if the canvas width is too small (just as I refuse if height is too small to avoid division by zero for some calculations). It would be better though to understand the problem first, so that we are sure it can't happen independently under different circumstances. The fact that it takes over the user's computer is worrying, too.

Program received signal SIGINT, Interrupt.
0x00007ffff414bf03 in __poll (fds=<value optimised out>, nfds=<value optimised out>, timeout=<value optimised out>) at ../sysdeps/unix/sysv/linux/poll.c:87
87  ../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
    in ../sysdeps/unix/sysv/linux/poll.c
(gdb) bt
#0  0x00007ffff414bf03 in __poll (fds=<value optimised out>, nfds=<value optimised out>, timeout=<value optimised out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007ffff19c0512 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007ffff19c0a5f in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007ffff19c0ae4 in xcb_writev () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#4  0x00007ffff3d792a7 in _XSend () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#5  0x00007ffff3d79665 in _XFlush () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#6  0x00007ffff3316540 in XRenderCompositeTrapezoids () from /usr/lib/x86_64-linux-gnu/libXrender.so.1
#7  0x00007ffff646265f in _cairo_xlib_surface_composite_trapezoids (op=CAIRO_OPERATOR_OVER, pattern=0x7fffffff5200, abstract_dst=<value optimised out>, antialias=<value optimised out>, 
    src_x=593, src_y=35, dst_x=593, dst_y=35, width=5, height=490, traps=0x7fffffff4c18, num_traps=1, clip_region=0x0) at /build/buildd/cairo-1.10.2/src/cairo-xlib-surface.c:2979
#8  0x00007ffff6444a99 in _cairo_surface_composite_trapezoids (op=CAIRO_OPERATOR_OVER, pattern=0x7fffffff5200, dst=0x112be00, antialias=CAIRO_ANTIALIAS_DEFAULT, src_x=593, src_y=35, 
    dst_x=593, dst_y=35, width=5, height=490, traps=0x7fffffff4c18, num_traps=1, clip_region=0x0) at /build/buildd/cairo-1.10.2/src/cairo-surface.c:2309
#9  0x00007ffff64475e0 in _composite_traps_draw_func (closure=0x7fffffff4750, op=CAIRO_OPERATOR_OVER, src=<value optimised out>, dst=<value optimised out>, dst_x=0, 
    dst_y=<value optimised out>, extents=0x7fffffff50c0, clip_region=0x0) at /build/buildd/cairo-1.10.2/src/cairo-surface-fallback.c:561
#10 0x00007ffff6446703 in _clip_and_composite (clip=0x0, op=<value optimised out>, src=<value optimised out>, draw_func=0x7ffff6447530 <_composite_traps_draw_func>, 
    draw_closure=0x7fffffff4750, dst=0x112be00, extents=0x7fffffff50c0) at /build/buildd/cairo-1.10.2/src/cairo-surface-fallback.c:472
#11 0x00007ffff64471da in _clip_and_composite_trapezoids (src=0x7fffffff5200, op=CAIRO_OPERATOR_OVER, dst=0x112be00, traps=0x7fffffff4bf0, antialias=CAIRO_ANTIALIAS_DEFAULT, clip=0x0, 
    extents=0x7fffffff50c0) at /build/buildd/cairo-1.10.2/src/cairo-surface-fallback.c:875
#12 0x00007ffff6447cd3 in _cairo_surface_fallback_stroke (surface=0x112be00, op=CAIRO_OPERATOR_OVER, source=0x7fffffff5200, path=<value optimised out>, stroke_style=0x7fffffff5300, 
    ctm=0xffff20, ctm_inverse=0xffff50, tolerance=0.10000000000000001, antialias=CAIRO_ANTIALIAS_DEFAULT, clip=0x0) at /build/buildd/cairo-1.10.2/src/cairo-surface-fallback.c:1113
#13 0x00007ffff6444511 in _cairo_surface_stroke (surface=0x112be00, op=CAIRO_OPERATOR_OVER, source=0x7fffffff5200, path=0x7ffff66b8c08, stroke_style=0x7fffffff5300, ctm=0xffff20, 
    ctm_inverse=0xffff50, tolerance=0.10000000000000001, antialias=CAIRO_ANTIALIAS_DEFAULT, clip=0x7fffffff5330) at /build/buildd/cairo-1.10.2/src/cairo-surface.c:2215
#14 0x00007ffff641dad1 in _cairo_gstate_stroke (gstate=0xfffe30, path=0x7ffff66b8c08) at /build/buildd/cairo-1.10.2/src/cairo-gstate.c:1166
#15 0x00007ffff6414c00 in *INT_cairo_stroke_preserve (cr=0x7ffff66b88a0) at /build/buildd/cairo-1.10.2/src/cairo.c:2406
#16 0x00007ffff6414c19 in *INT_cairo_stroke (cr=0x7ffff66b88a0) at /build/buildd/cairo-1.10.2/src/cairo.c:2379
#17 0x000000000092a06e in sntJ_info ()
#18 0x42b8000000010000 in ?? ()
#19 0x4018000000000001 in ?? ()
#20 0x0000000000000000 in ?? ()
(gdb) quit
ghc-mirror commented 10 years ago

Original reporter: MikolajKonarski

Fixed in devel version. To be released soon.