Bug 172977 - Clicking on the Asia region breaks the UI
Summary: Clicking on the Asia region breaks the UI
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: libart_lgpl
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alexander Larsson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-11-11 18:58 UTC by Chris Lumens
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-11-22 13:28:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Image showing UI brokenness (103.92 KB, image/png)
2005-11-11 19:04 UTC, Chris Lumens
no flags Details
Workaround numerical instability (1.17 KB, patch)
2005-11-21 10:10 UTC, Alexander Larsson
no flags Details | Diff

Description Chris Lumens 2005-11-11 18:58:44 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b5) Gecko/20051008 Fedora/1.5-0.5.0.beta2 Firefox/1.4.1

Description of problem:
Start up s-c-date, switch to the timezone map screen, and click on the top right region (Asia).  The UI becomes distorted and unusable, and the program cannot be quit normally.  I'll attach a picture briefly.

Version-Release number of selected component (if applicable):
system-config-date-1.7.99.5-1

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.
  

Additional info:

Comment 1 Chris Lumens 2005-11-11 19:04:25 UTC
Created attachment 120959 [details]
Image showing UI brokenness

Comment 2 Nils Philippsen 2005-11-18 18:27:36 UTC
I've trace this back to it looping (seemingly endlessly) in art_uta_add_line().
The problem is manifest in FC4 and Rawhide.

Alex and Matthias, here's what s-c-date does (paraphrased):

- gnome canvas widget gets created
- image (1440x720) gets placed on canvas (position x=0, y=0, anchor=gtk.ANCHOR_NW)
- set_scroll_region() to canvas.root().get_bounds()
- later on it would set_scroll_region to (640,480, 1439,829) (i.e. north east)
to zoom in on Asia
- as the changes get processed (asynchronously), the app hangs and loops in
art_uta_add_line()

To reproduce the problem, you can check out s-c-date source from CVS
(rhlinux.redhat.com:/usr/local/CVS either anonymous pserver or via SSH, module
redhat-config-date), change into src/ subdirectory, "python
./timezone_map_gui.py", click onto Asia, watch it hang and attach the debugger.
To experiment with coordinates, change the file "regions" in the same directory
(lines are x, y, width, height, hot_spot_y, hot_spot_y (both can be -1 for
center of the area), name/description (not used)). I noticed that when I shifted
the Asia region one pixel to the left (i.e. "639 480 ...") it doesn't hang.

Comment 3 Nils Philippsen 2005-11-18 18:31:55 UTC
I just checked and found that it only hangs if I use an antialiased canvas so
the problem might be in libgnomecanvas. Unfortunately I'm at a loss how to find
out whether it's libart or libgnomecanvas with all the asynchronous processing
and such...

Comment 4 Nils Philippsen 2005-11-18 18:41:45 UTC
Backtrace for your pleasure (attached to hung process with gdb/ddd):

