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

Error while loading ProB UI #359

Open
gllambi-at-pyxis opened this issue Aug 9, 2024 · 2 comments
Open

Error while loading ProB UI #359

gllambi-at-pyxis opened this issue Aug 9, 2024 · 2 comments
Labels
bug Something isn't working ProB2UI Issue related to JavaFX ProB2UI

Comments

@gllambi-at-pyxis
Copy link

gllambi-at-pyxis commented Aug 9, 2024

Hi, I've been using ProB UI from January to March and now I want to open the application and breaks while loading throwing this error:

com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) [Guice/ErrorInjectingConstructor]: UncheckedIOException: Failed to load config file: MismatchedInputException: No content to map due to end-of-input
 at [Source: (File); line: 1, column: 0]
  at Config.<init>(Config.java:29)
  at Config.class(Config.java:29)
  at FontSize.<init>(FontSize.java:48)
      \_ for 1st parameter
  at FontSize.class(FontSize.java:48)
  at StageManager.<init>(StageManager.java:67)
      \_ for 2nd parameter
  at StageManager.class(StageManager.java:67)
  while locating StageManager

Learn more:
  https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR

1 error

======================
Full classname legend:
======================
Config:                   "de.prob2.ui.config.Config"
FontSize:                 "de.prob2.ui.layout.FontSize"
MismatchedInputException: "com.fasterxml.jackson.databind.exc.MismatchedInputException"
StageManager:             "de.prob2.ui.internal.StageManager"
UncheckedIOException:     "java.io.UncheckedIOException"
========================
End of classname legend:
========================

	at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251)
	at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1151)
	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1186)
	at de.prob2.ui.ProB2.startInBackground(ProB2.java:248)
	at de.prob2.ui.ProB2.lambda$start$2(ProB2.java:234)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.UncheckedIOException: Failed to load config file: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: (File); line: 1, column: 0]
	at de.prob2.ui.config.Config.load(Config.java:110)
	at de.prob2.ui.config.Config.<init>(Config.java:85)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
	at com.google.inject.internal.DefaultConstructionProxyFactory$ReflectiveProxy.newInstance(DefaultConstructionProxyFactory.java:120)
	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
	at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:40)
	at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:60)
	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
	at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:40)
	at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:60)
	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
	at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1148)
	... 4 more
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: (File); line: 1, column: 0]
	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
	at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4916)
	at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:4793)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2974)
	at de.prob.json.JacksonManager.extractNewMetadata(JacksonManager.java:139)
	at de.prob.json.JacksonManager.readAndCheckMetadata(JacksonManager.java:156)
	at de.prob.json.JacksonManager.readFromFile(JacksonManager.java:206)
	at de.prob2.ui.config.Config.load(Config.java:99)
	... 34 more
@iTitus
Copy link
Collaborator

iTitus commented Aug 9, 2024

It seems like the config file is malformed.
Can you show its contents? The default location on Windows is %LOCALAPPDATA%\STUPS\prob2-ui\config_v3.json.
I suspect it might be empty. If it is you can just delete the file.

@iTitus iTitus added ProB2UI Issue related to JavaFX ProB2UI bug Something isn't working labels Aug 9, 2024
@iTitus
Copy link
Collaborator

iTitus commented Aug 9, 2024

I added some safe guards so corruption of json files is less likely to happen again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ProB2UI Issue related to JavaFX ProB2UI
Projects
None yet
Development

No branches or pull requests

2 participants