i-rinat / freshplayerplugin

ppapi2npapi compatibility layer
MIT License
727 stars 52 forks source link

konqueror and freshplugin #291

Closed ROBERT-MCDOWELL closed 8 years ago

ROBERT-MCDOWELL commented 9 years ago

Hi Rinat,

just for info I tried to use freshplaerplugin with Konqueror KDE4 but apparently no flash is shown, only white page.

thanks

i-rinat commented 9 years ago

Tested a bit in Konqueror. Flash movies from outer pages fail to load, an error message is displayed. But for some reason test page from 127.0.0.1 works fine. I also tried to remove file /usr/lib/kde4/libnsplugin.so and plugins started to work, which surprised me.

And I still don't get how KDE applications tied together, and how to debug them.

ROBERT-MCDOWELL commented 9 years ago

weird, on my side I just removed all plugins but the last fresh but nothing is loaded, no error message, just white page like no flash sits there

i-rinat commented 9 years ago

Have you tried to temporarily remove /usr/lib/kde4/libnsplugin.so?

ROBERT-MCDOWELL commented 9 years ago

as I have a fedora 21 64bits it was at /usr/lib64/kde4/libnsplugin.so now I can see the flash, but if I right click... booom it crashes konqueror ;)

i-rinat commented 9 years ago

As you mentioned crashes, I had Konqueror crashing too, until I disabled NPAPI Flash. But then context menu worked fine.

As I found on some Internet page, if you start application with KDE_DEBUG=1 environment variable set, apps then will just crash, without using KDE's crash reporter. It then create core dump file, if ulimit -c unlimited is executed before or some core dump collector service is running. Could you try to get backtrace of the crash then?

ROBERT-MCDOWELL commented 9 years ago

yes, here it is backtrace.txt

i-rinat commented 9 years ago

Looks like after libnsplugin.so removal, Konqueror leaves plugin management to QtWebKit.

i-rinat commented 9 years ago

Crashes somewhere inside GTK+ internals, I can say from backtrace. Although it should work fine, since QtWebKit have GLib mainloop support which is required for NPAPI Flash.

If you're still interested in further debugging, next step will be getting debugging symbols for GTK+ libraries. I guess Fedora have them in a separate package?

ROBERT-MCDOWELL commented 9 years ago

yes, I just installed it but never debugged gtk so adivce appreciated

i-rinat commented 9 years ago

If you still have core file from a previous crash, backtrace in gdb should show you line numbers in gtk functions now. If you don't have it, a new one will work just fine too.

ROBERT-MCDOWELL commented 9 years ago