(gdb) bt
#0  0x0476e153 in art_uta_add_line (uta=0x8d22740, x0=384, y0=0, x1=0,
y1=239.39999999999998, rbuf=0x8d24c70, rbuf_rowstride=28) at art_uta_vpath.c:250
#1  0x0476eb57 in art_uta_from_vpath (vec=Variable "vec" is not available.
) at art_uta_vpath.c:328
#2  0x0476eb85 in art_uta_from_svp (svp=0x0) at art_uta_svp.c:51
#3  0x00543515 in gnome_canvas_update_svp (canvas=0x8c0ea30, p_svp=0x8c7adec,
new_svp=0x8d24228) at gnome-canvas-util.c:470
#4  0x00543618 in gnome_canvas_item_update_svp (item=0x8c7ad60, p_svp=0x0,
new_svp=0x8d24228) at gnome-canvas-util.c:536
#5  0x005436af in gnome_canvas_item_update_svp_clip (item=0x0, p_svp=0x0,
new_svp=0x8d24228, clip_svp=0x0) at gnome-canvas-util.c:573
#6  0x00532e89 in gnome_canvas_shape_update (item=0x8c7ad60, affine=0xbfd8cb58,
clip_path=0x0, flags=0) at gnome-canvas-shape.c:1120
#7  0x0053aa15 in gnome_canvas_polygon_update (item=0x0, affine=0x0,
clip_path=0x0, flags=0) at gnome-canvas-polygon.c:252
#8  0x00549dfc in gnome_canvas_item_invoke_update (item=0x8c7ad60,
p2cpx=0x8c7ad60, clip_path=0x0, flags=2) at gnome-canvas.c:470
#9  0x0054a3d0 in gnome_canvas_group_update (item=0x8c13388, affine=0xbfd8cc38,
clip_path=0x0, flags=2) at gnome-canvas.c:1567
#10 0x00549dfc in gnome_canvas_item_invoke_update (item=0x8c13388,
p2cpx=0x8c13388, clip_path=0x0, flags=0) at gnome-canvas.c:470
#11 0x00549ed8 in do_update (canvas=0x8c0ea30) at gnome-canvas.c:3157
#12 0x0054a23f in idle_handler (data=0x0) at gnome-canvas.c:3193
#13 0x008f3730 in g_idle_dispatch (source=0x8d209b0, callback=0x54a203
<idle_handler>, user_data=0x0) at gmain.c:3813
#14 0x008f14ce in IA__g_main_context_dispatch (context=0x8b633d0) at gmain.c:1934
#15 0x008f44d6 in g_main_context_iterate (context=0x8b633d0, block=1,
dispatch=1, self=0x8c13fd0) at gmain.c:2565
#16 0x008f47c3 in IA__g_main_loop_run (loop=0x8d05ad8) at gmain.c:2769
#17 0x00defa46 in IA__gtk_main () at gtkmain.c:1009
#18 0x00256d6d in _wrap_gtk_main (self=0x0) at gtk.override:881
#19 0x00c55891 in PyEval_EvalFrame (f=0x8aeef1c) at Python/ceval.c:3531
#20 0x00c56ef8 in PyEval_EvalCodeEx (co=0xb7cd66e0, globals=0xb7f36824,
locals=0x0, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0,
closure=0x0) at Python/ceval.c:2730
#21 0x00c57228 in PyEval_EvalCode (co=0x0, globals=0x0, locals=0x0) at
Python/ceval.c:484
#22 0x00c7355a in run_node (n=Variable "n" is not available.
) at Python/pythonrun.c:1265
#23 0x00c747d2 in PyRun_SimpleFileExFlags (fp=Variable "fp" is not available.
) at Python/pythonrun.c:860
#24 0x00c75269 in PyRun_AnyFileExFlags (fp=0x8abd008, filename=0xbfd8d870
"./timezone_map_gui.py", closeit=1, flags=0xbfd8d2d4) at Python/pythonrun.c:664
#25 0x00c7b16d in Py_Main (argc=1, argv=0xbfd8d3a4) at Modules/main.c:484
#26 0x080485ba in main (argc=0, argv=0x0) at Modules/python.c:23

Comment 5 Nils Philippsen 2005-11-18 18:44:38 UTC
just another tidbit: viewport is 480x240 pixels.

Comment 6 Alexander Larsson 2005-11-21 09:50:24 UTC
Unfortuntately the ugly truth is that the antialiased mode of gnome-canvas is
pretty buggy, and very hard to fix. The core problem is that libart (which is
the base for the antialiased mode) is numerically unstable and unmaintained. The
long term solution we're working on is Cairo and all of that.

However, that canvas use seems pretty simple, so it might be possible to work
around the issues. I'll take a quick look.



Comment 7 Alexander Larsson 2005-11-21 10:10:40 UTC
Created attachment 121294 [details]
Workaround numerical instability

The typical workaround for issues with numerical instability is to use
art_vpath_perturb(). This isn't bound in python, so i implementing something
similar. You'll go blind if you look at it, but it works...

Comment 8 Nils Philippsen 2005-11-21 17:20:58 UTC
Applied workaround in s-c-date-1.7.99.6. Feel free to CLOSE/WONTFIX.


Note You need to log in before you can comment on or make changes to this bug.