From kde-devel Tue Apr 29 15:09:24 2008 From: Sebastian Kuegler Date: Tue, 29 Apr 2008 15:09:24 +0000 To: kde-devel Subject: Re: nsplugins patch (KDE4) Message-Id: <200804291709.25278.sebas () kde ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=120948682706942 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0943533034==" --===============0943533034== Content-Type: multipart/signed; boundary="nextPart14066255.TxU12btW4X"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart14066255.TxU12btW4X Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 29 April 2008 06:52:54 Sergey Saukh wrote: > In a message on Tuesday 29 April 2008 Sergey Saukh you wrote: > > Hello, > > > > > > well... crash on exit problem is still not solved (nspluginviewer > > > > just was silently exitting because of recursive calls in > > > > NSPluginInstance destructor). Now when there is no recursive calls - > > > > it crashes again, because of call to XtRemoveTimeOut from flashplay= er > > > > library, when we call _pluginFuncs.destroy in > > > > NSPluginInstance::destroy(). > > > > > > > > A wierd solution to this - is to set UserAgent to "firefox" for > > > > nspluginviewer. This can be done in konq settings. > > > > > > Really strange. I remeber some developer has written about such a > > > behavior. This is of course not the solution; the user does not have = to > > > change that. Can we hardcode that in the code, so it will work all the > > > time (of course only for the flashplugin)? > > > > I've come to more wierd solution, while trying to hardcode UserAgent for > > flashplugin. I don't know how to explain such behaviour, but I think th= is > > is the way how flashplugin initializes itself. > > When flashplugin executes "setWindow" (or "Initialize", I don't know for > > sure) it calls NPN_UserAgent with NPP set to NULL. At this point I retu= rn > > an empty string. Subsecuent calls to useragent are ok (NPP is set and > > function returns string configured in browser, (default "... KHTML, > > blablabla", for exapmple). This time crash-on-exit problem is totally > > gone... > > > > Please, review the new patch and say what do you think about it. > > Ummm, it's perfectly clear now, that returning empty UserAgent string to > flashplugin, when it executes "Initialize" is generally not a good idea, > because it breaks any actions, which depend on browser actions (like open > new url). > But returning just "Gecko" instead do the trick. > > I think, that in "Initialize" phase, flashplugin checks in what environme= nt > it was run, i.e. if it was run from a browser and checks what type of > browser is it. > If there was no (or empty) UserAgent string, then it assumes that it was > not launched from a browser window and disables any actions, which lead to > opening urls, or whatever. > If it receives string which contains "Gecko" (not "(like Gecko)" though - > seems it doesn't like gecko in parenthesis) it assumes, that it runs in a > native environment and doesn't make any calls to libXt upon destruction. > If it receives any other UserAgent string, then it uses libXt (don't know > why) and we end up with nspluginviewer crash, when "destroy" method of > flashplugin tries to call "XtRemoveTimeout"... > > So I see two ways out from this mess: > 1. Hardcode to return "Gecko" from g_NPN_UserAgent, when NPP structure is > not set (indicates that it was called by flashplugin from "Initialize"). = 2. > Make Adobe programmers to fix this issue in flashplugin itself. Maybe Mike (who I think is one of the flashplugin developers at Adobe, adde= d=20 to CC:) can comment on this? =2D-=20 sebas http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9=20 --nextPart14066255.TxU12btW4X Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUASBc6JWdNh9WRGQ75AQKO/wf9F8ZDWp8xzBjCKuwf8MG6YUn0HxtgZ43m DRCASkRMGC+oJikwCMG1S9/pBRj97h0P9mO19I24QeDgtsuF811GUrug8Peyk8Wq /LdTy51N9VQ6PRGYyCdTTWw4CR+mjLxX9rY1ZRoVl8akGLJvnbsVENrStWuTyjLp EWWrFYV7IE/HqUiSMMk9J4TxVMvj91Hqhm52Kv35kqFKbmehSonM7yl9iWlkE0wf G1mhhor6ClnTZrM0NDA8OBt+VIJeWEmM0ZAke4N2S3e4MbGf2gXm9QZ2BT3OECZq 0CAqnFw60CWdrJqhwaU0M4Uk1AL3ELab0zjR+4Z+mp/q7CW53Nwo6w== =yQpZ -----END PGP SIGNATURE----- --nextPart14066255.TxU12btW4X-- --===============0943533034== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============0943533034==--