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

Corrupted local java copy avoiding application to start #2357

Closed
lfcnassif opened this issue Nov 4, 2024 · 7 comments · Fixed by #2358
Closed

Corrupted local java copy avoiding application to start #2357

lfcnassif opened this issue Nov 4, 2024 · 7 comments · Fixed by #2358
Assignees
Labels

Comments

@lfcnassif
Copy link
Member

This is the second or third time an user reported such error to me. It throws NoClassDefFoundError in JRE standard classes. Deleting the c:/users/user/.iped/jre fixes the issue.

Maybe we could check if the local jre copy is ok before using it, similar to what is done to libreoffice (checking minimum files count or total size).

@wladimirleite
Copy link
Member

Maybe we could check if the local jre copy is ok before using it, similar to what is done to libreoffice (checking minimum files count or total size).

I guess it is a different situation, as code to check would need the JRE to run, right?

@lfcnassif
Copy link
Member Author

lfcnassif commented Nov 4, 2024

Here are some related errors sent by users:
image

image

Deleting the local JRE fixed the issue for the first, the second didn't give feedback.

@lfcnassif
Copy link
Member Author

lfcnassif commented Nov 4, 2024

I guess it is a different situation, as code to check would need the JRE to run, right?

Good point! Maybe we could explicitly use the case JRE for checking? It could be also corrupted... or maybe ProcessBuilder related classes could be missing in current JRE...

@wladimirleite
Copy link
Member

Good point! Maybe we could explicitly use the case JRE for checking? It could be also corrupted... or maybe ProcessBuilder related classes could be missing in current JRE...

I will take a closer look tomorrow, but using the case JRE for any simple check would be slow if the case is in a slow storage (e.g. mapped network drive), which is the whole point of having a local copy.

What would happen if any iped*jar is corrupted or deleted by user/external processes actions?
I guess it is a similar situation, except users have no idea about this "hidden" JRE.
As it is used only if the ".exe" is used, maybe there is a way to handle this in Launch4j configurations. At least to inform about the possibly corrupted JRE location (and suggest to delete it).
Another point, is that either the system disk is on bad condition (which may trigger other errors) or the user/external processes messed with that JRE subfolders.

@wladimirleite
Copy link
Member

wladimirleite commented Nov 6, 2024

As it is used only if the ".exe" is used, maybe there is a way to handle this in Launch4j configurations.

I managed to force the error, deleting awt.dll from C:\Users\<user>\.iped\jre-11.0.13\bin.
Launch4j won't help here, as it already considers the process as lauched at this point.
I am checking other alternatives.

@wladimirleite
Copy link
Member

wladimirleite commented Nov 6, 2024

@lfcnassif, one alternative that I found is to show a message in the console if NoClassDefFoundError or UnsatisfiedLinkError are thrown during SplashScreenManager startup.
Although it won't cover all cases, it would help in both reported situations.
I tried to do "a bit more" and delete the user JRE folder, but it didn't work (obviously) because there are many open files when it is running.

After the stack trace, I added the following message:

ERROR: User JRE may be corrupted!
Please, try to delete "C:\Users\<user>\.iped\jre-11.0.13" folder and run IPED again.

PS: <user> shows the actual user.

@lfcnassif
Copy link
Member Author

Thank you @wladimirleite for taking a look at this! I see it is a tricky issue... I think your solution is enough and should help many users!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants