eog_panorama icon indicating copy to clipboard operation
eog_panorama copied to clipboard

Script Error :0:0

Open offensivelyaverage opened this issue 8 years ago • 17 comments

Opening a compatible Photo Sphere with eog 3.20.2 on Ubuntu 16.10 I get "webview error: script error.: :0:0"

screen shot 2017-01-29 at 20 21 03

I have all listed dependencies installed, including python3-magic (not listed by required), and the image lists seems like it should work:

screen shot 2017-01-29 at 20 24 13

offensivelyaverage avatar Jan 29 '17 20:01 offensivelyaverage

Does it always occur to you, or only sometimes?

It has never happend during testing of this version of my code on many panoramas. Today I get it about once in 20 times opening the image, it is totally indeterministic.

It is likely an error thrown in an asynchronous operation in one of the used libraries (maybe also a timing issue), unfortunately asynchronous errors totally lack info about the location in the code.

Aerilius avatar Jan 30 '17 18:01 Aerilius

Always. I'm yet to get a single photosphere/panorama photo to load.

offensivelyaverage avatar Jan 30 '17 19:01 offensivelyaverage

A possibility for such an error to occur always is when WebGL was not available (for whatever reason). I added a (slow) fallback to canvas rendering. Can you check if that solves the issue on your side as well?

Aerilius avatar Feb 01 '17 12:02 Aerilius

Alas, it still doesn't work for me on either Ubuntu 16.04 LTS or Ubuntu 16.10.

It does do something new on the latter: when opening a panorama image i get the 'script error' error, but when paging left or right to another panorama image i get 'type error' error.

Perhaps related?

screen shot 2017-02-01 at 17 54 59

offensivelyaverage avatar Feb 01 '17 17:02 offensivelyaverage

That's a follow-up error.

I had tested booting from a fresh 16.10 live system (with only the gir1.2-gexiv2 package added) and it worked without error, so there seem not to be any dependencies missing. However when I now tested in VirtualBox, I get two different situations:

  • with 3D acceleration disabled before-hand: it falls back to Canvas rendering and shows the panorama
  • with 3D acceleration enabled: Webkit does not start properly (no matter whether WebGL s actually used or not)

I believe that this could mean VirtualBox's 3D acceleration is still not stable. Were you doing your test in a virtual machine?

Aerilius avatar Feb 02 '17 15:02 Aerilius

I have the same problem on Ubuntu 16.10 (not a virtual machine).

charlesmillet avatar Feb 12 '17 22:02 charlesmillet

I have the same issue too. Not using a virtual machine. I'm on a Intel Mobile 4 Series Chipset Integrated Graphics, with drivers from 01.org, on Ubuntu 16.10 x64.

$ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Mobile Intel® GM45 Express Chipset 
OpenGL version string: 2.1 Mesa 12.0.3
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 12.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:
$ eog ~/Downloads/PANO_20150812_194931.jpg
(eog:3616): Gtk-WARNING **: Theme parsing error: eog.css:6:34: The style property GtkScrollbar:min-slider-length is deprecated and shouldn't be used anymore. It will be removed in a future version
Traceback (most recent call last):
  File "/usr/lib/x86_64-linux-gnu/eog/plugins/pythonconsole/__init__.py", line 62, in do_activate
    model.append_item(item)
AttributeError: 'NoneType' object has no attribute 'append_item'

** (eog:3616): CRITICAL **: eog_reload_plugin_activate: assertion 'G_IS_MENU (model)' failed
Duplicate property or field node
Duplicate property or field node
Duplicate property or field node

(eog:3616): Gtk-WARNING **: Allocating size to EogStatusbar 0x560da4126dd0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
WebView error: Script error.: :0:0
Error loading module '/usr/lib/firefox/plugins/nppdf.so': /usr/lib/firefox/plugins/nppdf.so: wrong ELF class: ELFCLASS32
Error scanning plugin /usr/lib/firefox/plugins/nppdf.so, /usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitPluginProcess returned 256 exit status
Error loading module '/usr/lib/mozilla/plugins/nppdf.so': /usr/lib/mozilla/plugins/nppdf.so: wrong ELF class: ELFCLASS32
Error scanning plugin /usr/lib/mozilla/plugins/nppdf.so, /usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitPluginProcess returned 256 exit status

depau avatar Feb 13 '17 19:02 depau

charlesmillet and Depaulicious, thanks for confirming. Unfortunately I cannot reproduce it. I suspect that either the WebGL initialization fails, or it's a bug in my code, or transfering the image data uri fails.

I notice you have slightly older OpenGL version support (2.1 and GLSL 1.20, I have 3.0 and GLSL 1.30). I don't know if I can somehow set my computer to use (or emulate) an older version for testing.

As a sidenote, although plugins are disabled in this webview, Webkit outputs "Error loading module". I had this once after upgrading to 64bit while still having 32bit binary plugins in my user profile's ~/.mozilla folder.

Aerilius avatar Feb 13 '17 22:02 Aerilius

@Aerilius is there a way I can try it on a web browser? Just to see if a browser is able to render it.

depau avatar Feb 13 '17 22:02 depau

I'm affected with this bug too. Just adding myself to discussion. Maybe I can help ...

vojtabiberle avatar Feb 15 '17 16:02 vojtabiberle