arrgh, no I deleted it :( will do it again tonight

ROBERT-MCDOWELL commented 9 years ago

I'm not familiar with gdb, how can I backtrace what you need in a file?

i-rinat commented 9 years ago

There are two useful commands:

ROBERT-MCDOWELL commented 9 years ago

Ok please tell me how to run konquror in gdb console

i-rinat commented 9 years ago

how to run konquror in gdb console

You need to specify program name when you launch gdb: gdb konqueror. Command run launches program inside gdb.

But why do you ask that? Didn't you posted backtrace earlier? It definitely was generated by gdb.

ROBERT-MCDOWELL commented 9 years ago

yes but i did manually like gdb /usr/bin/konqueror coredump and copy and paste the result I want to know how to run gdb and automatically print on a file

i-rinat commented 9 years ago

I want to know how to run gdb and automatically print on a file

Commands set logging on and set pagination off should suffice. I was just confused when you asked about how to start application under gdb. I thought since you've generated backtrace earlier, you already know how to either load coredump into gdb or how to launch application under gdb. Both ways are fine.

ROBERT-MCDOWELL commented 9 years ago

well, my question was when and how you run these commands if I run KDE_DEBUG=1 /usr/bin/konqueror and after gdb /usr/bin/konqueror coredump?

i-rinat commented 9 years ago

You first launch KDE_DEBUG=1 /usr/bin/konqueror, reproduce the bug. Then you run gdb /usr/bin/konqueror core, gdb loads all libraries and shows the promt. In that prompt you enter command set logging on, then set pagination off, then thread apply all bt. Then you can quit gdb by entering command q.

There should appear file gdb.txt in a current directory.

ROBERT-MCDOWELL commented 9 years ago

mmhmm it's what I did and made a blank file. I do it again now

ROBERT-MCDOWELL commented 9 years ago

ok here it is gdb.txt

i-rinat commented 9 years ago

I don't see line numbers there. Maybe gtk2-debuginfo is not installed, or maybe there are no enough debug information in that package.

ROBERT-MCDOWELL commented 9 years ago

there are these packages I did not installed yet gtk2-devel-docs x86_64 2.24.28-1.fc21 updates 2.4 M gtk2-engines-devel x86_64 2.20.2-9.fc21 fedora 21 k gtk2-immodule-xim x86_64 2.24.28-1.fc21 updates 22 k gtk2-immodules
gtk+-devel x86_64 1:1.2.10-79.fc21 fedora 302 k gtk+extra x86_64 2.1.2-15.fc21 fedora 313 k gtk+extra-devel

which one must I install?

i-rinat commented 9 years ago

If there are no packages with "dbg", "debug", or "debuginfo" in their names together with "gtk", then there is no debug information available. The only way to get line information is to compile from source.

ROBERT-MCDOWELL commented 9 years ago

there is kdbg I just installed it mmhm apparently it's only a gui deugger

i-rinat commented 9 years ago

kdbg is a GUI frontend for gdb. That's not what I talked about.

I use Debian, and here we have libgtk2.0-0 package, which contains GTK+ libraries, and libgtk2.0-0-dbg package, which contains debug information. But not all packages are using that scheme. Some do not have debug information at all. But if they have, package name ends with "-dbg".

Unfortunately, I'm not familiar with Fedora, so I don't know is there debug info for GTK+ libraries or not. Perhaps there is some similar naming convention, perhaps not. Not sure.

ROBERT-MCDOWELL commented 9 years ago

is it better like this? I used break gtk_init in gdb gdb.txt

i-rinat commented 9 years ago

No it won't work that way either. Look into output. There are multiple thread's backtraces. Each have a number of entries, a history about how functions called another functions to get to the current point. There are: frame number (#0, #1, #2 and so on), address of an instruction, then name of the function and its origin.

Sometimes name of function is not available, and there is nothing (most functions in libpepflashplayer.so). Sometimes, name is known, but there is no debug information:

in g_async_queue_pop_intern_unlocked () at /usr/lib64/libglib-2.0.so.0

You see library name here. But if debug information is available, you'll see:

in ppb_flash_message_loop_run (flash_message_loop=3162) at /home/src/freshplayerplugin/src/ppb_flash_message_loop.c:81

Note there is a source file name, and a line number where call was made.

As for crash in GTK+, you see there:

#0  0x000000378ae7ac07 in gdk_window_enable_synchronized_configure () at /usr/lib64/libgdk-x11-2.0.so.0

From that one can say something went wrong in gdk_window_enable_synchronized_configure(), but where exactly, is unknown. (By the way, crashing inside GTK+ doesn't mean it's a GTK+ bug. Many functions expect sane input values, and if they are wrong, there will be a crash).

ROBERT-MCDOWELL commented 9 years ago

ok gotcha... so should I remove gtk2 package and install the source with -g option?

ROBERT-MCDOWELL commented 9 years ago

Ok I found the beast debuginfo-install konqueror-15.04.3-1.fc21.1.x86_64 515MB, ouch...

here is the new gdb report gdb.txt

i-rinat commented 9 years ago

Here is a part of last gdb.txt:

Thread 1 (Thread 0x7fc555e7f880 (LWP 4095)):
#0  0x000000378ae7ac07 in gdk_window_enable_synchronized_configure () at /usr/lib64/libgdk-x11-2.0.so.0
#1  0x000000378b48b1f7 in gtk_window_realize () at /usr/lib64/libgtk-x11-2.0.so.0
#2  0x0000003f7980fe84 in _g_closure_invoke_va (closure=closure@entry=0x2486230, return_value=return_value@entry=0x0, instance=instance@entry=0x255d060, args=args@entry=0x7ffd9ce10e20, n_params=<optimized out>, param_types=0x0) at gclosure.c:831
#3  0x0000003f79829b00 in g_signal_emit_valist (instance=0x255d060, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7ffd9ce10e20) at gsignal.c:3218
#4  0x0000003f7982a34f in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3365
#5  0x000000378b47e089 in gtk_widget_realize () at /usr/lib64/libgtk-x11-2.0.so.0
#6  0x000000378b47e1a9 in gtk_widget_realize () at /usr/lib64/libgtk-x11-2.0.so.0
#7  0x000000378b352787 in gtk_menu_popup () at /usr/lib64/libgtk-x11-2.0.so.0
#8  0x00007fc4f7ba295c in menu_popup_ptac (p=0x255b0b0) at /home/src/freshplayerplugin/src/ppb_flash_menu.c:226
#9  0x00007fc4f7b9c90a in call_on_browser_thread_comt (user_data=0x23aec30, result=<optimized out>) at /home/src/freshplayerplugin/src/ppb_core.c:108
#10 0x00007fc4f7ba6a93 in ppb_message_loop_run_int (message_loop=<optimized out>, flags=<optimized out>) at /home/src/freshplayerplugin/src/ppb_message_loop.c:323
#11 0x000000311292b21b in WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin(_NPP*, WTF::Deque<WebCore::PluginMainThreadScheduler::Call, 0ul> const&) () at /usr/lib64/libQtWebKit.so.4
#12 0x000000311292c5ac in WebCore::PluginMainThreadScheduler::dispatchCalls() () at /usr/lib64/libQtWebKit.so.4
#13 0x000000311386cd1f in WTF::dispatchFunctionsFromMainThread() () at /usr/lib64/libQtWebKit.so.4
#14 0x0000003113876b81 in WTF::MainThreadInvoker::event(QEvent*) () at /usr/lib64/libQtWebKit.so.4
#15 0x0000003f837c7efc in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x1944f50, receiver=receiver@entry=0x1cc4580, e=e@entry=0x7fc4d822b060) at kernel/qapplication.cpp:4565
#16 0x0000003f837ce958 in QApplication::notify(QObject*, QEvent*) (this=this@entry=0x7ffd9ce118f0, receiver=receiver@entry=0x1cc4580, e=e@entry=0x7fc4d822b060) at kernel/qapplication.cpp:4351
#17 0x000000310c64ee0a in KApplication::notify(QObject*, QEvent*) (this=0x7ffd9ce118f0, receiver=0x1cc4580, event=0x7fc4d822b060) at /usr/src/debug/kdelibs-4.14.12/kdeui/kernel/kapplication.cpp:311
#18 0x0000003f8118622d in QCoreApplication::notifyInternal(QObject*, QEvent*) (this=0x7ffd9ce118f0, receiver=receiver@entry=0x1cc4580, event=event@entry=0x7fc4d822b060) at kernel/qcoreapplication.cpp:953
#19 0x0000003f811894f1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (event=0x7fc4d822b060, receiver=0x1cc4580) at kernel/qcoreapplication.h:231
#20 0x0000003f811894f1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1909f20) at kernel/qcoreapplication.cpp:1577
#21 0x0000003f81189983 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1470
#22 0x0000003f811b53ee in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) () at kernel/qcoreapplication.h:236
#23 0x0000003f811b53ee in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x192bf30) at kernel/qeventdispatcher_glib.cpp:300
#24 0x0000003f778497fb in g_main_context_dispatch (context=0x1946090) at gmain.c:3111
#25 0x0000003f778497fb in g_main_context_dispatch (context=context@entry=0x1946090) at gmain.c:3710
#26 0x0000003f77849b98 in g_main_context_iterate (context=context@entry=0x1946090, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781
#27 0x0000003f77849c4c in g_main_context_iteration (context=0x1946090, may_block=1) at gmain.c:3842
#28 0x0000003f811b555e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x190b8a0, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#29 0x0000003f8386b176 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#30 0x0000003f81184d81 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffd9ce11720, flags=...) at kernel/qeventloop.cpp:149
#31 0x0000003f811850e5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffd9ce11720, flags=...) at kernel/qeventloop.cpp:204
#32 0x0000003f8118a7c9 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1225
#33 0x0000003f837c639c in QApplication::exec() () at kernel/qapplication.cpp:3823
#34 0x000000310f6ba936 in kdemain(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kde-baseapps-15.04.3/konqueror/src/konqmain.cpp:227
#35 0x0000003f7501ffe0 in __libc_start_main (main=0x400870 <main(int, char**)>, argc=1, argv=0x7ffd9ce11a98, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd9ce11a88) at libc-start.c:289
#36 0x000000000040089e in _start ()

As you can see, Konqueror part now have line information, but relevant part, gdk_window_enable_synchronized_configure() still haven't. Crash was somewhere inside that function, but it's unknown where exactly it was.

ROBERT-MCDOWELL commented 9 years ago

ok could you know where this function come from? maybe I should install another debugger

i-rinat commented 9 years ago

It's from GDK, which is a part of GTK+ libraries. What you need to do is to get GTK+2 source code, unpack it, run ./configure --prefix=/tmp/5, then compile with make and install with make install. You can do all these steps from an ordinary user, no root required. Resulted libraries are installed into /tmp/5/lib.

Then you need to launch application with KDE_DEBUG=1 LD_LIBRARY_PATH=/tmp/5/lib konqueror.

LD_LIBRARY_PATH variable can be used to give library loader a hint where to search for libraries. Since /tmp/5/lib will have newly compiled GTK+ libraries, those will be loaded instead of system ones.

ROBERT-MCDOWELL commented 9 years ago

more simple I did debuginfo-install gtk2 and got gtk2-debuginfo in the list :)

ROBERT-MCDOWELL commented 9 years ago

here it is I think it's ok now gdb.txt

i-rinat commented 9 years ago

I guess gdk_window_new() called in gtkwindow.c:4843 returns NULL, which is then passed gdk_window_enable_synchronized_configure() where that NULL is dereferenced. Next step is to determine why gdk_window_new() returns NULL.

ROBERT-MCDOWELL commented 9 years ago

well, you're probably right ;) the weird thing I know is konqueror asks to activate the plugin with a start button so maybe something is missing in their process when right click is activated or maybe I'm out of subject too

i-rinat commented 9 years ago

Since GTK+ menu is a window, it needs a parent. Probably code fails to find a parent, and subsequently fails to create a window. There is a code that uses browser window as a parent, and I was thinking that due to missing NPAPI entry it failed to acquire window handle. But it turned out, menu code doesn't use it at all. I just call gtk_menu_popup() with all NULL parameters, and it does its magic.

Don't know, maybe that was wrong. But why it's working in other browsers then? I once tested something QtWebKit-based, and it worked there too.

ROBERT-MCDOWELL commented 9 years ago

mmhmm weird. but wait, it could come from the fact I'm using Fedora from my server through vnc? or maybe because my server does not have any sound and webcam?

ROBERT-MCDOWELL commented 9 years ago

ok right click works well with firefox and seamonkey in the same conditions

i-rinat commented 9 years ago

I've installed 64-bit Fedora 21 into virtual machine and tried Konqueror there. At first it failed to open plugin, but after I deleted libnsplugin.so and installed kwebkitpart, worked fine. Context menus are also working fine, no crashes. So, I can't reproduce the same bug.

jccardot commented 9 years ago

Hi Testing Konqueror 4.14.3 here (KDE 4.41.5) under up-to-date Mageia 5, went to https://www.adobe.com/fr/software/flash/about/ (but any site with flash makes it crash) and got the following crash (see below).

Application: nspluginviewer (nspluginviewer), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fec8c636780 (LWP 27144))]

