-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PPP_InitializeModule returned -2 #365
Comments
What version of Flash do you use? |
That is indeed possible. |
There is list of ChromeOS recovery images: https://dl.google.com/dl/edgedl/chromeos/recovery/recovery.conf. Some of them are for ARM-based Chromebooks, so they have inside them libpepflashplayer.so for ARM. I haven't tested any of them. But my guess is that they are all for hard-float variations, since there is no sense in making a notebook with an ARM processor without hardware floating point support. |
Also it's worth to try to override implemented interface list. Something like that: diff --git a/src/ppb_audio_input.c b/src/ppb_audio_input.c
index 6211bb7..d08205b 100644
--- a/src/ppb_audio_input.c
+++ b/src/ppb_audio_input.c
@@ -388,6 +388,7 @@ void
__attribute__((constructor))
constructor_ppb_audio_input(void)
{
+ register_interface("PPB_AudioInput(Dev);0.2", &ppb_audio_input_dev_interface_0_3);
register_interface(PPB_AUDIO_INPUT_DEV_INTERFACE_0_3, &ppb_audio_input_dev_interface_0_3);
register_interface(PPB_AUDIO_INPUT_DEV_INTERFACE_0_4, &ppb_audio_input_dev_interface_0_4);
register_resource(PP_RESOURCE_AUDIO_INPUT, ppb_audio_input_destroy); But if PepperFlash tries to use that interface, it will crash. |
Ok, Already tried something like that, but more intensive as I added everywhere the 0.2 as copy of 0.3 :-) |
Now I'm getting further. I recompiled my complete distro to hard float :-) |
Something wrong with GLX context. OpenGL support code required GLX while only EGL may be present. Try to disable using of OpenGL by adding |
yes, possibly, it's an nxp imx53, so only opengles available. |
I've read again and noticed there errors from ALSA lib. They are probably should be fixed somehow, but I don't know how. And even what's wrong. If you don't need audio at all, you can throw away code that tries ALSA, here: freshplayerplugin/src/audio_thread.c Lines 50 to 51 in 6834cbf
Also, I forgot a quirk that PepperFlash from ChromeOS had. It requires 3d, and won't work at all if 3d is not available. So, By default, OpenGL|ES 2 is emulated via OpenGL 2.0 and the shader translator from ANGLE. But since you probably have no full OpenGL 2.0 implementation, it's worth to try WITH_GLES2=1 build option ( You still need working GLX, as there is no code for EGL. |
Thank you,
I tried with WITH_GLES2=1, but now I get conflicting types:
In file included from /home/wv/git/freshplayerplugin/src/pp_resource.h:55:0,
from /home/wv/git/freshplayerplugin/src/async_network.c:40:
/opt/poky/1.8.2/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/GLES2/gl2.h:582:37: error: conflicting types for 'glTexImage2D'
GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels);
^
In file included from /opt/poky/1.8.2/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/GL/glx.h:32:0,
from /home/wv/git/freshplayerplugin/src/pp_resource.h:54,
from /home/wv/git/freshplayerplugin/src/async_network.c:40:
/opt/poky/1.8.2/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include/GL/gl.h:1294:23: note: previous declaration of 'glTexImage2D' was here
GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,
Do you happen to know which library has this glx? And if it’s available for arm (imx53)? I’m not really into these hardware-acceleration things…
From: Rinat Ibragimov [mailto:[email protected]]
Sent: donderdag 14 december 2017 22:18
To: i-rinat/freshplayerplugin
Cc: Vanhauwaert Wouter; Author
Subject: Re: [i-rinat/freshplayerplugin] PPP_InitializeModule returned -2 (#365)
I've read again and noticed there errors from ALSA lib. They are probably should be fixed somehow, but I don't know how. And even what's wrong.
If you don't need audio at all, you can throw away code that tries ALSA, here: https://github.com/i-rinat/freshplayerplugin/blob/6834cbf82b5a831bb368f4f35a2e075caf617482/src/audio_thread.c#L50-L51. By default, it tries JACK, PulseAudio, ALSA, and if they are all not available, uses special "noaudio" implementation.
Also, I forgot a quirk that PepperFlash from ChromeOS had. It requires 3d, and won't work at all if 3d is not available. So, enable_3d=0 setting won't help.
By default, OpenGL|ES 2 is emulated via OpenGL 2.0 and the shader translator from ANGLE. But since you probably have no full OpenGL 2.0 implementation, it's worth to try WITH_GLES2=1 build option (cmake -DWITH_GLES2=1 .. and so on).
You still need working GLX, as there is no code for EGL.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#365 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AL7uidCTLM8-DwVnhvdPVtliOfJOpyZUks5tAZCMgaJpZM4RA0Y9>.
|
I don't know. On my machine there are also glTexImage2D in both |
The prototypes actually look quite the same…
I just commented out one and now it compiles fine; I’ll have to test tomorrow if it works
From: Rinat Ibragimov [mailto:[email protected]]
Sent: donderdag 14 december 2017 23:23
To: i-rinat/freshplayerplugin
Cc: Vanhauwaert Wouter; Author
Subject: Re: [i-rinat/freshplayerplugin] PPP_InitializeModule returned -2 (#365)
I don't know. On my machine there are also glTexImage2D in both gl2.h and gl.h, but they do not conflict. At least, compilation is fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#365 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AL7uieM0sDtysaSWC4heODGsRYVxclF-ks5tAZ-rgaJpZM4RA0Y9>.
|
I’m getting closer
Only a few errors left. Removed the audio, enabled gles2 and enabled glx (sotwaremode) on my platform:
NOT SANDBOXED
[fresh 2200] not implemented: PPB_OpenGLES2VertexArrayObject;1.0
[fresh 2200] not implemented: PPB_OpenGLES2DrawBuffers(Dev);1.0
[fresh 2200] not implemented: PPB_BrokerTrusted;0.3
[fresh 2200] [PPB] {zilch} ppb_network_monitor_update_network_list
[fresh 2200] [PPB] {zilch} ppb_flash_set_instance_always_on_top instance=11, on_top=1
[fresh] [error] [NP] caught Xlib error 3
[fresh] [error] [NP] caught Xlib error 3
[fresh] [error] [NP] caught Xlib error 3
[fresh] [error] [NP] caught Xlib error 3
[fresh] [error] [NP] caught Xlib error 3
[fresh] [error] [NP] caught Xlib error 3
[fresh 2200] not implemented: PPB_BrokerTrusted;0.3
[fresh 2200] [PPB] {zilch} ppb_network_monitor_update_network_list
[fresh 2200] [PPB] {zilch} ppb_flash_set_instance_always_on_top instance=12, on_top=1
Any idea what that Xlib error 3 would mean?
From: Rinat Ibragimov [mailto:[email protected]]
Sent: donderdag 14 december 2017 23:23
To: i-rinat/freshplayerplugin
Cc: Vanhauwaert Wouter; Author
Subject: Re: [i-rinat/freshplayerplugin] PPP_InitializeModule returned -2 (#365)
I don't know. On my machine there are also glTexImage2D in both gl2.h and gl.h, but they do not conflict. At least, compilation is fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#365 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AL7uieM0sDtysaSWC4heODGsRYVxclF-ks5tAZ-rgaJpZM4RA0Y9>.
|
Now it works. I took another swf to try with, or rebooted, don't know what did it in the end, error 3 meant invalid window or something. |
Try running As I said before, try to use profiler.
They are not implemented, indeed. But those two are extensions, and they are not required. Main interface, "PPB_OpenGLES2;1.0" is implemented.
A bit, perhaps. Current implementation of "PPB_OpenGLES2;1.0" in FreshPlayerPlugin is synchronous, and in-process. It could be those extensions help when PepperFlash is sandboxed in another process and every call requires passing data between processes. Probably, command buffering should help performance, but I didn't look into that. |
Hello Rinat,
I just tryed the perf top output, and that gave me following. But I don’t really know if it really tells something ☺ Can you tell something about it?
-------------------------------------------------------------------------------
PerfTop: 57792 irqs/sec kernel: 6.7% exact: 0.0% [1000Hz cpu-clock-msecs], (all, 1 CPUs)
-------------------------------------------------------------------------------
samples pcnt function DSO
_______ _____ ___________________________ __________________
44481.00 16.8% neon_memcpy imx_drv.so
38411.00 14.5% __copy_from_user [kernel.kallsyms]
38237.00 14.4% __copy_to_user [kernel.kallsyms]
14614.00 5.5% memset /lib/libc-2.21.so
9980.00 3.8% __pthread_mutex_lock libpthread-2.21.so
6152.00 2.3% __memzero [kernel.kallsyms]
5883.00 2.2% sysfs_refresh_inode [kernel.kallsyms]
2900.00 1.1% get_page_from_freelist [kernel.kallsyms]
2814.00 1.1% link_path_walk [kernel.kallsyms]
2513.00 0.9% _IO_vfprintf /lib/libc-2.21.so
2149.00 0.8% strcmp /lib/libc-2.21.so
2053.00 0.8% __d_lookup [kernel.kallsyms]
1845.00 0.7% __wake_up_sync_key [kernel.kallsyms]
1539.00 0.6% __libc_malloc /lib/libc-2.21.so
1479.00 0.6% acl_permission_check [kernel.kallsyms]
1456.00 0.5% __alloc_pages_nodemask [kernel.kallsyms]
1387.00 0.5% kmem_cache_alloc [kernel.kallsyms]
1358.00 0.5% __free_pages_ok [kernel.kallsyms]
From: Rinat Ibragimov [mailto:[email protected]]
Sent: zaterdag 16 december 2017 12:38
To: i-rinat/freshplayerplugin
Cc: Vanhauwaert Wouter; Author
Subject: Re: [i-rinat/freshplayerplugin] PPP_InitializeModule returned -2 (#365)
However, it's very slow and consumes about 85% of my CPU. I wonder if I can take it to hardware?
Try running perf top to find out what actually uses CPU. There are two possibilities. First, it's just OpenGL ES 2 implemented in software. Then if you find how make it use hardware acceleration, it will become better. Second is that all CPU time is eaten by Flash runtime itself. Then there is nothing you can do.
As I said before, try to use profiler. perf top should be already available on any (somewhat) recent Linux system.
Tell me it wants to access opengles2 drawing functions, but they are not implemented? Is that correct?
They are not implemented, indeed. But those two are extensions, and they are not required. Main interface, "PPB_OpenGLES2;1.0" is implemented.
Would that improve the performance?
A bit, perhaps. Current implementation of "PPB_OpenGLES2;1.0" in FreshPlayerPlugin is synchronous, and in-process. It could be those extensions help when PepperFlash is sandboxed in another process and every call requires passing data between processes. Probably, command buffering should help performance, but I didn't look into that.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#365 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AL7uiS5rzLM-jI45O3La61SkxOSFDRPDks5tA6uUgaJpZM4RA0Y9>.
|
I've never had an experience with that particular driver or any ARM platform at all. However, I've once tried to run freshplayerplugin on Atom N270 with 945GSE chipset. Mesa reported OpenGL 2.0 supported there, but since there were no fragment shaders support in hardware, they were emulated on CPU. It was very CPU-consuming and sluggish. It wasn't exactly like your case, since |
Hello, I get following error on my system, running on ARM. I don't need audio at all, as I don't have any soundchip in it. What can I do to prevent this?
[fresh] [error] tables_open_display, glXQueryVersion returned False
[fresh] [error] tables_open_display, glXQueryVersion returned False
NOT SANDBOXED
[fresh 7118] not implemented: PPB_AudioInput(Dev);0.2
[ERROR:flash/platform/pepper/pep_module.cpp(143)] Browser does not support interface PPB_AudioInput(Dev);0.2.
[fresh] [error] NP_Initialize, PPP_InitializeModule returned -2
[fresh] [error] NP_Initialize, PPP_InitializeModule returned -2
The text was updated successfully, but these errors were encountered: