bugGnash - The GNU Flash player - Bugs: bug #20102, 100% cpu usage and no zoom,...

 
 

bug #20102: 100% cpu usage and no zoom, current HEAD (2007-06-06)

Submitter:  None
Submitted:  Wed 06 Jun 2007 05:22:23 PM UTC
   
 
Category:  core Severity:  3 - Normal
Release:  None Status:  Fixed
Privacy:  Public Assigned to:  strk
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 19 Jun 2007 06:22:36 PM UTC, comment #11: 

Yes please, file another as the mouse clicks weren't supported even before my fix. If you find out by which mean they are requested (Mouse.addListener ? What else ?) that'll help.

For the rendering quality, AGG does a good job for me, try it out.
Anyway we still want a bug item for it even if it's an opengl-only problem.

Sandro Santilli <strk>
Group Member
Tue 19 Jun 2007 02:59:50 PM UTC, comment #10: 

I can confirm that the 100% cpu is gone, it's seems to stabilize around 9-10% (current HEAD).

The bad rendering and broken zoom is still there though.
Do you want me to post another bug for those issues?

Thank you for fixing this

Regards
Fredrik Johansson

Fredrik Johansson <mumme>
Tue 19 Jun 2007 10:02:02 AM UTC, comment #9: 

I removed the unneeded call, and the 100% CPU bug seems fixed.
There might be cases which are now bogus (morph characters
handing mouse events).
The correct fix IMHO, would be to define more character instance
classes rather then relying on a "generic_character".

A derivated class would do, btw, as the fix in generic_character
is just for a default implementation of can_handle_mouse_events
and get_topmost_mouse_entity.

Sandro Santilli <strk>
Group Member
Tue 19 Jun 2007 09:40:39 AM UTC, comment #8: 

I found that generic_character::get_topmost_mouse_entity, called by sprite_instance;:get_topmost_mouse_entity, is calling the paren'ts can_handle_mouse_event, while NOT needed (at least when parent is a sprite).

We should fix this, and make sure other kind of parents (button_instances for example) still work.

Sandro Santilli <strk>
Group Member
Thu 07 Jun 2007 06:32:00 AM UTC, comment #7: 

I'm writing some notes here, to help fixing the events design:
http://gnashdev.org/wiki/index.php/MouseEvents

Sandro Santilli <strk>
Group Member
Thu 07 Jun 2007 04:46:43 AM UTC, comment #6: 

I tried the patch and yes its easier on cpu, but does'nt repaint that well when embedded in i the html page after you scrolled down and up a couple of times (in and out of visiblity). It's a lot of gray areas in the image. I assume that it's because it busy doing something else.

Still the zoom and pan doesn't work.

Just figured you should know about the scroll issues.

Thank you for the fast response!

Regards
Fredrik Johansson

Anonymous
Thu 07 Jun 2007 01:35:00 AM UTC, comment #5: 


>>My plan is to fix by using the m_has_mouse_event member instead.

Agree, this will be much cheaper concerning cpu usage. And it will be good that "m_has_mouse_event" will tell us whether the character has onClipEvent handlers and/or user defined handlers.


>>Your support is highly appreciated ;)

I can work on this after finishing the Key event recently.

Zou Lunkai <zoulunkai>
Wed 06 Jun 2007 08:46:21 PM UTC, comment #4: 

Attached is a patch that fixes that problem and triggers no unexpected failures in our testsuite.
Anyway I belive the patch to be not safe, in that it relies on a cached value not properly maintained.
The patch itself contain some comments.

(file #12979)

Sandro Santilli <strk>
Group Member
Wed 06 Jun 2007 07:33:41 PM UTC, comment #3: 

Zou, I profiled and the slowdown is due to the sprite_instance::can_handle_mouse_events() function doing expensive
calls to getUserDefinedEvent.
My plan is to fix by using the m_has_mouse_event member instead, but I'm afraid about touching the functions setting that flag trough a call to has_mouse_event() being:

For clip events:
 character::add_event_handler

For user defined events:
  sprite_instance::checkForKeyOrMouseEvent

Your support is highly appreciated ;)

Sandro Santilli <strk>
Group Member
Wed 06 Jun 2007 07:25:47 PM UTC, comment #2: 

Yes It's probably mouserelated.

cpu without mouse move: around 60% cpu

cpu when moving cursor inside gnash window: 100%

waiting around 10s with cursor inside gnash window, not moving mouse: around 60%


Hope It helps!

Regards
Fredrik Johansson

Anonymous
Wed 06 Jun 2007 05:52:15 PM UTC, comment #1: 

Seems related to mouse events. Can you confirm not moving the mouse keeps the CPU usage low ?

