bugGnash - The GNU Flash player - Bugs: bug #20835, Gnash doesn't work with Konqueror...

 
 

bug #20835: Gnash doesn't work with Konqueror (without Klash)

Submitted by:  David Martínez Martí <deavidsedice>
Submitted on:  Sun 19 Aug 2007 04:41:45 PM UTC  
Votes:  38  
 
Category: pluginSeverity: 3 - Normal
Release: 0.8.0 releaseStatus: Fixed
Privacy: PublicAssigned to: Dossy Shiobara <dossy>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 16 Mar 2009 02:59:39 PM UTC, comment #5:

This is probably in progress or working for Qt4. If it doesn't work for Qt3, it quite likely never will unless someone contributes the code.

Benjamin Wolsey <bwy>
Project Member
 Spam posted by an anonymous
Thu 15 May 2008 07:58:56 PM UTC, comment #4:

I've tried both the current CVS as of today as well as a CVS snapshot from 2008-04-17 on Gentoo/Linux amd64 with konqueror 3.5.8, but no luck. In both cases nspluginviewer crashes with SIGSEGV every time I try to visit youtube.
However, the nsplugin works fine in firefox and the klash kpart works fine i konquer, so there is no real hurry, I get my youtube videos anyway...

Jon Severinsson <jonseverinsson>
Mon 17 Mar 2008 03:30:25 PM UTC, comment #3:

I completed committing changes to plugin/mozilla-sdk, which I hope will close this bug. I'm marking this bug "ready for test."

Dossy Shiobara <dossy>In charge of this item.
Sat 15 Mar 2008 08:46:05 PM UTC, comment #2:

On Windows XP with Firefox 2.0.0.12, I see a similar problem. aNPNFuncs->size is 172, while sizeof(NPNetscapeFuncs) is 184. Because fillNetscapeFunctionTable() returns NPERR_INVALID_FUNCTABLE_ERROR, np_entry.cpp:NP_Initialize() returns without calling NS_PluginInitialize(). However, it seems Firefox ignores the NPERR_INVALID_FUNCTABLE_ERROR status and continues to load the plugin, regardless.

Considering that the npgnash.dll plugin on Win32 continues to "work" even though the NPNFuncs table didn't get populated (as fillNetscapeFunctionTable() returned early), I wonder if we can safely return NPERR_NO_ERROR instead when there's a structure size mismatch.

I'm looking at this code right now, hopefully we'll have some sort of workable solution.

Dossy Shiobara <dossy>In charge of this item.
Wed 29 Aug 2007 06:04:03 PM UTC, comment #1:

Very interesting. It seems we're using a different NSAPI version than the one expected by your nspluginviewer.
Maybe switching to an older one would do the trick, assuming newer versions will support the older too.

Sandro Santilli <strk>
Project Member
Sun 19 Aug 2007 04:41:45 PM UTC, original submission:

I'm trying to load Gnash plugin for firefox into Konqueror directly, as I can do with libflashplayer.so.

Konqueror can't load Gnash this way, but I tried to debug it.
Konq is using an app called nspluginviewer, wich is a KPart plugin, to render the netscape plugins onto the webpage.

I downloaded kdebase sourcecode, to see how nspluginviewer is working (It is placed in ./nsplugin/viewer) and added some lines to debug the error.

an example of init code follows:
___________________________________
// initialize plugin
NPError error = _NP_Initialize(&_nsFuncs, &_pluginFuncs);
kdDebug(1431) << "_NP_Initialize(" << &_nsFuncs << ", " << &_pluginFuncs << ") return value = " << error << endl;
CHECK(Initialize,error);
_____________________________________________

(there are other lines modified)

