davidben / nspluginwrapper

A cross-platform NPAPI plugin viewer
http://nspluginwrapper.org
GNU General Public License v2.0
23 stars 10 forks source link

npplayer doesn't work #8

Closed davidben closed 13 years ago

davidben commented 13 years ago

Or at least, I haven't been able to get it to work, so I've avoided updating its NPAPI thunks. It also has a free bug when passing --plugin.

% ./npplayer --plugin
*** glibc detected *** ./npplayer: free(): invalid pointer: 0x00000000009fdae8 ***
======= Backtrace: =========
/lib/libc.so.6(+0x774b6)[0x7fdf798634b6]
/lib/libc.so.6(cfree+0x73)[0x7fdf79869c83]
/lib/libglib-2.0.so.0(g_get_charset+0x99)[0x7fdf7a5ec119]
/lib/libglib-2.0.so.0(g_log_default_handler+0x1c6)[0x7fdf7a5c4736]
/lib/libglib-2.0.so.0(g_logv+0x1b9)[0x7fdf7a5c4b89]
/lib/libglib-2.0.so.0(g_log+0x83)[0x7fdf7a5c4fa3]
./npplayer[0x4075a8]
/lib/libglib-2.0.so.0(+0x40b1b)[0x7fdf7a5bab1b]
/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1f2)[0x7fdf7a5ba342]
/lib/libglib-2.0.so.0(+0x442a8)[0x7fdf7a5be2a8]
/lib/libglib-2.0.so.0(g_main_loop_run+0x195)[0x7fdf7a5be7b5]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xa7)[0x7fdf7b2943e7]
./npplayer[0x408855]
/lib/libc.so.6(__libc_start_main+0xfe)[0x7fdf7980ad8e]
./npplayer[0x404ec9]
======= Memory map: ========
00400000-00413000 r-xp 00000000 08:05 2371977                            /home/davidben/proj/nspluginwrapper/npplayer
00612000-00613000 r--p 00012000 08:05 2371977                            /home/davidben/proj/nspluginwrapper/npplayer
00613000-00614000 rw-p 00013000 08:05 2371977                            /home/davidben/proj/nspluginwrapper/npplayer
00614000-00615000 rw-p 00000000 00:00 0 
00913000-00a1b000 rw-p 00000000 00:00 0                                  [heap]
7fdf64000000-7fdf64021000 rw-p 00000000 00:00 0 
7fdf64021000-7fdf68000000 ---p 00000000 00:00 0 
7fdf6b728000-7fdf6b746000 r-xp 00000000 08:05 6187400                    /home/davidben/.mozilla/plugins/npwrapper.libflashplayer.so
7fdf6b746000-7fdf6b946000 ---p 0001e000 08:05 6187400                    /home/davidben/.mozilla/plugins/npwrapper.libflashplayer.so
7fdf6b946000-7fdf6b947000 r--p 0001e000 08:05 6187400                    /home/davidben/.mozilla/plugins/npwrapper.libflashplayer.so
7fdf6b947000-7fdf6b948000 rw-p 0001f000 08:05 6187400                    /home/davidben/.mozilla/plugins/npwrapper.libflashplayer.so
7fdf6b948000-7fdf6b966000 r-xp 00000000 08:05 6189490                    /home/davidben/.mozilla/plugins/npwrapper.libtest-plugin.so
7fdf6b966000-7fdf6bb66000 ---p 0001e000 08:05 6189490                    /home/davidben/.mozilla/plugins/npwrapper.libtest-plugin.so
7fdf6bb66000-7fdf6bb67000 r--p 0001e000 08:05 6189490                    /home/davidben/.mozilla/plugins/npwrapper.libtest-plugin.so
7fdf6bb67000-7fdf6bb68000 rw-p 0001f000 08:05 6189490                    /home/davidben/.mozilla/plugins/npwrapper.libtest-plugin.so
7fdf6bb68000-7fdf6bb83000 r-xp 00000000 08:05 1442598                    /var/lib/flashplugin-installer/npwrapper.libflashplayer.so
7fdf6bb83000-7fdf6bd83000 ---p 0001b000 08:05 1442598                    /var/lib/flashplugin-installer/npwrapper.libflashplayer.so
7fdf6bd83000-7fdf6bd84000 r--p 0001b000 08:05 1442598                    /var/lib/flashplugin-installer/npwrapper.libflashplayer.so
7fdf6bd84000-7fdf6bd85000 rw-p 0001c000 08:05 1442598                    /var/lib/flashplugin-installer/npwrapper.libflashplayer.so
7fdf6bd85000-7fdf6bde2000 r-xp 00000000 08:05 7733344                    /opt/google/talkplugin/libnpgoogletalk64.so
7fdf6bde2000-7fdf6bfe2000 ---p 0005d000 08:05 7733344                    /opt/google/talkplugin/libnpgoogletalk64.so
7fdf6bfe2000-7fdf6bfe6000 rw-p 0005d000 08:05 7733344                    /opt/google/talkplugin/libnpgoogletalk64.so
7fdf6bfe6000-7fdf6c02a000 r-xp 00000000 08:05 3123                       /usr/lib/libQtXml.so.4.7.0
7fdf6c02a000-7fdf6c22a000 ---p 00044000 08:05 3123                       /usr/lib/libQtXml.so.4.7.0
7fdf6c22a000-7fdf6c22c000 r--p 00044000 08:05 3123                       /usr/lib/libQtXml.so.4.7.0
7fdf6c22c000-7fdf6c22d000 rw-p 00046000 08:05 3123                       /usr/lib/libQtXml.so.4.7.0
7fdf6c22d000-7fdf6c245000 r-xp 00000000 08:05 2730                       /usr/lib/libaudio.so.2.4
7fdf6c245000-7fdf6c444000 ---p 00018000 08:05 2730                       /usr/lib/libaudio.so.2.4
7fdf6c444000-7fdf6c445000 r--p 00017000 08:05 2730                       /usr/lib/libaudio.so.2.4
7fdf6c445000-7fdf6c446000 rw-p 00018000 08:05 2730                       /usr/lib/libaudio.so.2.4
7fdf6c446000-7fdf6c4bf000 r-xp 00000000 08:05 3221                       /usr/lib/libQtDBus.so.4.7.0
7fdf6c4bf000-7fdf6c6bf000 ---p 00079000 08:05 3221                       /usr/lib/libQtDBus.so.4.7.0
7fdf6c6bf000-7fdf6c6c0000 r--p 00079000 08:05 3221                       /usr/lib/libQtDBus.so.4.7.0
7fdf6c6c0000-7fdf6c6c1000 rw-p 0007a000 08:05 3221                       /usr/lib/libQtDBus.so.4.7.0
7fdf6c6c1000-7fdf6d160000 r-xp 00000000 08:05 709                        /usr/lib/libQtGui.so.4.7.0
7fdf6d160000-7fdf6d35f000 ---p 00a9f000 08:05 709                        /usr/lib/libQtGui.so.4.7.0
7fdf6d35f000-7fdf6d3a0000 r--p 00a9e000 08:05 709                        /usr/lib/libQtGui.so.4.7.0
7fdf6d3a0000-7fdf6d3a6000 rw-p 00adf000 08:05 709                        /usr/lib/libQtGui.so.4.7.0
7fdf6d3a6000-7fdf6d3a9000 rw-p 00000000 00:00 0 
7fdf6d3a9000-7fdf6d638000 r-xp 00000000 08:05 4023                       /usr/lib/libQtCore.so.4.7.0
7fdf6d638000-7fdf6d838000 ---p 0028f000 08:05 4023                       /usr/lib/libQtCore.so.4.7.0
7fdf6d838000-7fdf6d843000 r--p 0028f000 08:05 4023                       /usr/lib/libQtCore.so.4.7.0
7fdf6d843000-7fdf6d844000 rw-p 0029a000 08:05 4023                       /usr/lib/libQtCore.so.4.7.0
7fdf6d844000-7fdf6d845000 rw-p 00000000 00:00 0 
7fdf6d845000-7fdf6d856000 r-xp 00000000 08:05 133962                     /usr/lib/mozilla/plugins/skypebuttons.so
7fdf6d856000-7fdf6da55000 ---p 00011000 08:05 133962                     /usr/lib/mozilla/plugins/skypebuttons.so
7fdf6da55000-7fdf6da56000 r--p 00010000 08:05 133962                     /usr/lib/mozilla/plugins/skypebuttons.so
7fdf6da56000-7fdf6da57000 rw-p 00011000 08:05 133962                     /usr/lib/mozilla/plugins/skypebuttons.so
7fdf6da57000-7fdf6da58000 r-xp 00000000 08:05 133934                     /usr/lib/mozilla/plugins/librhythmbox-itms-detection-plugin.so
7fdf6da58000-7fdf6dc57000 ---p 00001000 08:05 133934                     /usr/lib/mozilla/plugins/librhythmbox-itms-detection-plugin.sozsh: abort      ./npplayer --plugin
davidben commented 13 years ago

valgrind says the address glib is trying to free was allocated by the Google Talk plugin. It's trying to free some structure that, in glib, pointed to by thread-local storage. Is it possible they're stomping on each other somehow?

davidben commented 13 years ago

Someone's stomping on the thread-local storage used to store the pointer to the glib thread structure. g_thread_self keeps changing as we dlopen modules, so presumably it's stuff in the _init of those modules. Both /usr/lib/mozilla/plugins/libnpgoogletalk64.so and /usr/lib/mozilla/plugins/skypebuttons.so seem to be causing problems.

davidben commented 13 years ago

Actually, this appears to be skypebuttons.so's fault. While on its own it doesn't cause the crash, it does mess up g_thread_self.

davidben commented 13 years ago

Qt's fault. Caused by this bug.

http://bugreports.qt.nokia.com/browse/QTBUG-10861

davidben commented 13 years ago

Don't unload plugins from the process

Unfortunately, some libraries are broken and corrupt internal state when they are unloaded. Closed by 0ff78b2a875ad99b2c2b0c1715493cf1ec36aea1.