I added changes to the htm file for debugging (in the new branch issue7). https://github.com/Aerilius/eog_panorama/blob/issue7/eog_panorama/eog_panorama.htm

I would be interested in two tests:

A) Does it work in a browser? (WebKit2 in Gtk is not very unstable, so results may be different in a browser).

  1. Open the ego_panorama/eog_panorama.htm file in a browser.
  2. Open the Developer console (Ctrl+Shift+I) and check for errors.
  3. On the console, enter test_show_panorama()
  4. It should log "show_panorama_completed" which is normally sent back to the Eye of Gnome plugin.

B) All JavaScripts are now embedded in one file so that error messages are not anymore censored by cross-origin policy.

  1. Open a panorama image in Eye of Gnome from a terminal: eog image.jpg
  2. Check for the hopefully more detailed script error.

Thank you very much for testing! I cannot promise I can find and solve the problem but I hope so. Also WebKitGTK sometimes crashes, and maybe it would be it is rather worth the extra effort to integrate a panorama viewer from some other GTK-based opensource project.

Aerilius avatar Mar 09 '17 15:03 Aerilius

Hello, Test A:

test_show_panorama()
undefined
THREE.WebGLRenderer 82  eog_panorama.htm:19526:3
Error: WebGL: texImage2D: Conversion requires pixel reformatting.  eog_panorama.htm:19041:5
Array [ "show_panorama_completed", undefined ]

Test B:

$ eog

(eog:24144): Gtk-WARNING **: Theme parsing error: eog.css:6:34: The style property GtkScrollbar:min-slider-length is deprecated and shouldn't be used anymore. It will be removed in a future version

** (eog:24144): CRITICAL **: eog_reload_plugin_activate: assertion 'G_IS_MENU (model)' failed
Traceback (most recent call last):
  File "/usr/lib/x86_64-linux-gnu/eog/plugins/pythonconsole/__init__.py", line 62, in do_activate
    model.append_item(item)
AttributeError: 'NoneType' object has no attribute 'append_item'

(eog:24144): EOG-WARNING **: Failed to open file '/home/bazil/.cache/thumbnails/normal/68129c6fd87ce2f363143b7163fd8bc4.png': Adresář nebo soubor neexistuje

(eog:24144): Gtk-WARNING **: Allocating size to EogStatusbar 0x55ba0f65fde0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?

And panorama in EOG worked! :+1:

vojtabiberle avatar Mar 09 '17 23:03 vojtabiberle

Hi, thanks!

A) I have never seen "texImage2D: Conversion requires pixel reformatting", it is in three.js and seems to be an internal error in Firefox.

B) The script error is gone. The terminal logs only other GTK/EOG warnings.

I still have no idea what caused the script error and whether it is "fixed" or just does not occur anymore. Could you test again with the eog_panorama.htm file from the master branch to see if that still causes an error?

Aerilius avatar Mar 10 '17 09:03 Aerilius

Offcourse, here are your test results:

Test A: Script stops with this message in URL: eogp://error/Script%20error.%3A%20file%3A%2F%2F%2Fhome%2Fbazil%2FSources%2Feog_panorama%2Feog_panorama%2Fphoto-sphere-viewer%2Fphoto-sphere-viewer.js%3A0%3A0

Test B:

$ eog

(eog:14101): Gtk-WARNING **: Theme parsing error: eog.css:6:34: The style property GtkScrollbar:min-slider-length is deprecated and shouldn't be used anymore. It will be removed in a future version

** (eog:14101): CRITICAL **: eog_reload_plugin_activate: assertion 'G_IS_MENU (model)' failed
Traceback (most recent call last):
  File "/usr/lib/x86_64-linux-gnu/eog/plugins/pythonconsole/__init__.py", line 62, in do_activate
    model.append_item(item)
AttributeError: 'NoneType' object has no attribute 'append_item'

(eog:14101): Gtk-WARNING **: Allocating size to EogStatusbar 0x564fc1d1fcf0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
WebView error: Script error.: :0:0

And we thank you for repair panoramas. Because anything you have done was repair it :-)

vojtabiberle avatar Mar 10 '17 09:03 vojtabiberle

I can also repeatedly confirm the same error on master, but branch issue7 is working.

andrewharvey avatar Jun 21 '17 06:06 andrewharvey

Hello everyone,

I hope someone is still reading. I installed the plug-in today (2020-05-09) with eog 3.28.1 under ubuntu 18.04.4 LTS (Bionic), cloning the latest version from github. Works like a charm for some images. Not at all for others.

For those images where it works I see the following warning in the console yet panorama is nicely displayed: WebView warn: THREE.WebGLRenderer: WEBGL_depth_texture extension not supported.

For those images where it does not work I get the error message reported by others before: WebView error: Script error.: :0:0

No other error message is being displayed. When I converted an image that produces the error message with convert from imagemagick I noticed the following behaviour:

Original image, dimensions: 9278x3813, size: 11.6 MB -> error message 50% scaled down image, dimensions: 4864x1907, size: 3.3 MB -> correctly displayed 100% scaled down image, dimensions: 9278x3813, size: 11.6 MB -> error message

Could it be the problem is memory/image size related? I have 16GB RAM installed. So I think that physical memory is not the limitation. Yet there could be some limit anywhere in the code?

kalbfuss avatar May 09 '20 19:05 kalbfuss

hi all same here on debian 11

ftoledo avatar Jul 24 '22 19:07 ftoledo