And, when I try to see youtube.com, Konqueror prints this onto the shell (without crashing):
_________________________________________
1 - XSetErrorHandler
2 - parseCommandLine
3 - create QXtEventLoop
4 - create KApplication
nspluginviewer (Qt/Xt): 5 - app.dcopClient
nspluginviewer (Qt/Xt): 6 - dcop->registerAs
nspluginviewer (Qt/Xt): 7 - new NSPluginViewer
nspluginviewer (Qt/Xt): 8 - app.exec()
nspluginviewer (plugin): NSPluginViewer::NewClass( /home/deavid/.mozilla/plugins/libgnashplugin.so)
nspluginviewer (plugin): Plugin library /home/deavid/.mozilla/plugins/libgnashplugin.so loaded!
nspluginviewer (plugin): NSPluginClass::Initialize()
nspluginviewer (plugin): NSPluginClass _pluginFuncs.size = 60
nspluginviewer (plugin): NSPluginClass _nsFuncs.size = 88
nspluginviewer (plugin): NSPluginClass _nsFuncs require 88
nspluginviewer (plugin): _NP_Initialize(0x80d3100, 0x80d30c4) return value = 3
nspluginviewer: Result of
nspluginviewer (plugin): Init exited with 3
nspluginviewer (plugin): Error when loading plugin.
nspluginviewer (plugin): ERROR: Can't create plugin class; id: konqueror-14284 ; plugin: /home/deavid/.mozilla/plugins/libgnashplugin.so
nspluginviewer (plugin): NSPluginClass::shutdown error=true
nspluginviewer (plugin): NSPluginViewer::shutdown
nspluginviewer (plugin): NSPluginViewer::~NSPluginViewer
_____________________________________

I searched for that error number, 3. The error numbers are listed in napi.h :
_______________________________________
#define NPERR_BASE 0
#define NPERR_NO_ERROR (NPERR_BASE + 0)
#define NPERR_GENERIC_ERROR (NPERR_BASE + 1)
#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2)
#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3)
#define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4)
#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5)
#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6)
#define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7)
#define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8)
#define NPERR_INVALID_PARAM (NPERR_BASE + 9)
#define NPERR_INVALID_URL (NPERR_BASE + 10)
#define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11)
#define NPERR_NO_DATA (NPERR_BASE + 12)
#define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13)
___________________________________________________

Then, 3 means: NPERR_INVALID_FUNCTABLE_ERROR

