bugGnash - The GNU Flash player - Bugs: bug #20586, handling of --pixelformat is not...

 
 

bug #20586: handling of --pixelformat is not considering multiple guis

Submitted by:  Sandro Santilli <strk>
Submitted on:  Wed 25 Jul 2007 01:43:19 PM UTC  
 
Category: gui-kde3Severity: 5 - Blocker
Release: NoneStatus: Fixed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 27 Jul 2007 07:20:44 AM UTC, comment #8:

Have a look at create_render_handler_agg() (it's at the very bottom of render_handler_agg.cpp). You see the function creates instances of render_handler_agg based on the "pixelformat" parameter. Due to the template nature this makes the compiler build all pixel formats found in that function.

It doesn't matter what pixel format is actually used at runtime, the compiler must provide all.

Other pixel formats can be added easily to this list and it will cause one more duplicate of the AGG renderer class.

This is not a real problem, but it means the binary increases by a few kbytes. IIRC choosing only one pixel format instead of all decreases it by 200-300 kb or so, but I'm not sure.

Udo Giacomozzi <udog>
Project Member
Thu 26 Jul 2007 11:05:29 PM UTC, comment #7:

Isn't an AGG renderer built only when actually instantiated ?

You can still restrict pixel format using an explicit --with-pixelformat and guis uwing --enable-gui=<one_gui_only> and --disable-klash (klash forces build of the KDE gui as well)

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 26 Jul 2007 10:38:15 PM UTC, comment #6:

No problem when all pixel formats are built. But be aware:

- this results in larger binaries because nearly the complete AGG renderer is rebuilt for each pixel format (and it's not that small)

- I absolutely need a way to esplicitely limit the pixel formats (and the GUI) when I know that I'll gonna use only a certain GUI/renderer combination with one single known pixel format and need to reduce binary size. This is very important for me and probably for all others who want to use Gnash in embedded environments (OLPC, any?).

Udo Giacomozzi <udog>
Project Member
Thu 26 Jul 2007 10:08:09 PM UTC, comment #5:

The problem was silent error handling (in the best case, in the worst was missing return-code checks).

Basically, the pixelformat required for SDL or KDE weren't being buit.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 26 Jul 2007 07:56:09 PM UTC, comment #4:

Finally found the real root of the problem. The configure script limits the pixelformat to a single GUI, if GTK is in the set,
this means that KDE and SDL (the one I tested, but possibly more) will not work, as they need a different pixel format.

The fix would be easy, just never limit pixelformats... any problem with that ?

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 26 Jul 2007 05:06:24 PM UTC, comment #3:

Mmm... I'm actually also having problems with a shared build.
--enable-gui=gtk,kde,sdl is building but -G sdl and -G kde don't work (segfault in kde case, premature exit on sdl case)

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 26 Jul 2007 03:57:05 PM UTC, comment #2:

It seems this boils down to static linking, which works with gtk but not with sdl or kde, but I'm still not sure ..

Sandro Santilli <strk>
Project MemberIn charge of this item.
Wed 25 Jul 2007 04:42:07 PM UTC, comment #1:

This was with --enable-gui=gtk,kde, so that 'gnash' was linked against linghashgtk_agg.la and 'klash' against libgnashkde_agg.la.

Just tried with --enable-gui=kde (both gnash and klash having the same linking) and could not reproduce the segfault.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Wed 25 Jul 2007 01:43:19 PM UTC, original submission:

I just tried the 'klash' binary coming out from my last Makefile.am patch. Here's the backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1242863920 (LWP 25675)]
0xb7e5b566 in gnash::KdeAggGlue::setInvalidatedRegions (this=0x806aae0, ranges=@0xbfa22260) at /home/strk/src/gnash/gnash-head/gui/kde_glue_agg.cpp:114
114 _renderer->set_invalidated_regions(ranges);
(gdb) bt
#0 0xb7e5b566 in gnash::KdeAggGlue::setInvalidatedRegions (this=0x806aae0, ranges=@0xbfa22260) at /home/strk/src/gnash/gnash-head/gui/kde_glue_agg.cpp:114
#1 0xb7e5e5cd in gnash::KdeGui::setInvalidatedRegions (this=0x806aa78, ranges=@0x0) at /home/strk/src/gnash/gnash-head/gui/kde.cpp:108
#2 0xb7e605e0 in gnash::qwidget::paintEvent (this=0x812a2e0, event=0xbfa2255c) at /home/strk/src/gnash/gnash-head/gui/kde.cpp:435
#3 0xb6caca55 in QWidget::event () from /usr/lib/libqt-mt.so.3
#4 0xb6c0ca60 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#5 0xb6c0f42a in QApplication::notify () from /usr/lib/libqt-mt.so.3
#6 0xb6b9f25d in QApplication::sendSpontaneousEvent () from /usr/lib/libqt-mt.so.3
#7 0xb6b8dcaa in QETWidget::translatePaintEvent () from /usr/lib/libqt-mt.so.3
#8 0xb6b9c04c in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#9 0xb6bb3180 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#10 0xb6c27136 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#11 0xb6c26f46 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#12 0xb6c0e609 in QApplication::exec () from /usr/lib/libqt-mt.so.3

Sandro Santilli <strk>
Project MemberIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by udog (Posted a comment)
  • -unavailable- added by strk (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 26 Jul 2007 10:08:09 PM UTCstrkStatusConfirmed=>Fixed
      Assigned toNone=>strk
      Open/ClosedOpen=>Closed
    Thu 26 Jul 2007 07:56:09 PM UTCstrkSeverity6 - Security=>5 - Blocker
      StatusNone=>Confirmed
      Summaryruntime GUI selection doesn\'t work with --disable-shared=>handling of --pixelformat is not considering multiple guis
      Carbon-Copy-=>Added udog
    Thu 26 Jul 2007 04:14:47 PM UTCstrkSummarysegfault on startup with \'klash\' standalone=>runtime GUI selection doesn't work with --disable-shared

    Back to the top


    Powered by Savane 3.1-cleanup1