vaadin / eclipse-plugin

Vaadin Plugin for Eclipse
https://vaadin.com/eclipse
16 stars 8 forks source link

An internal error occurred during: "Fetch all notifications". #751

Open tim-bitreactive opened 6 years ago

tim-bitreactive commented 6 years ago

When I start Eclipse and occasionally while Eclipse is already running, I get an error dialog. The Eclipse Error log reveals the following details:

eclipse.buildId=4.7.2.M20171130-0510
java.version=1.8.0_161
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Framework arguments:  -Dswt.autoScale=exact
Command-line arguments:  -data /home/user/workspaces/development/vaadin -os linux -ws gtk -arch x86_64 -Dswt.autoScale=exact

org.eclipse.core.jobs
Error
Mon Mar 19 17:16:41 CET 2018
An internal error occurred during: "Fetch all notifications".

java.lang.IllegalArgumentException: Argument not valid
    at org.eclipse.swt.SWT.error(SWT.java:4514)
    at org.eclipse.swt.SWT.error(SWT.java:4448)
    at org.eclipse.swt.SWT.error(SWT.java:4419)
    at org.eclipse.swt.graphics.ImageData.<init>(ImageData.java:426)
    at org.eclipse.swt.graphics.ImageData.scaledTo(ImageData.java:1118)
    at com.vaadin.integration.eclipse.notifications.model.NotificationsService.downloadImage(NotificationsService.java:674)
    at com.vaadin.integration.eclipse.notifications.model.NotificationsService.getImage(NotificationsService.java:610)
    at com.vaadin.integration.eclipse.notifications.model.NotificationsService.registerImage(NotificationsService.java:568)
    at com.vaadin.integration.eclipse.notifications.model.NotificationsService.ensureImageRegistered(NotificationsService.java:561)
    at com.vaadin.integration.eclipse.notifications.model.NotificationsService.downloadImages(NotificationsService.java:547)
    at com.vaadin.integration.eclipse.notifications.model.NotificationsService.downloadImages(NotificationsService.java:157)
    at com.vaadin.integration.eclipse.notifications.jobs.FetchNotificationsJob.run(FetchNotificationsJob.java:80)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
fschaupp commented 6 years ago

I have this problem too!

zerocarbonproject commented 4 years ago

I get this issues every startup. Fresh eclipse install 2019-09, with only vaadin plugin installed.

`eclipse.buildId=4.13.0.I20190916-1045 java.version=1.8.0_232 java.vendor=AdoptOpenJDK BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -data file:/home/user/dev/java/workspace/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product

!ENTRY org.apache.ivyde.eclipse 1 0 2019-12-12 11:42:16.400 !MESSAGE starting IvyDE plugin

!ENTRY org.apache.ivyde.eclipse 1 0 2019-12-12 11:42:16.413 !MESSAGE IvyDE plugin started

!ENTRY com.vaadin.designer2 1 0 2019-12-12 11:42:16.844 !MESSAGE Schedule fetching all notifications

!ENTRY com.vaadin.designer2 1 0 2019-12-12 11:42:16.848 !MESSAGE Schedule version update jobs

!ENTRY com.vaadin.designer2 1 0 2019-12-12 11:42:17.129 !MESSAGE Fetching all notifications

!ENTRY com.vaadin.designer2 1 0 2019-12-12 11:42:17.130 !MESSAGE Requesting user info (notification settings URL)

!ENTRY com.vaadin.designer2 1 0 2019-12-12 11:42:17.669 !MESSAGE BrowserCore initialized.

!ENTRY com.vaadin.designer2 1 0 2019-12-12 11:42:18.557 !MESSAGE HTTP Response code :200

!ENTRY com.vaadin.designer2 1 0 2019-12-12 11:42:18.567 !MESSAGE HTTP Response code :200

!ENTRY com.vaadin.designer2 1 0 2019-12-12 11:42:18.568 !MESSAGE Parse notifications

!ENTRY com.vaadin.designer2 1 0 2019-12-12 11:42:18.572 !MESSAGE Save JSON notifications content to cache file /home/user/dev/java/workspace/.metadata/.plugins/com.vaadin.integration.eclipse/notifications-cache.json

!ENTRY com.vaadin.designer2 1 0 2019-12-12 11:42:19.078 !MESSAGE Icon https://vaadin.com/documents/10187/10395/tori-icon-blue-bg-90px/4597dffb-3868-4711-b422-8fc3e71844e6?t=1394217295000 is downloaded

!ENTRY org.eclipse.core.jobs 4 2 2019-12-12 11:42:19.096 !MESSAGE An internal error occurred during: "Fetch all notifications". !STACK 0 java.lang.ArrayIndexOutOfBoundsException: 6401 at org.eclipse.swt.graphics.ImageLoader.save(ImageLoader.java:507) at com.vaadin.integration.eclipse.notifications.model.NotificationsService.cacheImage(NotificationsService.java:626) at com.vaadin.integration.eclipse.notifications.model.NotificationsService.getImage(NotificationsService.java:613) at com.vaadin.integration.eclipse.notifications.model.NotificationsService.registerImage(NotificationsService.java:570) at com.vaadin.integration.eclipse.notifications.model.NotificationsService.ensureImageRegistered(NotificationsService.java:563) at com.vaadin.integration.eclipse.notifications.model.NotificationsService.downloadImages(NotificationsService.java:549) at com.vaadin.integration.eclipse.notifications.model.NotificationsService.downloadIcons(NotificationsService.java:163) at com.vaadin.integration.eclipse.notifications.jobs.FetchNotificationsJob.run(FetchNotificationsJob.java:72) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

!ENTRY com.vaadin.designer2 1 0 2019-12-12 11:42:19.245 !MESSAGE Schedule fetching new notifications

!ENTRY com.vaadin.designer2 1 0 2019-12-12 11:42:46.862 !MESSAGE All vaadin 7+ projects : []`

magi42 commented 4 years ago

My guess is that it's a bug or incompatibility in the Eclipse SWT ImageLoader implementation for GTK. The ImageLoader has different implementations for MacOS, Win, and GTK, and the GTK implementation does some oddest handling with the image data, while the Win/MacOS implementation uses default stuff.

It might be related to https://bugs.eclipse.org/bugs/show_bug.cgi?id=558043

It's about image palette, and in the Vaadin plugin code about notification images, so maybe some of our notification icons or other images has a palette which Eclipse can't handle in GTK?

We could fix the incompatible images, or do a workaround in the plugin, at least handle the exception gracefully.

The Eclipse bug has just been fixed in December 2019 and is targeted for the 2020-03 release, so we'll see if it fixes our problem.