Closed
Bug 450925
Opened 16 years ago
Closed 16 years ago
xulrunner redraws display very frequently even when idle
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jayakumar.lkml, Unassigned)
References
Details
Attachments
(1 file)
33.10 KB,
text/plain
|
Details |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20060601 Firefox 2.0 (Ubuntu-edgy) Build Identifier: Mozilla XULRunner 1.9.1a2pre - 2008080105 Hi. I'm using xulrunner on a gumstix embedded system with an e-paper display and it works quite well. The one problem that I have is that even when idle, xulrunner still redraws the display about once a second. This results in full flashing on the screen every second. Specifically, xulrunner appears to be generating calls to gdk functions repeatedly (even when idle) that results in redrawing of the display. (gdb) bt #0 0x41371060 in XFlush () from /usr/lib/libX11.so.6 #1 0x411779ac in gdk_window_process_all_updates () from /usr/lib/libgdk-x11-2.0.so.0 #2 0x41177a00 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 Cannot access memory at address 0x1 Reproducible: Always Steps to Reproduce: The gumstix build environment is a bit complex. There are details of how to build it here: http://www.gumstix.net/Software/view/Getting-started/Setting-up-a-build-environment/111.html But I suspect the issue is not related to gumstix and is probably platform independent. In any case, one could set breakpoint in XFlush and see if it is called repeatedly even when system is idle. (gdb) b XFlush Breakpoint 2 at 0x41371060 (gdb) c Continuing. Breakpoint 2, 0x41371060 in XFlush () from /usr/lib/libX11.so.6 (gdb) bt #0 0x41371060 in XFlush () from /usr/lib/libX11.so.6 #1 0x411779ac in gdk_window_process_all_updates () from /usr/lib/libgdk-x11-2.0.so.0 #2 0x41177a00 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 Cannot access memory at address 0x1 Actual Results: xulrunner redraws the display repeatedly when idle Expected Results: When xulrunner is idle, it should not redraw the display. I've attempted to do some debugging to try and resolve the problem. I'm happy to do more if need be. Here are my current notes: root@gumstix-custom-basix:~/newtest/usr/local/fennec$ xulrunner --version Mozilla XULRunner 1.9.1a2pre - 2008080105 root@gumstix-custom-basix:~/newtest/usr/local/fennec$ xulrunner --gre-version 1.9.1a2pre I typically attach post init. root@gumstix-custom-basix:~/newtest/usr/local/fennec$ xulrunner application.ini & root@gumstix-custom-basix:~/newtest/usr/local/fennec$ ps PID Uid VmSize Stat Command 1 root 532 S init [5] 2 root SW< [kthreadd] 3 root SW< [ksoftirqd/0] 4 root SW< [events/0] 5 root SW< [khelper] 52 root SW< [kblockd/0] 57 root SW< [kseriod] 59 root SW< [kmmcd] 64 root SW< [btaddconn] 65 root SW< [btdelconn] 91 root SW [pdflush] 92 root SW [pdflush] 93 root SW< [kswapd0] 94 root SW< [aio/0] 171 root SW< [mtdblockd] 190 root SW< [kpsmoused] 195 root SW< [krfcommd] 200 root SW< [mmcqd] 264 root 556 S < udevd --daemon 659 root 548 S /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host 676 messageb 680 S /usr/bin/dbus-daemon --system 682 root 980 S /usr/bin/ntpd -p /var/run/ntp.pid -g 690 root 616 S /sbin/syslogd -n -O /var/log/messages -s 32 -b 1 -m 2 692 root 592 S /sbin/klogd -n 733 root 536 S /usr/sbin/mdnsd -f /etc/bonjour.conf -b 740 root 416 S /usr/sbin/cron 747 root 952 S -sh 825 root 2564 S Xfbdev -ac -fb /dev/fb1 1084 root 696 S /bin/sh /usr/lib/mozilla-xulrunner/xulrunner applicat 1099 root 700 S /bin/sh /usr/lib/mozilla-xulrunner/run-mozilla.sh /us 1104 root 16300 R /usr/lib/mozilla-xulrunner/xulrunner-bin application. 1110 root 744 R ps root@gumstix-custom-basix:~/newtest/usr/local/fennec$ gdb -p 1104 GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "arm-angstrom-linux-gnueabi". Attaching to process 1104 Reading symbols from /usr/lib/mozilla-xulrunner/xulrunner-bin...done. Using host libthread_db library "/lib/libthread_db.so.1". Reading symbols from /lib/libpthread.so.0...done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /usr/lib/mozilla-xulrunner/libmozjs.so...done. Loaded symbols for /usr/lib/mozilla-xulrunner/libmozjs.so Reading symbols from /usr/lib/mozilla-xulrunner/libxpcom.so...done. Loaded symbols for /usr/lib/mozilla-xulrunner/libxpcom.so Reading symbols from /usr/lib/mozilla-xulrunner/libxul.so...done. Loaded symbols for /usr/lib/mozilla-xulrunner/libxul.so Reading symbols from /usr/lib/mozilla-xulrunner/libplds4.so...done. Loaded symbols for /usr/lib/mozilla-xulrunner/libplds4.so Reading symbols from /usr/lib/mozilla-xulrunner/libplc4.so...done. Loaded symbols for /usr/lib/mozilla-xulrunner/libplc4.so Reading symbols from /usr/lib/mozilla-xulrunner/libnspr4.so...done. Loaded symbols for /usr/lib/mozilla-xulrunner/libnspr4.so Reading symbols from /lib/libdl.so.2...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /usr/lib/libgtk-x11-2.0.so.0...done. Loaded symbols for /usr/lib/libgtk-x11-2.0.so.0 Reading symbols from /usr/lib/libatk-1.0.so.0...done. Loaded symbols for /usr/lib/libatk-1.0.so.0 Reading symbols from /usr/lib/libgdk-x11-2.0.so.0...done. Loaded symbols for /usr/lib/libgdk-x11-2.0.so.0 Reading symbols from /usr/lib/libgdk_pixbuf-2.0.so.0...done. Loaded symbols for /usr/lib/libgdk_pixbuf-2.0.so.0 Reading symbols from /usr/lib/libpangocairo-1.0.so.0...done. Loaded symbols for /usr/lib/libpangocairo-1.0.so.0 Reading symbols from /usr/lib/libpango-1.0.so.0...done. Loaded symbols for /usr/lib/libpango-1.0.so.0 Reading symbols from /usr/lib/libcairo.so.2...done. Loaded symbols for /usr/lib/libcairo.so.2 Reading symbols from /usr/lib/libgmodule-2.0.so.0...done. Loaded symbols for /usr/lib/libgmodule-2.0.so.0 Reading symbols from /usr/lib/libgobject-2.0.so.0...done. Loaded symbols for /usr/lib/libgobject-2.0.so.0 Reading symbols from /usr/lib/libglib-2.0.so.0...done. Loaded symbols for /usr/lib/libglib-2.0.so.0 Reading symbols from /usr/lib/libX11.so.6...done. Loaded symbols for /usr/lib/libX11.so.6 Reading symbols from /lib/libm.so.6...done. Loaded symbols for /lib/libm.so.6 Reading symbols from /usr/lib/libstdc++.so.6...done. Loaded symbols for /usr/lib/libstdc++.so.6 Reading symbols from /lib/libgcc_s.so.1...done. Loaded symbols for /lib/libgcc_s.so.1 Reading symbols from /lib/libc.so.6...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.3...done. Loaded symbols for /lib/ld-linux.so.3 Reading symbols from /usr/lib/libsqlite3.so.0...done. Loaded symbols for /usr/lib/libsqlite3.so.0 Reading symbols from /usr/lib/libjpeg.so.62...done. Loaded symbols for /usr/lib/libjpeg.so.62 Reading symbols from /usr/lib/mozilla-xulrunner/libsmime3.so...Reading symbols from /usr/lib/mozilla-xulrunner/.debug/libsmime3.so...done. done. Loaded symbols for /usr/lib/mozilla-xulrunner/libsmime3.so Reading symbols from /usr/lib/mozilla-xulrunner/libssl3.so...Reading symbols from /usr/lib/mozilla-xulrunner/.debug/libssl3.so...done. done. Loaded symbols for /usr/lib/mozilla-xulrunner/libssl3.so Reading symbols from /usr/lib/mozilla-xulrunner/libnss3.so...Reading symbols from /usr/lib/mozilla-xulrunner/.debug/libnss3.so...done. done. Loaded symbols for /usr/lib/mozilla-xulrunner/libnss3.so Reading symbols from /usr/lib/mozilla-xulrunner/libnssutil3.so...Reading symbols from /usr/lib/mozilla-xulrunner/.debug/libnssutil3.so...done. done. Loaded symbols for /usr/lib/mozilla-xulrunner/libnssutil3.so Reading symbols from /usr/lib/mozilla-xulrunner/libsoftokn3.so...Reading symbols from /usr/lib/mozilla-xulrunner/.debug/libsoftokn3.so...done. done. Loaded symbols for /usr/lib/mozilla-xulrunner/libsoftokn3.so Reading symbols from /usr/lib/libz.so.1...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /usr/lib/libpangoft2-1.0.so.0...done. Loaded symbols for /usr/lib/libpangoft2-1.0.so.0 Reading symbols from /usr/lib/libXrender.so.1...done. Loaded symbols for /usr/lib/libXrender.so.1 Reading symbols from /usr/lib/libfreetype.so.6...done. Loaded symbols for /usr/lib/libfreetype.so.6 Reading symbols from /usr/lib/libfontconfig.so.1...done. Loaded symbols for /usr/lib/libfontconfig.so.1 Reading symbols from /usr/lib/libdbus-glib-1.so.2...done. Loaded symbols for /usr/lib/libdbus-glib-1.so.2 Reading symbols from /usr/lib/libdbus-1.so.3...done. Loaded symbols for /usr/lib/libdbus-1.so.3 Reading symbols from /usr/lib/libXft.so.2...done. Loaded symbols for /usr/lib/libXft.so.2 Reading symbols from /usr/lib/libXt.so.6...done. Loaded symbols for /usr/lib/libXt.so.6 Reading symbols from /usr/lib/libgthread-2.0.so.0...done. Loaded symbols for /usr/lib/libgthread-2.0.so.0 Reading symbols from /usr/lib/libXfixes.so.3...done. Loaded symbols for /usr/lib/libXfixes.so.3 Reading symbols from /usr/lib/libgcrypt.so.11...done. Loaded symbols for /usr/lib/libgcrypt.so.11 Reading symbols from /usr/lib/libXext.so.6...done. Loaded symbols for /usr/lib/libXext.so.6 Reading symbols from /usr/lib/libXcursor.so.1...done. Loaded symbols for /usr/lib/libXcursor.so.1 Reading symbols from /usr/lib/libpng12.so.0...done. Loaded symbols for /usr/lib/libpng12.so.0 Reading symbols from /usr/lib/libXau.so.6...done. Loaded symbols for /usr/lib/libXau.so.6 Reading symbols from /usr/lib/libXdmcp.so.6...done. Loaded symbols for /usr/lib/libXdmcp.so.6 Reading symbols from /usr/lib/libexpat.so.1...done. Loaded symbols for /usr/lib/libexpat.so.1 Reading symbols from /lib/libnsl.so.1...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /usr/lib/libSM.so.6...done. Loaded symbols for /usr/lib/libSM.so.6 Reading symbols from /usr/lib/libICE.so.6...done. Loaded symbols for /usr/lib/libICE.so.6 Reading symbols from /lib/librt.so.1...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /usr/lib/libgpg-error.so.0...done. Loaded symbols for /usr/lib/libgpg-error.so.0 Reading symbols from /lib/libnss_compat.so.2...done. Loaded symbols for /lib/libnss_compat.so.2 Reading symbols from /usr/lib/gconv/ISO8859-1.so...done. Loaded symbols for /usr/lib/gconv/ISO8859-1.so Reading symbols from /lib/libnss_files.so.2...done. Loaded symbols for /lib/libnss_files.so.2 Reading symbols from /lib/libnss_dns.so.2...done. Loaded symbols for /lib/libnss_dns.so.2 Reading symbols from /lib/libresolv.so.2...done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /usr/lib/mozilla-xulrunner/components/libdbusservice.so...done. Loaded symbols for /usr/lib/mozilla-xulrunner/components/libdbusservice.so Reading symbols from /usr/lib/pango/1.6.0/modules/pango-basic-fc.so...done. Loaded symbols for /usr/lib/pango/1.6.0/modules/pango-basic-fc.so Reading symbols from /usr/lib/mozilla-xulrunner/libnssdbm3.so...Reading symbols from /usr/lib/mozilla-xulrunner/.debug/libnssdbm3.so...done. done. Loaded symbols for /usr/lib/mozilla-xulrunner/libnssdbm3.so Reading symbols from /usr/lib/mozilla-xulrunner/libfreebl3.so...Reading symbols from /usr/lib/mozilla-xulrunner/.debug/libfreebl3.so...done. done. Loaded symbols for /usr/lib/mozilla-xulrunner/libfreebl3.so Reading symbols from /usr/lib/mozilla-xulrunner/libnssckbi.so...Reading symbols from /usr/lib/mozilla-xulrunner/.debug/libnssckbi.so...done. done. Loaded symbols for /usr/lib/mozilla-xulrunner/libnssckbi.so Reading symbols from /usr/lib/mozilla-xulrunner/components/libimgicon.so...done. Loaded symbols for /usr/lib/mozilla-xulrunner/components/libimgicon.so 0x416600b4 in poll () from /lib/libc.so.6 (gdb) b gdk_window_invalidate_rect Breakpoint 1 at 0x41178384 (gdb) c Continuing. Breakpoint 1, 0x41178384 in gdk_window_invalidate_rect () from /usr/lib/libgdk-x11-2.0.so.0 (gdb) bt #0 0x41178384 in gdk_window_invalidate_rect () from /usr/lib/libgdk-x11-2.0.so.0 #1 0x40a3dba0 in ?? () from /usr/lib/mozilla-xulrunner/libxul.so (gdb) c Continuing. Breakpoint 1, 0x41178384 in gdk_window_invalidate_rect () from /usr/lib/libgdk-x11-2.0.so.0 root@gumstix-custom-basix:~/newtest/usr/local/fennec$ fg (gdb) Continuing. Breakpoint 1, 0x41178384 in gdk_window_invalidate_rect () from /usr/lib/libgdk-x11-2.0.so.0 (gdb) b XFlush Breakpoint 2 at 0x41371060 (gdb) c Continuing. Breakpoint 1, 0x41178384 in gdk_window_invalidate_rect () from /usr/lib/libgdk-x11-2.0.so.0 (gdb) bt #0 0x41178384 in gdk_window_invalidate_rect () from /usr/lib/libgdk-x11-2.0.so.0 #1 0x40a3dba0 in ?? () from /usr/lib/mozilla-xulrunner/libxul.so (gdb) c Continuing. Breakpoint 2, 0x41371060 in XFlush () from /usr/lib/libX11.so.6 (gdb) bt #0 0x41371060 in XFlush () from /usr/lib/libX11.so.6 #1 0x411779ac in gdk_window_process_all_updates () from /usr/lib/libgdk-x11-2.0.so.0 #2 0x41177a00 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 Cannot access memory at address 0x1 (gdb) c Continuing. Breakpoint 1, 0x41178384 in gdk_window_invalidate_rect () from /usr/lib/libgdk-x11-2.0.so.0 (gdb) c Continuing. Breakpoint 1, 0x41178384 in gdk_window_invalidate_rect () from /usr/lib/libgdk-x11-2.0.so.0 (gdb) c Continuing. Breakpoint 2, 0x41371060 in XFlush () from /usr/lib/libX11.so.6 (gdb) bt #0 0x41371060 in XFlush () from /usr/lib/libX11.so.6 #1 0x411779ac in gdk_window_process_all_updates () from /usr/lib/libgdk-x11-2.0.so.0 #2 0x41177a00 in ?? () from /usr/lib/libgdk-x11-2.0.so.0 Cannot access memory at address 0x1 (gdb) I'm attached to the correct xulrunner process as there is only one on the system. I can see most of the object symbols. For example, symbols with invalidate are: PKIX_PL_Object_InvalidateCache SSL_InvalidateSession atk_object_factory_invalidate g_closure_add_invalidate_notifier g_closure_invalidate g_closure_remove_invalidate_notifier gdk_window_invalidate_maybe_recurse gdk_window_invalidate_rect gdk_window_invalidate_region gtk_text_layout_invalidate Some more debugging output in case it is useful. (gdb) b atk_object_factory_invalidate Breakpoint 6 at 0x41137a44 (gdb) b g_closure_add_invalidate_notifier Breakpoint 7 at 0x412b3ec8 (gdb) b g_closure_invalidate Breakpoint 8 at 0x412b3e48 (gdb) b g_closure_remove_invalidate_notifier Breakpoint 9 at 0x412b3aa8 (gdb) b gdk_window_invalidate_maybe_recurse Breakpoint 10 at 0x41178018 (gdb) b gdk_window_invalidate_rect Note: breakpoint 1 also set at pc 0x41178384. Breakpoint 11 at 0x41178384 (gdb) b gdk_window_invalidate_region Breakpoint 12 at 0x41178350 (gdb) b gtk_text_layout_invalidate Breakpoint 13 at 0x40fc7660 (gdb) c Continuing. Breakpoint 1, 0x41178384 in gdk_window_invalidate_rect () from /usr/lib/libgdk-x11-2.0.so.0 (gdb) c Continuing. Breakpoint 12, 0x41178350 in gdk_window_invalidate_region () from /usr/lib/libgdk-x11-2.0.so.0 (gdb) c Continuing. Breakpoint 10, 0x41178018 in gdk_window_invalidate_maybe_recurse () from /usr/lib/libgdk-x11-2.0.so.0 (gdb) c Continuing. Breakpoint 1, 0x41178384 in gdk_window_invalidate_rect () from /usr/lib/libgdk-x11-2.0.so.0 (gdb) c Continuing. Breakpoint 12, 0x41178350 in gdk_window_invalidate_region () from /usr/lib/libgdk-x11-2.0.so.0 (gdb) c Continuing. Breakpoint 10, 0x41178018 in gdk_window_invalidate_maybe_recurse () from /usr/lib/libgdk-x11-2.0.so.0 (gdb) c Continuing. Breakpoint 2, 0x41371060 in XFlush () from /usr/lib/libX11.so.6 (gdb) c Continuing. Breakpoint 1, 0x41178384 in gdk_window_invalidate_rect () from /usr/lib/libgdk-x11-2.0.so.0 (gdb) c Continuing. Breakpoint 12, 0x41178350 in gdk_window_invalidate_region () from /usr/lib/libgdk-x11-2.0.so.0 (gdb) c Continuing. Breakpoint 10, 0x41178018 in gdk_window_invalidate_maybe_recurse () from /usr/lib/libgdk-x11-2.0.so.0 (gdb) c
Comment 1•16 years ago
|
||
if you're running fennec on there, i suspect you're running in to the code in deckbrowser.xml that does: this._updateTimeout = setTimeout(function () { if (!self.dragData.dragging) self._browserToCanvas(); }, 100); we're working to remove it. see bug 450930. you might try removing that and see if that fixes the problems you're seeing.
Reporter | ||
Comment 2•16 years ago
|
||
Thanks Stuart. That sounds like the right issue. I'll give this a try asap.
Reporter | ||
Comment 3•16 years ago
|
||
Hi. I've made some progress with testing. Here are my notes: - I was previously using xulrunner. I've now switched my build over to fennec. - I'm using top of hg tree from Sun 8/24. $ fennec --version Mozilla Fennec 0.7, Copyright (c) 2008 Mozilla.org nsStringStats => mAllocCount: 6 => mReallocCount: 2 => mFreeCount: 6 => mShareCount: 3 => mAdoptCount: 0 => mAdoptFreeCount: 0 - If I change timeout to 1000, I no longer get flashing but I also no longer get the page pane. I've put a digicam pic of that here. http://sites.google.com/site/jayakumarlkml/ - If I change timeout to 200, or 400. I still get flashing. I couldn't tell if the rate has changed. If I had to say, I would guess it has not but that clashes with the above observation. ps: is there an easy way for me to edit deckbrowser.xml. I currently use the following process: a) unzip browser.jar b) edit xml c) zip -r d) transfer to gumstix e) test Any feedback and advice would be welcome. Thanks.
Reporter | ||
Comment 4•16 years ago
|
||
Oops, forgot to mention: - if I takeout the whole block, ie: delete the following from deckbrowser.xml this._updateTimeout = setTimeout(function () { if (!self.dragData.dragging && !self.dragData.kineticId) self._browserToCanvas(); }, 1000); then the observed behavior is the same as when setting it to 1000, which is no flashing and no page displayed. - btw, there is quite a bit of console output when i run fennec. I haven't understood it yet. I will attach it here for review.
Reporter | ||
Comment 5•16 years ago
|
||
This output is from the unmodified chrome deckbrowser.xml so it flashes.
Comment 6•16 years ago
|
||
Jaya, is this better now? We shouldn't be repainting as much anymore
Updated•16 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 7•16 years ago
|
||
Oops sorry. I meant to update the bug. Yes, the problem appears to be fixed! Thanks. Here's a video clip showing it in action: http://www.youtube.com/watch?v=BabGfRBAtF4 Thanks to everyone who helped! There are some other performance issues but I'll file separate bugs once I figure out the root causes.
You need to log in
before you can comment on or make changes to this bug.
Description
•