Sandro Santilli <strk>
Group Member
Wed 06 Jun 2007 05:22:23 PM UTC, original submission:  

Hi !

I found a flash movie that eats up my CPU
http://centralhobbies.com/Engines/parts/ys63s.swf

Found in webpage:
http://centralhobbies.com/Engines/parts/ys63s.html

Also the zooming doesn't seem to work.
If I interpret the HTML source correctly it should be flash version 6 (..swfflash.cab#version=6,0,40,0)

I read somewhere the gnash is nearing a new release, so I figured you wanted some user feedback on current HEAD

I'm on Kubuntu 7.04 x86_64

My dumpconfig:

Building in directories: libbase libgeometry libamf server backend utilities gui testsuite po   plugin extensions cygnal
Some directories may be excluded from the build
Linux linux64 2.6.20-16-generic #2 SMP Wed May 23 00:30:47 UTC 2007 x86_64 GNU/Linux
g++ -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)

Image decoding support...
        JPEG_CFLAGS is
        JPEG_LIBS is -L/usr/lib64 -ljpeg
        PNG_CFLAGS is
        PNG_LIBS is
Audio decoding support...
        FFMPEG_CFLAGS is
        FFMPEG_LIBS is -lavcodec -lz -la52 -ldts -lgsm -ldc1394_control -ldl -lvorbisenc -lraw1394 -lavutil -lvorbis -lm -logg   -ldts_pic   -lvorbisenc -lvorbis -lm -logg   -lavformat -lavcodec -lz -la52 -ldts -lgsm -ldc1394_control -ldl -lvorbisenc -lraw1394 -lavutil -lvorbis -lm -logg   -lavutil   -ltheora -logg   -ldc1394_control
        OGG_CFLAGS is
        OGG_LIBS is
GUI Toolkit decoding support...
        SDL_CFLAGS is -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL
        SDL_LIBS is -lSDL
        KDE_CFLAGS is -I/usr/include/kde -I/usr/include/kde/kio
        KDE_LIBS is -lkdeui -lkdecore -lkdeprint
        QT_CFLAGS is -I/usr/include/qt3
        QT_LIBS is -L/usr/lib -lqt-mt
        GTK2_CFLAGS is -DPNG_NO_MMX_CODE -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12
        GTK2_LIBS is -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXfixes -lpango-1.0 -lcairo -lX11 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
        PANGO_CFLAGS is -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
        PANGO_LIBS is -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
        ATK_CFLAGS is -I/usr/include/atk-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
        ATK_LIBS is -latk-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
        X11_CFLAGS is -I/usr/include
        X11_LIBS is -L/usr/lib64 -lX11 -lXinerama -lXext -lSM -lICE
Support libraries...
        INCLTDL
        LIBLTDL -lltdl
        GLIB_CFLAGS is -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
        GLIB_LIBS is -lglib-2.0
        Z_CFLAGS is
        Z_LIBS is -L/usr/lib64 -lz
        LIBXML_CFLAGS is -I/usr/include/libxml2
        LIBXML_LIBS is -lxml2
        PTHREAD_CFLAGS is -pthread
        PTHREAD_LIBS is -L/usr/lib64 -lpthread
        CURL_CFLAGS is
        CURL_LIBS is -L/usr/lib -lcurl
        BOOST_CFLAGS is -I/usr/include
        BOOST_LIBS is -L/usr/lib64 -lboost_date_time -lboost_thread
        MTASC /usr/bin/mtasc
        MTASC CLASSPATH /usr/bin/std
        SWFMILL /usr/local/bin/swfmill
Graphics support...
        CAIRO_CFLAGS is -DPNG_NO_MMX_CODE -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12
        CAIRO_LIBS is -lcairo
        AGG_CFLAGS is -I/usr/include/agg2
        AGG_LIBS is -lagg_pic
A blank value for CFLAGS means the header is installed in the
default system header location. All the LIBS should have a
legit value

Configurable options are:
Media handler: ffmpeg
Renderer engine: agg
GUI: gtk2
Extensions:



Thank you for the great work you do in Gnash!

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #12979:  canHandleMouseEvent.patch added by strk (4KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mumme (Posted a comment)
  • -email is unavailable- added by zoulunkai (Posted a comment)
  • -email is unavailable- added by strk (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-06-19 strk StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2007-06-19 strk StatusIn Progress Ready For Test
    2007-06-06 strk Attached File- Added canHandleMouseEvent.patch, #12979
        CategoryNone core
        StatusNone In Progress
        Assigned toNone strk
    2007-06-06 strk Carbon-Copy- Added zoulunkai

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code