Thread 8 (Thread 0x7fec6c8d9700 (LWP 27147)):
[KCrash Handler]
#5  0x0000000000000000 in ?? ()
#6  0x00007fec7946fcfc in ppb_core_call_on_browser_thread (instance=<optimized out>, func=0x7fec79482430 <set_text_input_type_ptac>, user_data=0x15b7b60) at /home/fred/compil/freshplayerplugin/src/ppb_core.c:154
#7  0x00007fec6975e451 in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#8  0x00007fec6973bc58 in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#9  0x00007fec69726f8d in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#10 0x00007fec6a1a1151 in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#11 0x00007fec79463dab in call_plugin_did_create_comt (user_data=0x15b7790, result=<optimized out>) at /home/fred/compil/freshplayerplugin/src/np_functions.c:171
#12 0x00007fec79479dc3 in ppb_message_loop_run_int (message_loop=message_loop@entry=2, flags=flags@entry=2) at /home/fred/compil/freshplayerplugin/src/ppb_message_loop.c:323
#13 0x00007fec79479e9a in ppb_message_loop_run (message_loop=message_loop@entry=2) at /home/fred/compil/freshplayerplugin/src/ppb_message_loop.c:200
#14 0x00007fec79466e87 in fresh_wrapper_main_thread (p=0x1478430) at /home/fred/compil/freshplayerplugin/src/main_thread.c:58
#15 0x00007fec87cc05bd in start_thread () from /lib64/libpthread.so.0
#16 0x00007fec88d645cd in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7fec63fff700 (LWP 27148)):
#0  0x00007fec88d58d1d in poll () from /lib64/libc.so.6
#1  0x00007fec8b530eb4 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007fec8b531232 in g_main_loop_run () from /lib64/libglib-2.0.so.0
#3  0x00007fec78eb49b6 in gdbus_shared_thread_func () from /lib64/libgio-2.0.so.0
#4  0x00007fec8b556d75 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5  0x00007fec87cc05bd in start_thread () from /lib64/libpthread.so.0
#6  0x00007fec88d645cd in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7fec5bfff700 (LWP 27149)):
#0  0x00007fec88d5ecd9 in syscall () from /lib64/libc.so.6
#1  0x00007fec8b57420f in g_cond_wait_until () from /lib64/libglib-2.0.so.0
#2  0x00007fec8b506999 in g_async_queue_pop_intern_unlocked () from /lib64/libglib-2.0.so.0
#3  0x00007fec8b506f8b in g_async_queue_timeout_pop () from /lib64/libglib-2.0.so.0
#4  0x00007fec8b5577bc in g_thread_pool_thread_proxy () from /lib64/libglib-2.0.so.0
#5  0x00007fec8b556d75 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#6  0x00007fec87cc05bd in start_thread () from /lib64/libpthread.so.0
#7  0x00007fec88d645cd in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fec53fff700 (LWP 27153)):
#0  0x00007fec8b573fe4 in g_mutex_unlock () from /lib64/libglib-2.0.so.0
#1  0x00007fec8b530dd6 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2  0x00007fec8b530fbc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007fec8b530ff9 in glib_worker_main () from /lib64/libglib-2.0.so.0
#4  0x00007fec8b556d75 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#5  0x00007fec87cc05bd in start_thread () from /lib64/libpthread.so.0
#6  0x00007fec88d645cd in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fec681dc700 (LWP 27154)):
#0  0x00007fec87cc567f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fec6973cfbb in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#2  0x00007fec6973d2a5 in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#3  0x00007fec6999cddc in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#4  0x00007fec6973cbbc in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#5  0x00007fec6973cc28 in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#6  0x00007fec6973ce21 in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#7  0x00007fec87cc05bd in start_thread () from /lib64/libpthread.so.0
#8  0x00007fec88d645cd in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fec6819b700 (LWP 27155)):
#0  0x00007fec87cc567f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fec6973cfbb in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#2  0x00007fec6973d2a5 in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#3  0x00007fec6999cddc in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#4  0x00007fec6973cbbc in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#5  0x00007fec6973cc28 in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#6  0x00007fec6973ce21 in ?? () from /home/fred/compil/freshplayerplugin/build/libpepflashplayer.so
#7  0x00007fec87cc05bd in start_thread () from /lib64/libpthread.so.0
#8  0x00007fec88d645cd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fec47ffe700 (LWP 27156)):
#0  0x00007fec88d58d1d in poll () from /lib64/libc.so.6
#1  0x00007fec765f5c81 in poll_func () from /lib64/libpulse.so.0
#2  0x00007fec765e7891 in pa_mainloop_poll () from /lib64/libpulse.so.0
#3  0x00007fec765e7ece in pa_mainloop_iterate () from /lib64/libpulse.so.0
#4  0x00007fec765e7f80 in pa_mainloop_run () from /lib64/libpulse.so.0
#5  0x00007fec765f5c33 in thread () from /lib64/libpulse.so.0
#6  0x00007fec71f57198 in internal_thread_func () from /usr/lib64/pulseaudio/libpulsecommon-5.0.so
#7  0x00007fec87cc05bd in start_thread () from /lib64/libpthread.so.0
#8  0x00007fec88d645cd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fec8c636780 (LWP 27144)):
#0  0x00007fec88d5ecd9 in syscall () from /lib64/libc.so.6
#1  0x00007fec8b57420f in g_cond_wait_until () from /lib64/libglib-2.0.so.0
#2  0x00007fec8b506999 in g_async_queue_pop_intern_unlocked () from /lib64/libglib-2.0.so.0
#3  0x00007fec8b506f8b in g_async_queue_timeout_pop () from /lib64/libglib-2.0.so.0
#4  0x00007fec79479c1a in ppb_message_loop_run_int (message_loop=<optimized out>, flags=flags@entry=3) at /home/fred/compil/freshplayerplugin/src/ppb_message_loop.c:341
#5  0x00007fec79479eaa in ppb_message_loop_run_nested (message_loop=<optimized out>) at /home/fred/compil/freshplayerplugin/src/ppb_message_loop.c:206
#6  0x00007fec79465253 in NPP_New (pluginType=<optimized out>, npp=<optimized out>, mode=<optimized out>, argc=<optimized out>, argn=<optimized out>, argv=<optimized out>, saved=0x0) at /home/fred/compil/freshplayerplugin/src/np_functions.c:574
#7  0x000000000040b760 in NSPluginInstance::NSPluginInstance(_NPPluginFuncs*, KLibrary*, QString const&, QString const&, QStringList const&, QStringList const&, QString const&, QString const&, bool, QObject*) ()
#8  0x0000000000413a78 in NSPluginClass::newInstance(QString const&, QString const&, bool, QStringList const&, QStringList const&, QString const&, QString const&, bool) ()
#9  0x000000000041f552 in ClassAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
#10 0x000000000041f6d3 in ClassAdaptor::qt_metacall(QMetaObject::Call, int, void**) ()
#11 0x00007fec8ba1cb06 in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QList<int> const&, int) () from /lib64/libQtDBus.so.4
#12 0x00007fec8ba1dc49 in QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) () from /lib64/libQtDBus.so.4
#13 0x00007fec8ba1e698 in QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) () from /lib64/libQtDBus.so.4
#14 0x00007fec8ba1e81b in QDBusActivateObjectEvent::placeMetaCall(QObject*) () from /lib64/libQtDBus.so.4
#15 0x00007fec894bfd61 in QObject::event(QEvent*) () from /lib64/libQtCore.so.4
#16 0x00007fec89eb279c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQtGui.so.4
#17 0x00007fec89eb8e40 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQtGui.so.4
#18 0x00007fec8abe525a in KApplication::notify(QObject*, QEvent*) () from /lib64/libkdeui.so.5
#19 0x00007fec894a7cad in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /lib64/libQtCore.so.4
#20 0x00007fec894aabe1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQtCore.so.4
#21 0x00007fec894d4cae in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQtCore.so.4
#22 0x00007fec8b530c6d in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#23 0x00007fec8b530f18 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#24 0x00007fec8b530fbc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#25 0x00007fec894d4e1e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#26 0x00007fec89f504f6 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtGui.so.4
#27 0x00007fec894a6931 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#28 0x00007fec894a6c45 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#29 0x00007fec894abe59 in QCoreApplication::exec() () from /lib64/libQtCore.so.4
#30 0x0000000000408d42 in main ()

