Bug 65868 - Flash content missing
Summary: Flash content missing
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: nspluginviewer (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Linux
: HI grave
Target Milestone: ---
Assignee: George Staikos
URL:
Keywords:
: 66239 67259 67606 67721 67789 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-11 17:06 UTC by Whitehawk Stormchaser
Modified: 2003-11-22 00:34 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Whitehawk Stormchaser 2003-10-11 17:06:07 UTC
Version:           CVS-20031007 (using KDE Devel)
Installed from:    Compiled sources
Compiler:          GCC 3.3 
OS:          Linux

In current CVS the flash plugin (nsplugins) gets loaded, but the only thing showing in the flash embeded area there is a right-mouse-click menu, but the other content is missing...
Plugin works fine under Mozilla.

This is one of the flash-enabled pages:
http://www.envir.it/italy/default.htm
Comment 1 George Staikos 2003-10-16 23:36:00 UTC
Confirmed after update to kwin_iii 10/16/2003.  Nsplugins are broken.
Comment 2 David Faure 2003-10-17 14:46:06 UTC
It appears that this has been fixed; the flash contents appear again.
I get a strange warning from some Java applet though:
Exception in thread "main" java.lang.NoSuchMethodError: java.security.Security: method getProviders(Ljava/lang/String;)[Ljava/security/Provider; not found
Comment 3 George Staikos 2003-10-17 16:24:10 UTC
That's cool because it doesn't work for me.
Comment 4 George Staikos 2003-10-19 18:15:03 UTC
*** Bug 66239 has been marked as a duplicate of this bug. ***
Comment 5 Arkadiusz Miskiewicz 2003-10-29 18:41:41 UTC
If I try to watch some local flash file I get:
...
nspluginviewer: stream as file /home/users/arekm/jesien2003.swf
nspluginviewer: Result of
nspluginviewer (plugin): -> NSPluginInstance::streamFinished
nspluginviewer (plugin): looking for waiting requests
nspluginviewer (plugin): request found
nspluginviewer (plugin): Starting new stream javascript:window.location+"__flashplugin_unique__"
nspluginviewer: getting javascript:window.location+"__flashplugin_unique__"
nspluginviewer (part): PluginPart::pluginResized()
nspluginviewer: ERROR: ERROR 3: couldn't create slave : Cannot open io-slave:
klauncher returned: Unknown protocol ? 'javascript'.
nspluginviewer:
nspluginviewer (plugin): finish error=true
nspluginviewer: Result of
nspluginviewer (plugin): NewStream stype=1 url=javascript:window.location+"__flashplugin_unique__" mime=
nspluginviewer: Result of
nspluginviewer (plugin): -> NSPluginInstance::streamFinished
nspluginviewer (plugin): -> NSPluginInstance::resizePlugin( w=494, h=349 )
nspluginviewer (plugin): -> NSPluginInstance::setWindow
nspluginviewer (plugin): Window ID = 0x3800018
nspluginviewer: Result of
nspluginviewer (plugin): <- NSPluginInstance::setWindow = 0
nspluginviewer (plugin): <- NSPluginInstance::resizePlugin
nspluginviewer (plugin): looking for waiting requests
konqueror: NSPluginInstance(client)::resizeEvent
konqueror: PluginPart::statusMessage ??danie file:/home/users/arekm/jesien2003.swf

Of course it doesn't work for remote flashes, too. I have javascript enabled. Where ,,javascript'' protocol should be registered because it seems that this causes problems.
Comment 6 Helio Chissini de Castro 2003-10-30 21:51:18 UTC
There some interesting things:
1 - Flash animation load correctly
2 - If you do some interaction on image ( try change quality ), you can see the initial frame
3 - If you use the menu forward, you can pass frame by frame
So, we have the full flash animation available
The real issue is that they refuse to play, or even accept interaction if you advance using forward to a clickable part ( but as not ply, it's quite obvious )
Comment 7 George Staikos 2003-10-31 01:04:44 UTC
Subject: Re:  Flash content missing

  Don't worry too much about this bug right now.  I know what it is and what's 
causing it, and I have a patch that should fix it.  The problem is that the 
patch causes other major problems that I haven't been able to sort out yet.

Comment 8 George Staikos 2003-11-05 03:51:23 UTC
*** Bug 67259 has been marked as a duplicate of this bug. ***
Comment 9 Stephan Kulow 2003-11-08 22:10:26 UTC
*** Bug 67606 has been marked as a duplicate of this bug. ***
Comment 10 Thiago Macieira 2003-11-10 02:36:47 UTC
*** Bug 67721 has been marked as a duplicate of this bug. ***
Comment 11 Stephan Kulow 2003-11-10 17:48:30 UTC
*** Bug 67789 has been marked as a duplicate of this bug. ***
Comment 12 Amit Shah 2003-11-11 06:12:56 UTC
In my case: 100% cpu is utilized, can't see animations with forward/back, etc., so can't play any flash movie.

I also get the javascript error; am not sure if the flash plugin causes it. I've installed blackdown jre and the plugins, installed them in mozilla and imported in konqueror. (Same for Flash; installed in Mozilla, imported in konqueror).
Comment 13 Koos Vriezen 2003-11-19 23:42:21 UTC
George, can you give some hint what you think causing it? I wonder if bug  #67898 might be related. I suspect the wm here, but the proxy widget drawing in khtml does funny things also, eg protecting
'paintWidget(p, m_widget, x, y, w, h, _tx, _ty);' render_replaced.cpp:381 with 'if (!::qt_cast<RenderPartObject *>(this))' at least makes the control buttons of kmplayer plugin not disappear randomly. Other things I don't trush in khtml is the eventFiltering on pluging (and its child widgets), setting the background mode on these and not clipping right on the paint device the first time plugins are painted.
Comment 14 George Staikos 2003-11-20 20:42:25 UTC
Subject: Re:  Flash content missing

On Wednesday 19 November 2003 17:42, you wrote:
> ------- George, can you give some hint what you think causing it? I wonder
> if bug  #67898 might be related. I suspect the wm here, but the proxy
> widget drawing in khtml does funny things also, eg protecting
> 'paintWidget(p, m_widget, x, y, w, h, _tx, _ty);' render_replaced.cpp:381
> with 'if (!::qt_cast<RenderPartObject *>(this))' at least makes the control
> buttons of kmplayer plugin not disappear randomly. Other things I don't
> trush in khtml is the eventFiltering on pluging (and its child widgets),
> setting the background mode on these and not clipping right on the paint
> device the first time plugins are painted.

   It requires us to have full plugin<->khtml javascript working.  Due to the 
eolas patent, the flash plugin changed the way it works.  I don't think the 
problems most people see are related to KHTML.  Maybe both are a problem 
though..

Comment 15 Mark 2003-11-20 20:49:20 UTC
I didn't download a newer version of the plugin since the patent, so I doubt the plugin I have on my hd changed the way it works all by itself but It's still broken though.
Comment 16 George Staikos 2003-11-20 20:51:55 UTC
Subject: Re:  Flash content missing

On Thursday 20 November 2003 14:49, vmark@nbnet.nb.ca wrote:
> ------- I didn't download a newer version of the plugin since the patent,
> so I doubt the plugin I have on my hd changed the way it works all by
> itself but It's still broken though.

  You don't need to download a new version.
Comment 17 Koos Vriezen 2003-11-21 14:48:22 UTC
> It requires us to have full plugin<->khtml javascript working

Thanks, I have it working now. See attachment at
http://lists.kde.org/?l=kfm-devel&m=106942152827422&w=2
Comment 18 George Staikos 2003-11-22 00:34:48 UTC
Subject: kdebase/nsplugins [POSSIBLY UNSAFE]

CVS commit by staikos: 

patch from Koos to add better javascript support
CCMAIL: 65868-done@bugs.kde.org


  M +1 -6      plugin_part.cpp   1.52 [POSSIBLY UNSAFE: printf]
  M +14 -4     viewer/nsplugin.cpp   1.104
  M +1 -1      viewer/nsplugin.h   1.39


--- kdebase/nsplugins/plugin_part.cpp  #1.51:1.52
@@ -68,5 +68,5 @@ QString PluginLiveConnectExtension::eval
     ArgList args;
     QString jscode;
-    jscode.sprintf("this.__nsplugin=eval(\"%s\")", script.latin1());
+    jscode.sprintf("this.__nsplugin=eval(\"%s\")",  QString(script).replace('\\', "\\\\").replace('"', "\\\"").latin1());
     args.push_back(qMakePair(KParts::LiveConnectExtension::TypeString, jscode));
     emit partEvent(0, "eval", args);
@@ -316,9 +316,4 @@ void PluginPart::requestURL(const QStrin
     kdDebug(1432) << "PluginPart::requestURL( url=" << url
                   << ", target=" << target << endl;
-
-    if (url.startsWith("javascript:history.back")) {
-        _extension->browserInterface()->callMethod("goHistory(int)", -1);
-        return;
-    }
 
     KURL new_url(this->url(), url);

--- kdebase/nsplugins/viewer/nsplugin.cpp  #1.103:1.104
@@ -711,9 +711,19 @@ void NSPluginInstance::timer()
                     buf.setRawData( _baseURL.latin1(), _baseURL.length()+1 );
                     s->get( url, "text/html", buf, req.notify, true );
-                } else if (url.lower().startsWith("javascript:history.back")){
+                } else if (url.lower().startsWith("javascript:")){
                     if (_callback) {
-                        _callback->requestURL( url, req.target );
-                        if ( req.notify )
-                            NPURLNotify( req.url, NPRES_DONE, req.notify );
+                        QString result = _callback->evalJavaScript( url.mid(11) );
+                        if ( req.notify ) {
+                            NSPluginStream *s = new NSPluginStream( this );
+                            s->create( url, QString("text/plain"), req.notify );
+                            int len = result.length();
+                            QByteArray data( len + 1 );
+                            if (len)
+                                memcpy( data.data(), result.latin1(), len );
+                            data[len] = 0;
+                            s->process( data, 0 );
+                            s->finish( false );
+                            delete s;
+                        }
                     }
                 } else {

--- kdebase/nsplugins/viewer/nsplugin.h  #1.38:1.39
@@ -64,5 +64,5 @@ class NSPluginStreamBase : public QObjec
 {
 Q_OBJECT
-
+friend class NSPluginInstance;
 public:
   NSPluginStreamBase( class NSPluginInstance *instance );