You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

unload() triggers Safari crashes Created Dec 10, 2008

This thread is solved

Views: 6556     Replies: 24     Last reply Feb 21, 2011  
You must login first before you can use this feature

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

unload() triggers Safari crashes

Posted: Dec 10, 2008

On the sample pagehttp://www.blacktrash.org/underdogma/fcrash.html Safari crashes at the onFinish clip event calling this.unload(). Unfortunately this doesn't happen regularly, but you can increase the chances of it happening by moving the playhead several times during playback.

Possible cause: pseudostreaming with php: Safari still moans about a WebKit Error every time you move the playhead.

I'll try to set up a simpler example (this one is a copy ofhttp://www.blacktrash.org/underdogma/index-en.html, except for the onFinish event) when I find time.

However there is no problem in Firefox with the sample page.

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» unload() triggers Safari crashes

Posted: Dec 11, 2008

Reply to: unload() triggers Safari crashes, from blacktrash
I reported the crash to Apple; not that it will be of any consequence ;-)

Anssi
Flowplayer Flash & video streaming developer

Posts: 1194

Registered:
Jul 24, 2007

» » unload() triggers Safari crashes

Posted: Dec 11, 2008

Reply to: » unload() triggers Safari crashes, from blacktrash
When experimenting with your page i saw that there are some errors in the Safari's Activity console:

These are from URL:
http://www.blacktrash.org/media/streamer.php/ccc.f4v?start=142625925

And the error says "Operation could not be completed" and some WebKit stuff follows. It could be that these errors relate to using pseudostreaming in Safari.

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» » » unload() triggers Safari crashes

Posted: Dec 11, 2008

Reply to: » » unload() triggers Safari crashes, from Anssi
Yes, I reported that already:

http://www.flowplayer.org/forum/search.html?query=webkit

oops, the dates in the search results stem from a time machine ;-)

http://www.flowplayer.org/forum/5/10275 is the thread.

However with flowplayer 2 there were no crashes when I jumped back to the splash image at the end of the movie.

Might be a Safari/Apple bug ...

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

"Time machine" - bug fixed.

Posted: Jan 9, 2009

Reply to: » » » unload() triggers Safari crashes, from blacktrash
Many of you may have noticed that the topic creation times on the search results and on the user account pages are wrong. This is now fixed.

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

pseudostreaming Safari WebKit Error

Posted: Dec 12, 2008

Reply to: » » unload() triggers Safari crashes, from Anssi
FWIW, the WebKit Error also happens also with your example at

http://flowplayer.org/plugins/streaming/pseudostreaming.html

which uses lighttpd server and its streaming script as opposed to apache + php.

So it seems Safari has definitely a prob with pseudostreaming in general.

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» unload() triggers Safari crashes

Posted: Jan 8, 2009

Reply to: unload() triggers Safari crashes, from blacktrash
With flowplayer 3.0.3 Safari doesn't crash anymore - so it seems the issue was not related to pseudostreaming.

However, I still can get Safari to crash from time to time with overlay and expose:


onFinish: function () {
    this.unload();
    $.overlayClose();
    $.unexpose();
}

Liam Gooding
Custom swf skins, custom swf plugins, custom JS plugins, video CMS - http://goodingsmedia.com

Posts: 352

Registered:
Dec 16, 2008

» » unload() triggers Safari crashes

Posted: Jan 10, 2009

Reply to: » unload() triggers Safari crashes, from blacktrash
Hmm.... I browse in safari 99% of the time and I've not come across a crash on any of the demos...

But out of curiosity, how to you get the 'Activity Console' for safari up? I'm assuming this is some kind of 'firebug' for safari?

gminder

Posts: 1

Registered:
Apr 28, 2009

unload() Safari crash

Posted: Apr 28, 2009

Reply to: » » unload() triggers Safari crashes, from LiamGooding
Hi,

For me Safari crashes 70% of the time when playing this movie

http://video.jpmguides.com/movies/contentok.html

Firefox has no problems, any idea why?

Thank, Guy

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» unload() Safari crash

Posted: Apr 28, 2009

Reply to: unload() Safari crash, from gminder
No idea; except that I can confirm the crash with your link.

Some problems with unload() in Safari have been fixed, but I stumbled over another one myself and am trying to distill a minimal debugging sample.

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

Safari counterpart to Firebug

Posted: Jul 5, 2009

Reply to: » » unload() triggers Safari crashes, from LiamGooding
Hi Liam,

In case you haven't found out yet:

-> Safari -> Preferences -> Advanced -> click "Show Develop in menu bar"

Then:

-> Develop -> Show Web Inspector

Quite nice with Safari 4.

Activity window is reached from the, errmh, Window menu ;-)

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» unload() triggers Safari crashes

Posted: Jul 5, 2009

Reply to: unload() triggers Safari crashes, from blacktrash
The situation has improved but I created a corner case (there might be others) where Safari still crashes with flowplayer 3.1.1 and 3.1.2dev.

I've updated my Safari crash site accordingly ;-)

Anssi
Flowplayer Flash & video streaming developer

Posts: 1194

Registered:
Jul 24, 2007

» » unload() triggers Safari crashes

Posted: Jul 6, 2009

Reply to: » unload() triggers Safari crashes, from blacktrash
Thanks for the updated crash test site. Will try to fix this.

Anssi

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

unload in fullscreen crashes WebKit browsers

Posted: Nov 9, 2009