Time to search Gnash plugin. I have a HEAD release from 2-3 days ago. The init code from Gnash, plugin.cpp:
__________________________________________________
NPError
NS_PluginInitialize()
{
NPError err = NPERR_NO_ERROR;
PRBool supportsXEmbed = PR_TRUE;
NPNToolkitType toolkit;

// Make sure that the browser supports functionality we need
err = CallNPN_GetValueProc(NPNFuncs.getvalue, NULL,
NPNVSupportsXEmbedBool,
(void *)&supportsXEmbed);

if (err != NPERR_NO_ERROR || !supportsXEmbed) {
cout << "No xEmbed support in this Mozilla version!" << endl;
return NPERR_INCOMPATIBLE_VERSION_ERROR;
} else {
cout << "xEmbed supported in this Mozilla version" << endl;
}
.
.
.
______________________________________________
But note that, konqueror is not printing nothing about xEmbed. This means, that the code is return early.
I think it is exiting in plugin/mozilla-sdk/np_entry.cpp
______________________________________________

DSOEXPORT static NPError fillNetscapeFunctionTable(NPNetscapeFuncs* aNPNFuncs)
{
if(aNPNFuncs == NULL)
return NPERR_INVALID_FUNCTABLE_ERROR;

if(HIBYTE(aNPNFuncs->version) > NP_VERSION_MAJOR)
return NPERR_INCOMPATIBLE_VERSION_ERROR;

if(aNPNFuncs->size < sizeof(NPNetscapeFuncs))
return NPERR_INVALID_FUNCTABLE_ERROR; // *** IN THIS LINE
.
.
.
___________________________________________

I tried to increase the number in aNPNFuncs->size by 80 bytes, and now, the error changes. (If I increase it in 75 bytes, the error is the same)
I don't know why. nspluginviewer says that sizeof(NPNetscapeFuncs) is equal to 88 bytes and Gnash plugin, 88 is a value lower than sizeof(NPNetscapeFuncs).

Well, after compiling nspluginviewer with +80 bits for aNPNFucns, I get this error:
___________________________________________
1 - XSetErrorHandler
2 - parseCommandLine
3 - create QXtEventLoop
4 - create KApplication
nspluginviewer (Qt/Xt): 5 - app.dcopClient
nspluginviewer (Qt/Xt): 6 - dcop->registerAs
nspluginviewer (Qt/Xt): 7 - new NSPluginViewer
nspluginviewer (Qt/Xt): 8 - app.exec()
nspluginviewer (plugin): NSPluginViewer::NewClass( /home/deavid/.mozilla/plugins/libgnashplugin.so)
nspluginviewer (plugin): Plugin library /home/deavid/.mozilla/plugins/libgnashplugin.so loaded!
nspluginviewer (plugin): NSPluginClass::Initialize()
nspluginviewer (plugin): NSPluginClass _pluginFuncs.size = 60
nspluginviewer (plugin): NSPluginClass _nsFuncs.size = 168
nspluginviewer (plugin): NSPluginClass _nsFuncs require 88
nspluginviewer (plugin): g_NPN_GetValue(), variable=14
No xEmbed support in this Mozilla version!
nspluginviewer (plugin): _NP_Initialize(0x80d31d8, 0x80d319c) return value = 8
nspluginviewer: Result of
nspluginviewer (plugin): Init exited with 8
nspluginviewer (plugin): Error when loading plugin.
nspluginviewer (plugin): ERROR: Can't create plugin class; id: konqueror-19270 ; plugin: /home/deavid/.mozilla/plugins/libgnashplugin.so
nspluginviewer (plugin): NSPluginClass::shutdown error=true
nspluginviewer (plugin): NSPluginViewer::shutdown
nspluginviewer (plugin): NSPluginViewer::~NSPluginViewer
_____________________________________________

8 means NPERR_INCOMPATIBLE_VERSION_ERROR.

Now I can get the "No xEmbed support in this Mozilla version!" message. (like Opera)

By the way, I tested Opera with gnash. It does not work, but it prints in the console:
__________________________________________
No xEmbed support in this Mozilla version!
opera: Plug-in 19895 is not responding. It will be closed.
opera: Define environment variable OPERA_KEEP_BLOCKED_PLUGIN to keep blocked plug-ins.
__________________________________________

I hope that report helps,

David.

David Martínez Martí <deavidsedice>

 

(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 bwy (Posted a comment)
  • -unavailable- added by nelsonrn (Updated the item)
  • -unavailable- added by jonseverinsson (Posted a comment)
  • -unavailable- added by dossy (Posted a comment)
  • -unavailable- added by dossy (Voted in favor of this item)
  • -unavailable- added by skroob (Voted in favor of this item)
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by deavidsedice (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 38 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 13 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 16 Mar 2009 02:59:39 PM UTCbwyStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Fri 01 Aug 2008 09:58:16 PM UTCnelsonrnReleaseNone=>0.8.0 release
      Item Group0.8.0 release=>None
    Wed 09 Jul 2008 09:54:40 AM UTCstrkAttached File#16054=>Removed
    Wed 09 Jul 2008 09:54:39 AM UTCstrkAttached File#16054=>Removed
    Wed 09 Jul 2008 07:09:04 AM UTCNoneAttached File-=>Added valid_atom_80x15.png, #16054
    Mon 17 Mar 2008 03:30:25 PM UTCdossyStatusIn Progress=>Ready For Test
    Sat 15 Mar 2008 08:46:05 PM UTCdossyStatusNone=>In Progress
      Assigned toNone=>dossy
      Carbon-Copy-=>Added dossy
    Wed 19 Sep 2007 04:15:08 PM UTCskroobCarbon-Copy-=>Added skroob
    Sun 19 Aug 2007 04:41:45 PM UTCdeavidsediceCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1