[Edit] forgot to copy the stdout:

Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Gtk-Message: Failed to load module "canberra-gtk-module"
NOT SANDBOXED
[fresh] [error] NPP_New, failed to get NPNVPluginElementNPObject, err = 9
[fresh] [error] NPP_New, failed to get NPNVPluginElementNPObject, err = 9
[fresh] [warning] ppb_var_var_to_utf8, 'var' is not a string, (0)
[fresh 28833] not implemented: PPB_OpenGLES2VertexArrayObject;1.0
[fresh 28833] not implemented: PPB_OpenGLES2DrawBuffers(Dev);1.0
Vector smash protection is enabled.
[fresh] [warning] ppb_var_var_to_utf8, 'var' is not a string, (0)
KCrash: Application 'nspluginviewer' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
KCrash: Connect sock_file=/home/fred/.kde4/socket-localhost.localdomain/kdeinit4__0
QPainter::begin: Widget painting can only begin as a result of a paintEvent
QPainter::translate: Painter not active
QPainter::setClipRect: Painter not active
ROBERT-MCDOWELL commented 9 years ago

I'm curious how konqueror manage flash plugin. sounds weird

ROBERT-MCDOWELL commented 9 years ago

did you try to make a right click?

i-rinat commented 9 years ago

@jccardot, from backtrace I can guess ppb_core_call_on_browser_thread() function called something at address NULL which caused crashing. The only function called by pointer that could be NULL is npn.pluginthreadasynccall. That function is provided by a browser. It can be NULL if browser part doesn't support that API yet.

