TerasologyLauncher icon indicating copy to clipboard operation
TerasologyLauncher copied to clipboard

The JLI_Launch funtion has not been found in the provided DLL

Open skaldarnar opened this issue 4 years ago • 4 comments
trafficstars

On some systems the launcher does not start with the following error message:

The JLI_Launch funtion has not been found in the provided DLL
C:\Users\windows10\TerasologyLauncher-windows64\TerasologyLauncher-windows64-4.4.0\jre\bin\jli.dll. Is your Java installation corrupted?

From the reports we have received so far there is nothing to be clearly identified as root cause. So far, all reports were from systems running Windows 10.

Launcher Versions

Reported Systems

The issue was reported for systems with the following specs:

  • (reported by Mister) CPU Intel Celeron N3050 (1.6 Gigglehertz) Ram: 4 GB (Shared with the GPU) Windows 10 Home (64 bit) V: 20H2 (19042.928) (aka: HP 260 G4)

  • (reported by GEISTBREAKER and fatmaf) Windows 10 x64

Working System

The issue cannot be reproduced on the following systems:

  • CPU: Intel Core i5-4690 CPU @ 3.50GHz RAM 16 GB Win 10 Home (20H2) (same as above) GPU ASUS 705 Ti STRIX

skaldarnar avatar Jun 27 '21 17:06 skaldarnar

Needs to compare dlls by working and not working system. (Are Invalid unzipping?) Needs to compare windows build numbers.(are system dlls diff?) Needs to check, exists java installation or not.(jli can be ref to dll via java home?) Needs to check dll dependencies(jli can use some dll, which should be installed at system)

DarkWeird avatar Jul 16 '21 12:07 DarkWeird

(I forgot to update this ticket ...)

@praj-foss tracked this error down to originate from https://github.com/MovingBlocks/TerasologyJavaLauncher/blob/385dc34b93179f1658faf6aff0d97fd8cb62c299/jli_library_win.cpp#L52. As that C++ code to write our own EXE hasn't been maintained for years I'm in favor of just removing them and fully rely on the BAT file for Windows.

@praj-foss suggested on Discord to use https://github.com/libgdx/packr to create a replacement for the EXE.

So i prepared the json+exe (and it works alright for Linux launcher). Can anyone test this on Windows? Here's how to try this:

The JSON file contains the full class path, so even though this might work for testing the approach right now we'd need a way to generate the config file with each build.

There is no PR for this yet.

skaldarnar avatar Jul 17 '21 14:07 skaldarnar

Using the BAT startup script (Gradle default) is probably the most error-free approach because Gradle is maintaining it. However, I'm not sure how user-friendly it will be for normal Windows users. I haven't been on Windows for quite a while, but here are some things we should keep in mind when shipping BAT launchers:

  • is it easy to launch? (eg: double-click to run)
  • can we add shortcuts to them? (eg: right-click => send to desktop)
  • can we set icons on them? (the original TerasologyLauncher.x64.exe file had an icon I guess?)

If we take the other route (using libgdx's generic EXE), simply copying over those two static files (exe + json) into the final launcher zip should work fine most of the time. But yeah, we'll need to modify the JSON whenever our project dependencies change. And since exe uses native C interfaces to jvm, we also need to ensure that it works fine anytime we bundle a different jvm with the zip.

praj-foss avatar Jul 28 '21 04:07 praj-foss

Until we get clearer on the above-mentioned questions, @skaldarnar proposed the following intermediate actions:

  • [ ] drop the .exe
  • [ ] put note on launcher download site
  • [ ] add DLL error to troubleshooting section in engine wiki

jdrueckert avatar Oct 14 '22 22:10 jdrueckert