Bug 150241 - nspluginviewer crashes on amd64 (with explanation of the cause)
Summary: nspluginviewer crashes on amd64 (with explanation of the cause)
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: nspluginviewer (show other bugs)
Version: unspecified
Platform: Debian stable Linux
: NOR crash
Target Milestone: ---
Assignee: George Staikos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-26 23:20 UTC by Leon Bottou
Modified: 2007-10-01 11:50 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leon Bottou 2007-09-26 23:20:16 UTC
Version:           debian 4:3.5.5a.dfsg.1-6etch1 (using KDE KDE 3.5.5)
Installed from:    Debian stable Packages
Compiler:           AMD64
OS:                Linux

On April 9th, someone changed the netscape plugin sdk file npapi.h
was changed to the mozilla ones (revision 665076) without
reporting the changes necessary to make it work on amd64.

In particular the line 190:   
#if defined(__alpha) || defined(_AIX) || defined(__x86_64__) || defined(__LP64__)
became
#if defined(__alpha)
which leads to defining type uint32 as a 64 bit integer.
See http://websvn.kde.org/branches/KDE/3.5/kdebase/nsplugins/sdk/npapi.h?r1=651942&r2=665076

As a result, nspluginviewer calls the plugins with
incorrect data structures on all 64 bit platforms other than alpha.
Most of them crash in NPP_SetWindow without displaying anything.


Solution #1:
Make sure all changes to npapi.h prior to revision 665076
are copied into the newer mozilla version.

Solution #2:
Do not use ancient version of npapi.h.
Modern versions of npapi.h contain the right stuff.
See http://lxr.mozilla.org/seamonkey/source/modules/plugin/base/public/npapi.h
Comment 1 Tommi Tervo 2007-09-28 08:49:15 UTC
svn tells that Lubos did that change.
Comment 2 Leon Bottou 2007-09-28 16:33:41 UTC
Incidentally the djvulibre project is now using 
the modern versions of npapi.h and friends.

This is not completely obvious because the jri.h
file depends on countless mozilla headers.
But we can replace this file with a stub
containing incomplete type definitions.
Hardly a problem since npruntime.h is a superior
alternative to jri anyway...

See <http://djvu.cvs.sourceforge.net/djvu/djview/nsdejavu/npsdk/>
Feel free to copy whatever you wish.

- L.
Comment 3 Lubos Lunak 2007-10-01 11:50:50 UTC
SVN commit 719539 by lunakl:

Put back r651938 (proper bit width for 32bit types).
BUG: 150241



 M  +6 -6      npapi.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=719539