Source for nspluginviewer used in Debian have NPAPI version 0.14, while required asynchronous thread calls and NPObject-related function were added only in 0.19 and 0.18 respectively. I'd say nspluginviewer code is very old (despite the fact it's in the kde-baseapps-15.08.2). Hence error message about NPNVPluginElementNPObject and subsequent crash.

There is no way PepperFlash could be made compatible. It extensively uses threading and interacts with a browser via Javascript.

That's why I proposed to delete /usr/lib/kde4/libnsplugin.so (or maybe /usr/lib64/kde4/libnsplugin.so). If you have kwebkitpart installed, Konqueror will switch to QtWebKit-based engine, which have required NPAPI support.

i-rinat commented 9 years ago

But on the other hand, there is a fallback code for older versions. Freshwrapper should not crash, but rather display a placeholder message in that case. Quick test with zeroing npn.pluginthreadasynccall and setting npn.version to 14 confirm that.

Which version of freshplayerplugin are you using? I also definitely fixed that [fresh] [warning] ppb_var_var_to_utf8, 'var' is not a string, (0) warning a while ago.

ROBERT-MCDOWELL commented 8 years ago

Very good news, the last freshplugin from git installed on konqueror with nsplugin removed worked like a charm now. right click does not crash anymore. great job!. I checked freshplugin on seamonkey and firefox, both worked well too. I will soon go deeper in functions....

i-rinat commented 8 years ago

I've changed rendering code, it now tests whenever XRender is available and uses software rendering as a fall back. Before that XRender was always used, so if you saw plugin content, XRender was working on your machine. And in turn new code shouldn't behave differently.

Could you ensure those changes are actually fixing the issue?

ROBERT-MCDOWELL commented 8 years ago

Yes I confirm it. everything is much more stable. no crash anymore when I right click in konqueror. but is it necessary to remove nsplugin from konqueror if a user needs to use freshplugin with it?

i-rinat commented 8 years ago

Yes I confirm it.

I was talking about checking current version from master and then walking back in history in order to find a fixing change. (One could move back by git checkout HEAD^. To return to the master branch: git checkout master).

but is it necessary to remove nsplugin from konqueror if a user needs to use freshplugin with it?

Yes, since nsplugin wasn't updated to meet changed NPAPI. By the way, Flash 11.2 doesn't work with nsplugin too,