GNOME Bugzilla – Bug 452159
Magnifier crashes on gnome2.19.3.
Last modified: 2007-07-31 13:16:01 UTC
Steps to reproduce: 1. Enable AT support for desktop. 2. Start gnome-mag with command "magnifier". Stack trace: core 'core' of 4379: magnifier ff344bf8 _lwp_kill (5, 1000, ff385c80, fef72a00, 97464, 0) + 8 ff0ca42c g_logv (fedff7b8, 6, 5, ff1612b4, 4, ff15f2e0) + 3dc ff0ca514 g_log (fedff7b8, 4, fedffab8, d60f0, 9, 9c) + 1c fede0690 gdk_x_error (28000, ffbfe770, 2800, 47554, 9, 24) + b0 fb253bbc _XError (cf1e0, ffbfe898, d5e14, 0, fb37e000, 0) + 130 fb22ab90 _XReply (cf1e0, ffbfe898, 0, 1, 0, 0) + 420 fb22c250 XQueryExtension (cf1e0, fb031e68, ffbfe91c, ffbfe920, ffbfe924, cf790) + cc fb22c060 XInitExtension (cf1e0, fb031e68, 1, ff38065c, 98318, ff389d6c) + 14 fb030d24 XCompositeExtAddDisplay (fb050000, cf1e0, fb031e68, cded0, fb050004, fb042000) + 3c fb031188 XCompositeQueryExtension (cf1e0, ffbfeaac, ffbfeaa8, 0, d60a4, 40800) + 4 00029e34 gmag_compositor_init (8c818, cf1e0, 2a000, 40800, 40800, 40800) + c 00028f80 gmag_gs_client_init (8c818, 28c00, d5fb8, 0, 408ac, cf1e0) + 128 0001b24c magnifier_set_extension_listeners (8c818, 5ff18, 2a000, 5ff18, fee27b3c, 8c3e0) + 4 0001c59c magnifier_set_property (ffbfefcc, b06d0, c50b9, 0, 1c4c0, 8c818) + a8 ff17f6a0 g_closure_invoke (0, ffbfee00, 4, c60d8, 0, 88a18) + 1a8 fef1adcc bonobo_closure_invoke_va_list (43308, 0, ffbfefcc, 88a18, 49ae0, 49b01) + 2c0 fef1b214 bonobo_closure_invoke (88a18, 4, 7800, 7900, 495d1, b06d0) + 3fc fef0ebf8 impl_Bonobo_PropertyBag_setValue (7b430, 8b6c8, b06d0, 7b430, ffbfefcc, 3a3b4) + 140 ff20dfa0 ORBit_c_stub_invoke (8c640, fef4d7f8, 3, 0, ffbfef60, 0) + 7c fef1fd84 Bonobo_PropertyBag_setValue (8c640, 2b3d4, b06d0, ffbfefcc, 0, 29160) + 78 fef123b0 bonobo_pbclient_set_value (8c640, 2b3d4, b06d0, 0, 0, 36c68) + 1ac fef12190 bonobo_pbclient_set_string (8c640, 2b3d4, a7a48, 0, 0, 36dcc) + f0 0001a514 main (0, ffbff254, ffbff25c, 2b000, 8c818, 3efe0) + 224 00019980 _start (0, 0, 0, 0, 0, 0) + 108 Other information: This bug could be found with vermillion_68/snv_67.
This bug could be reproduced with both solaris and linux if the composite extension was not enabled by default in X configuration. If the composite extension is enabled, magnifier will not crash any more.
Created attachment 91907 [details] [review] Correct the segmentation fault when the composite extension is disabled and also correct some regression with the damage handler without composite The split of the files in the x11 dir introduce some regression in the code to manage damage notifications. This patch also correct this.
Created attachment 91908 [details] [review] The same path removed some uneeded printfs
Hi, tried on Solaris, still crash, but trace is a little different, does it need a new patch? attach is trace: =>[1] __lwp_kill(0x1, 0x5), at 0xd133e6e5 [2] _thr_kill(0x1, 0x5), at 0xd133b1cb [3] raise(0x5), at 0xd12f6842 [4] g_logv(0xd0a87e78, 0x4, 0xd0a87f50, 0x8047590), at 0xd114f842 [5] g_log(0xd0a87e78, 0x4, 0xd0a87f50, 0x8107070), at 0xd114f911 [6] gdk_x_error(0x80f5700, 0x8047600), at 0xd0a565e4 [7] _XError(0x80f5700, 0x808dd70), at 0xce6e1205 [8] _XReadEvents(0x80f5700), at 0xce6f29bf [9] XNextEvent(0x80f5700, 0x80476f0), at 0xce6ce4b7 [10] gmag_gs_events_handler(0x80f9ee0, 0x1, 0x80a2808), at 0x8066dca [11] g_io_unix_dispatch(0x80f9f28, 0x8066d8c, 0x80a2808), at 0xd1174707 [12] g_main_dispatch(0x8085d10), at 0xd1147b3e [13] g_main_context_dispatch(0x8085d10), at 0xd1148c4d [14] g_main_context_iterate(0x8085d10, 0x1, 0x1, 0x8083020), at 0xd114906a [15] g_main_loop_run(0x80e5c08), at 0xd114966c [16] bonobo_main(0x80479f4, 0x8047928, 0xd13fb7d0, 0xd13fb7d0, 0x0, 0x807bcd4), at 0xd0f035b9 [17] main(0x1, 0x804796c, 0x8047974), at 0x805ab90
Created attachment 91995 [details] [review] a new patch with an error in gmag_damage_init corrected Hi Li, Test this new patch (revert the old one and apply this). - XDamageSubtract (dpy_conn, root_window, None, None); + XDamageSubtract (dpy, root_damage, None, None); The second argument for XDamageSubtract was wrong in the last patch. I don't know why in linux the magnifier doesn't crash. It only crashed when I started with XSynchronize (dpy, True) and passed the --sync option to the magnifier. I though that the second argument to XDamageSubtract must be a Window and since the compiler doesn't generate any warning, since Window and Damage are both XID, I doesn't saw this error before. See if the patch solves the problem for you.
Hi Carlos, I tested this patch, magnifier could be launched and will not crash any more. And I also found some other problems: 1. Screen fragments I configured a dummy driver/display and enabled composite extension on system, start magnifier with command line: "magnifier -m -f -t :0.0 -s :0.1 --ignore-composite=0" or "magnifier -m -f -t :0.0 -s :0.1 --ignore-composite=0 --smooth-scrolling", there will be screen fragments as I attached screen shot. The fragments are out of target screen display area, so it will not block/cover any part of the desktop view. 2. Magnifier core dump I configured a dummy driver/display and enabled composite extension on system, start magnifier with command line: "magnifier -m -f -t :0.0 -s :0.1" or "magnifier -m -f -t :0.0 -s :0.1 --smooth-scrolling", magnifier core dumps, stack trace listed below: Stack trace: core 'core' of 1674: magnifier -m -f -t :0.0 -s :0.1 --smooth-scrolling d2b3f1c5 _lwp_kill (1, 5) + 15 d2af6a72 raise (5) + 22 d294fa56 g_logv (d22a1dc8, 8, d22a21f0, 8046e48) + 2aa d294fb25 g_log (d22a1dc8, 8, d22a21f0, d22a2254, 4f6, d22a1f8c) + 25 d224ab6f gdk_pixbuf_get_from_drawable (0, 807fe20, 809d018, 18f, 258, 0) + 453 080602c5 zoom_region_get_source_subwindow (8129800, 18f, 258, 320, 12b) + 1e1 08060516 zoom_region_update_pixmap (8047030, 8129800) + 8a 0805f6da zoom_region_scroll (8129800, fffffce2, fffffdaa) + 152 080618af zoom_region_align (8129800) + 27f 080625c6 zoom_region_process_pending (8129800) + e d294af5b g_idle_dispatch (9728118, 80625b8, 8129800) + 1f d2947cf6 g_main_dispatch (8085310) + 1e2 d2948e05 g_main_context_dispatch (8085310) + 85 d2949222 g_main_context_iterate (8085310, 1, 1, 8082c10) + 3ce d2949824 g_main_loop_run (812a5a8) + 1b8 d27735b9 bonobo_main (80473c0, 804728c, d2bfb7d0, 40000000, 40890000, 807bccc) + 5d 0805ab90 main (1, 80472d0, 80472f4) + 760 08059eb2 _start (8, 8047428, 0, 0, 0, 0) + 7a 3. Tested without dummy driver/display settings I enabled composite extension on my system, and removed all dummy driver/display settings, then start magnifier with command line: "magnifier -m -f". In this way, magnifier works perfectly. Then I start magnifier with command line: "magnifier -m -f --ignore-composite=0(1) (--smooth-scrolling)", magnifier failed to work correctly. It showed a white screen instead of desktop. 4. Tested without dummy driver/display and composite disabled In this scenario, I removed all the settings of dummy driver/display and disabled composite extensions in xorg.conf file, then start magnifier with command line: "magnifier -m -f (--ignore-composite=0(1))", magnifier failed to work in full screen correctly. It showed a white screen instead of desktop. Could you please comment on these different scenarios? Which one should be the correct one? Are there still bugs existing, which is making magnifier crash? Thanks!
Created attachment 92247 [details] screen shot
Hi Tim, (In reply to comment #6) > Hi Carlos, > > I tested this patch, magnifier could be launched and will not crash any more. > And I also found some other problems: > > 1. Screen fragments > I configured a dummy driver/display and enabled composite extension on system, > start magnifier with command line: "magnifier -m -f -t :0.0 -s :0.1 > --ignore-composite=0" or "magnifier -m -f -t :0.0 -s :0.1 --ignore-composite=0 > --smooth-scrolling", there will be screen fragments as I attached screen shot. > The fragments are out of target screen display area, so it will not block/cover > any part of the desktop view. I reproduced it here exactly as you said, but I percept that the source screen is smaller then the target screen, although in my xorg.conf it's with the same resolution as my target screen. Here is the relevant lines of the xdpyinfo output: screen #0: dimensions: 1024x768 pixels (292x212 millimeters) screen #1: dimensions: 800x600 pixels (271x203 millimeters) This is something possible and is really a bug in the magnifier that doesn't work properly with different screen sizes. Could you verify if this is also happening in the machine that you are testing? I think that this can also be a Xserver bug. > > 2. Magnifier core dump > I configured a dummy driver/display and enabled composite extension on system, > start magnifier with command line: "magnifier -m -f -t :0.0 -s :0.1" or > "magnifier -m -f -t :0.0 -s :0.1 --smooth-scrolling", magnifier core dumps, > stack trace listed below: > Stack trace: > core 'core' of 1674: magnifier -m -f -t :0.0 -s :0.1 --smooth-scrolling > d2b3f1c5 _lwp_kill (1, 5) + 15 > d2af6a72 raise (5) + 22 > d294fa56 g_logv (d22a1dc8, 8, d22a21f0, 8046e48) + 2aa > d294fb25 g_log (d22a1dc8, 8, d22a21f0, d22a2254, 4f6, d22a1f8c) + 25 > d224ab6f gdk_pixbuf_get_from_drawable (0, 807fe20, 809d018, 18f, 258, 0) + 453 > 080602c5 zoom_region_get_source_subwindow (8129800, 18f, 258, 320, 12b) + 1e1 > 08060516 zoom_region_update_pixmap (8047030, 8129800) + 8a > 0805f6da zoom_region_scroll (8129800, fffffce2, fffffdaa) + 152 > 080618af zoom_region_align (8129800) + 27f > 080625c6 zoom_region_process_pending (8129800) + e > d294af5b g_idle_dispatch (9728118, 80625b8, 8129800) + 1f > d2947cf6 g_main_dispatch (8085310) + 1e2 > d2948e05 g_main_context_dispatch (8085310) + 85 > d2949222 g_main_context_iterate (8085310, 1, 1, 8082c10) + 3ce > d2949824 g_main_loop_run (812a5a8) + 1b8 > d27735b9 bonobo_main (80473c0, 804728c, d2bfb7d0, 40000000, 40890000, 807bccc) > + 5d > 0805ab90 main (1, 80472d0, 80472f4) + 760 > 08059eb2 _start (8, 8047428, 0, 0, 0, 0) + 7a For some reason I don't have the crash here, but I think that, for now, we could ignore the composite extension if the target and source displays are different. The only reason to use the composite extension, in this scenario, is to take advantage of the overlay window in the target display, but this will need some code refactoring that I don't pretend to address for the 2.19.6 release. > > 3. Tested without dummy driver/display settings > I enabled composite extension on my system, and removed all dummy > driver/display settings, then start magnifier with command line: "magnifier -m > -f". In this way, magnifier works perfectly. > Then I start magnifier with command line: "magnifier -m -f > --ignore-composite=0(1) (--smooth-scrolling)", magnifier failed to work > correctly. It showed a white screen instead of desktop. the --ignore-composite option don't accepted parameters. If you pass it with 0/1 it will ignore in the same way. This is the reason because the magnifier "failed", since this is the expected behaver. > > 4. Tested without dummy driver/display and composite disabled > In this scenario, I removed all the settings of dummy driver/display and > disabled composite extensions in xorg.conf file, then start magnifier with > command line: "magnifier -m -f (--ignore-composite=0(1))", magnifier failed to > work in full screen correctly. It showed a white screen instead of desktop. the same as above. If you pass -{v,h} instead of -f in the two last scenarios you will get a working magnifier. > > Could you please comment on these different scenarios? Which one should be the > correct one? Are there still bugs existing, which is making magnifier crash? > Thanks! > I miss something? I pretend to provide a patch this afternoon for the first two cases. Thanks for catching these bugs Tim!
Created attachment 92561 [details] [review] correct the issues founded with the dummy driver Hi Tim, After your comments in this I will commit. Best regards.
I added the line Virtual 1024 768 to each line of the Display subsection of the dummy driver screen and I get the expected resolution for both screens.
Hi Carlos, Thanks for your updates! I'll re-build a new package and test it, then give you some updates about this patch. And for the dummy driver problem, I don't think it's a dummy driver only issue. Some users might have two real display devices(screen 0 and screen 1). I'm not sure whether this problem is also visible to two real display devices, but I'll do some testing against that, and give updates here. Thanks for your hard work on this! Best regards.
Without the patch, the problem will certainly be visible in two physical devices if they have different resolutions. I don't test it, but I'm very convinced that the patch correct this situation now. When I have time, I will test it too.
Hi Carlos, I tested the patch with dummy driver/display and two physical display devices which have different resolutions, bug has been fixed and magnifier works fine. There are no fragment and crashes any more. As to the screen dimensions bug, I could also produce it. Thank you.
Hi Tim, Thanks for the testing and good bug report. I'm closing the bug now. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.