Reply to: » » unload() triggers Safari crashes, from Anssi
Ok, I think I can make WebKit browsers crash live right here :-( Just click stop while the player is fullscreen (toggleFullscreen does not seem to work?).

Flowplayer forum example

HTML setup for the player

<!-- include latest Flowplayer javascript file -->
<script language="javascript" src="path/to/flowplayer-3.2.6.js"></script>

<!-- player container with optional splash image -->
<a href="path/to/video_file" id="playerContainer">
	<img src="path/to/splash_image" />
</a>


JavaScript coding

Following script will install Flowplayer into our player container


<script language="javascript">
// our custom configuration is given in third argument
flowplayer("playerContainer", "path/tohttp://releases.flowplayer.org/swf/flowplayer-3.2.7.swf",{
onStop: function () {
  // the following does not prevent the crash either
  // if (this.isFullscreen()) {
  //   this.toggleFullscreen();
  // }
  this.unload();
},
clip: {
  // does not work
  onStart: function () {
    this.toggleFullscreen();
  }
},
plugins: {
  controls: {stop: true}
}
});
</script>


Aside: Is there a working sample of toggleFullscreen() somewhere? I also tried it from within onCuepoint without success.

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» unload in fullscreen crashes WebKit browsers

Posted: Nov 10, 2009

Reply to: unload in fullscreen crashes WebKit browsers, from blacktrash
Ok, found the toggle fullscreen demo telling about the restrictions.

Now, back to the WebKit crash bug! ;-)

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» unload in fullscreen crashes WebKit browsers

Posted: Feb 25, 2010

Reply to: unload in fullscreen crashes WebKit browsers, from blacktrash
I just tried out the latest 3.1.6 dev version (all swf files) (nice controlbar redesign!), and WebKit browsers still crash when the player is unloaded from fullscreen :-(

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» » unload in fullscreen crashes WebKit browsers

Posted: Mar 13, 2010

Reply to: » unload in fullscreen crashes WebKit browsers, from blacktrash
Newest Safari 4.0.5 with new WebKit 5531.22.7 still crashes.

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» » » unload() triggers Safari crashes

Posted: Nov 10, 2009

Reply to: » » unload() triggers Safari crashes, from Anssi
Further testing reveals that unloading any time while in fullscreen crashes WebKit browsers.

For now I have resorted to e.g.:


$f("container", "flowplayer.swf", {
  onFinish: function () {
    if (!(this.isFullscreen() && /WebKit/i.test(navigator.userAgent))) {
      this.unload();
    }
  }
});

to prevent crashes. I just hope this isn't a long term "solution" ;-) Better workarounds welcome!

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» » » » unload() triggers Safari crashes

Posted: Dec 15, 2009

Reply to: » » » unload() triggers Safari crashes, from blacktrash
See also:

http://flowplayer.org/forum/8/33156

Thomas Dubois
thomas_at_bigsool.com

Posts: 68

Registered:
Feb 1, 2010

» » » » » unload() triggers Safari crashes

Posted: Mar 15, 2010

Reply to: » » » » unload() triggers Safari crashes, from blacktrash
Hey,

I just played a couple of hours with that issue and it turns out that it is a safari/flash bug : take the simplest swf that goes fullscreen, set a javascript timeout to remove the object tag from the DOM while in fullscreen .. crash :
SGDRemoveSurface : invalid window ....

I tried some workarounds (window.focus, reloading the flash, ...) to exit fullscreen before unloading, with no success.

I guess we'll go with your workaround in the meantime !
Thomas

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

3.2.0: onStop does not unload

Posted: May 10, 2010

Reply to: » » » unload() triggers Safari crashes, from blacktrash
Well, that's one way of fixing it ;-(

onStop seems to have become a clip event, but it is broken:

Flowplayer forum example

HTML setup for the player

<!-- include latest Flowplayer javascript file -->
<script language="javascript" src="path/to/flowplayer-3.2.6.js"></script>

<!-- player container with optional splash image -->
<a href="path/to/video_file" id="playerContainer">
	<img src="path/to/splash_image" />
</a>


JavaScript coding

Following script will install Flowplayer into our player container


<script language="javascript">
// our custom configuration is given in third argument
flowplayer("playerContainer", "path/tohttp://releases.flowplayer.org/swf/flowplayer-3.2.7.swf",{
clip: {
  onStop: function () {
    this.unload();
  }
},
plugins: {
  controls: {stop: true}
}
});
</script>


(in the hope that the flowplayer tags start working again)

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» 3.2.0: onStop does not unload

Posted: May 11, 2010

Reply to: 3.2.0: onStop does not unload, from blacktrash
As I found out in the meantime, the behaviour in 3.2.0 browser dependent (test case: unload onStop):

  1. WebKit: works when not in fullscreen; when in fullscreen no unloading - a bit like my JavaScript workaround

  2. Non-WebKit: works in fullscreen only, see above demo sample

Frankly, I prefer the old behaviour with my workaround. Why not just put the workaround in flowplayer.js and remove it once this is definitely fixed? It's not that elaborate a setup to test, is it? ;-)

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

3.2.2: onStop does not unload

Posted: Jun 4, 2010

Reply to: » 3.2.0: onStop does not unload, from blacktrash
Update: still the same issue with 3.2.2.

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» 3.2.0: onStop does not unload

Posted: Aug 28, 2010

Reply to: 3.2.0: onStop does not unload, from blacktrash
Still the same with 3.2.4.

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» » 3.2.6: onStop does not unload

Posted: Feb 21, 2011

Reply to: » 3.2.0: onStop does not unload, from blacktrash
And again with 3.2.6 :-(