Skip to content
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

"The currently displayed page contains invalid values." #38

Closed
palador opened this issue Aug 22, 2012 · 13 comments
Closed

"The currently displayed page contains invalid values." #38

palador opened this issue Aug 22, 2012 · 13 comments
Assignees
Labels
Milestone

Comments

@palador
Copy link

palador commented Aug 22, 2012

Since the last update, a error message appears everytime i try to open the "Chrome Theme" preferences page. The title of the error-message dialog says: "Could not accept changes", but i didn't change anything. The content of the error-message is "The currently displayed page contains invalid values.". There is only an OK-button.

When I click OK, go to another preferences-page and then back to the "Chrome Theme"-page, it is displayed correctly. But the theme still doesn't work anymore. I can change the settings now, but they won't be saved. The next time I open the Preferences-window and then the chrome-settings, the error-message-dialog appears again.

I'm using the following version of the plugin:

net.jeeeyul.eclipse.themes_1.4.0.201208220946.jar

I tried to uninstall and reinstall, but i still get the same error.

@jeeeyul
Copy link
Owner

jeeeyul commented Aug 22, 2012

Can you tell me what OS you using?
And If you have some error logs on Error Log view, please send them to me.

@palador
Copy link
Author

palador commented Aug 22, 2012

i'm using the latest linux (xubuntu) 64bit

here is an extract of my configuration as shown in the eclipse-about-dialog / configuration :
*** System properties:
applicationXMI=org.eclipse.ui.workbench/LegacyIDE.e4xmi
awt.toolkit=sun.awt.X11.XToolkit
eclipse.application=org.eclipse.ui.ide.workbench
eclipse.buildId=I20120608-1400
eclipse.commands=-os
linux
-ws
gtk
-arch
x86_64

@jeeeyul
Copy link
Owner

jeeeyul commented Aug 22, 2012

thanks!

I want to see error log also. Open Error Log(Windows > Show View > Error Log), and reproduce problem.
then you will see new error log item. open the error log and paste here, please.

@palador
Copy link
Author

palador commented Aug 22, 2012

ok, here we go:

Type:

Error

Message:

Problems occurred when invoking code from plug-in: "org.eclipse.jface".

Exception Stack Trace:

java.util.InputMismatchException
at java.util.Scanner.throwFor(Scanner.java:909)
at java.util.Scanner.next(Scanner.java:1530)
at java.util.Scanner.nextFloat(Scanner.java:2388)
at net.jeeeyul.eclipse.themes.ui.HSB.createFromString(HSB.java:14)
at net.jeeeyul.eclipse.themes.preference.ChromePreferenceExtensions.getHSB(ChromePreferenceExtensions.java:24)
at net.jeeeyul.eclipse.themes.preference.EditorPage.load(EditorPage.java:137)
at net.jeeeyul.eclipse.themes.preference.ChromeThemePrefererncePage.load(ChromeThemePrefererncePage.java:239)
at net.jeeeyul.eclipse.themes.preference.ChromeThemePrefererncePage.createContents(ChromeThemePrefererncePage.java:117)
at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:232)
at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1502)
at org.eclipse.jface.preference.PreferenceDialog$14.run(PreferenceDialog.java:1259)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1253)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:675)
at org.eclipse.jface.preference.PreferenceDialog$10.run(PreferenceDialog.java:709)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:705)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:888)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:886)
at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1226)
at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1251)
at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:262)
at org.eclipse.jface.util.OpenStrategy.access$5(OpenStrategy.java:256)
at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:433)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3529)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3182)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:215)
at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:65)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3554)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3179)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

Session Data

eclipse.buildId=I20120608-1400
java.version=1.7.0
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Command-line arguments: -os linux -ws gtk -arch x86_64

@jeeeyul
Copy link
Owner

jeeeyul commented Aug 22, 2012

It seems caused by wrong preference value in previously saved.
I don't know exact reason why they stored with wrong form.

anyway,

  1. Quit Eclipse
  2. Remove "Your-Workspace-DIR/.metadata/.plugins/org.eclipse.core.runtime/.settings/net.jeeeyul.eclipse.themes.prefs"
  3. Re-launch Eclipse.

It will reset all configurations for Theme.

I will inspect where wrong value came from, and provide fall-back solution against wrong value.

@palador
Copy link
Author

palador commented Aug 22, 2012

I just tried your workaround, but it still don't work. Same error. I even tried a new, clean workspace, without success.

@palador
Copy link
Author

palador commented Aug 22, 2012

Tried it with a new eclipse-installation and a new workspace. Installed your theme via marketplace. But, the error is still there.

@palador
Copy link
Author

palador commented Aug 22, 2012

I just played around with the debugger. As the stacktrace says, there is a problem with the Scanner:

    public static HSB createFromString(String literal) { // literal is "0,0,0.94" (w/o quotes)
        Scanner scanner = new Scanner(literal);
        scanner.useDelimiter(",");
        HSB result = new HSB();
        result.hue = scanner.nextFloat(); // works
        result.saturation = scanner.nextFloat(); // works
        result.brightness = scanner.nextFloat(); // fails
        return result;
    }

@palador
Copy link
Author

palador commented Aug 22, 2012

Ok i found the problem: it fails because I live in germany: Here, we use a comma instead a dot for numbers. So '0,94' would be correct.
Fixed example, which work for me:

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner("0,0,0.94");
        scanner.useDelimiter(",");
        scanner.useLocale(Locale.US);
        System.out.println(scanner.nextFloat());
        System.out.println(scanner.nextFloat());
        System.out.println(scanner.nextFloat());
    }
}

@jeeeyul
Copy link
Owner

jeeeyul commented Aug 22, 2012

Thanks.
I will fix it

@jeeeyul
Copy link
Owner

jeeeyul commented Aug 22, 2012

Fix is available on https://raw.github.com/jeeeyul/eclipse-themes/master/net.jeeeyul.eclipse.themes.beta-updatesite/ (repo)
Thanks for very interesting information. (German locale and Scanning Issue)

@palador
Copy link
Author

palador commented Aug 22, 2012

Thank you, it works now.

@ghost ghost assigned jeeeyul Aug 23, 2012
@jeeeyul
Copy link
Owner

jeeeyul commented Aug 23, 2012

It was fixed and released.

@jeeeyul jeeeyul closed this as completed Aug 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants