java plugin in nspluginviewer

Till Krech till at snafu.de
Mon Oct 21 20:29:00 BST 2002


On Monday 21 October 2002 11:47, Dirk Mueller wrote:
> On Mon, 21 Okt 2002, Till Krech wrote:
> > 1) I do not get any debug output from nspluginviewer. It is started from
> > a KProcess within the plugin_part in konqueror. My workaround: use
> > receivedStderr signal and a slotStderr wich does a kdDebug. Not very
> > nice.
>
> it should end up in ~/.X.err, or in the konsole window you restarted
> kdeinit in.
both negative. Goes to /dev/null. No idea who/what redirects it.
>
> > 2) Width and height of a plugin are set to 1600 x 1200 by default.
>
> Thats a bug.
>
> > The width and height attributes of an <object> tag are not passed to the
> > plugin which only understands parameters such as
> > <param name="width" value="400">
> > I found a workaround by 'converting' the attributes to pseudo params
> > __KHTML__WIDTH and __KHTML_HEIGHT in khtml/rendering/render_frames.cpp as
> > it is already done with other attributes like this:
> >       params.append( QString::fromLatin1("__KHTML__WIDTH=\"%1\"").arg(
> > o->getAttribute(ATTR_WIDTH).string() ) );
> >       params.append( QString::fromLatin1("__KHTML__HEIGHT=\"%1\"").arg(
> > o->getAttribute(ATTR_HEIGHT).string() ) );
>
> I'm not sure why we need such a complex format for passing it downwards
> (who parses that? nspluginviewer or the nsplugin itself?)
Will try to find a better solution. But with 'codebase' it is already done in 
the same way.
>
> > 3) The java plugin does not work with user agent strings other than
> > Netscape 4.7. It is possible to define a pseudo domain 'nspluginviewer'
> > and to set the user agent string for this domain. But this makes not much
> > sense. Why should a user be able/obligated to configure this ? Netscape
> > plugins are for Netscape browsers. nspluginviewer can only handle ns4
> > plugins.
>
> what happens when there is a different user agent string set ?
The plugin quits immediately with some message about wrong netscape version 
number 5, expects 4. Comes from "Mozilla/5.0 (compatible; Konqueror/3; 
Linux)" The message goes to stderr, so it's very difficult to see it (see 
above) ;-)
>
> > 4) there are crashes in the nspluginviewer because of memory corruption.
> > I tried to run konqueror with valgrind --trace-children but it stops when
> > loading the netscape plugin shared object file.
>
> How does it load it ? with dlopen? valgrind should be able to survive that.
yeah. it even runs konqueror itself with all these gimmicks in shared 
libraries ;)
The lib is loaded like this: 
_handle = KLibLoader::self()->library(QFile::encodeName(library));
and yes, this does a 
lt_dlhandle handle = lt_dlopen( libfile.latin1() );
But valgrind doesn't want to trace this plugin lib. Can a program/library 
forbid to be traced ? Sorry if this is a stupid question.
>
> Yeah, I also suspect quite some bugs in nspluginviewer, but its a bitch to
> debug this thing :(
nspluginviewer annoys me since quite some time. I have also problems with the 
realplayer plugin. I'll see what I can do to look under the skirt of this 
bitch and what I'll find out :)
>
> you could try valgrinding only the child itself by hacking in that it
> ld_preloads the valgrind.so lib.
That would be a great solution. Do you have any details on how to proceed ?
>
> >    delete _tempFile;
> > ----->   delete _queue;
> > }
> >
> > _queue is not a pointer. What happens upon delete ? Isn't _queue deleted
> > automatically when NSPluginStreamBase is deleted?
>
> it deletes the contents of _queue. yes, _queue (the container object) is
> deleted, but not its contents.
Not very obvious ;-)


-- 
Till Krech from Berlin, Germany is happy with
SuSE Linux 8.0 (i386) 2.4.18-64GB-SMP * KDE: 3.0.8 (KDE 3.1 beta2)
Qt: 3.1.0-b2 * gcc version 3.2





More information about the kfm-devel mailing list