Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved instrument library is missing in target VM

First Bot Author
Joined
Aug 7, 2013
Messages
262
jdk7u-jdk/HotSpotVirtualMachine.java at master · openjdk-mirror/jdk7u-jdk · GitHub

This happens when I launch RuneMate through both IntelliJ and the command line.
Basically, I load the client, sign in and manually select Staking Salvation (local script).
I then select an account and start a new OSRS instance through the client.
As soon as the instance is fully loaded, I press the green start button and the following exception occurs:

Code:
D:\Program Files (x86)\RuneMate>"C:\Program Files (x86)\Java\jre1.8.0_92\bin\java" -jar RuneMate.jar -sdk -world=310 -login=Salvation:<redacted>
[Debug] RuneMate Version: 2.0.5
[Debug] Java Version: 8u92 x86 (Oracle Corporation)
[Debug] Operating System: Windows 10 x64
apr 23, 2016 11:35:17 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Attempting to start official client. If it does not open shortly please do so manually.
Checking for a new game instance every second for two minutes or until one is found.
Found a new game instance after 33 seconds.
Exception in thread "3304 - Staking Salvation" java.lang.InternalError: instrument library is missing in target VM
        at sun.tools.attach.HotSpotVirtualMachine.loadAgent(fh:13)
        at nul.IiiIIIiIIIii.null(jjc:170)
        at nul.IiIiIIiIiIiI.run(wbc:216)
Caused by: com.sun.tools.attach.AgentLoadException: Failed to load agent library
        at sun.tools.attach.WindowsVirtualMachine.execute(ck:145)
        at sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(fh:43)
        at sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(fh:204)
        at sun.tools.attach.HotSpotVirtualMachine.loadAgent(fh:170)
        ... 2 more

@Arbiter suggested to start another OSRS client through RuneMate, but if I do that I get the same error and the collapsible menu in RuneMate freezes. I will no longer be able to select a bot or an account, it is stuck on the Clients tab.

@Cloud I have installed two 64 bit JDKs (one of which I am going to remove now, because it's out-dated) and one 32-bit JRE which I use to open RuneMate. Could you help me fix this?
 
I just removed some unneeded Java installations, and I am left with JRE 8.92 x86 and JDK 8.92 x64.
 
It seems this also happens to bots I add through the store.
 
Still present in 2.0.6
 
Still happens in 2.0.7
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,044
Can you find and share the location of your jagexcache folder? As an additional check, try deleting the jagexcache folder that exists and restarting the client. Ensure that it is recreated in the same location.
 
First Bot Author
Joined
Aug 7, 2013
Messages
262
Can you find and share the location of your jagexcache folder? As an additional check, try deleting the jagexcache folder that exists and restarting the client. Ensure that it is recreated in the same location.
Sure.

Without changing anything, I found the following exact matches of "jagexcache" on my system:
  • C:\Users\Stephan Bijzitter\OSBuddy\jagexcache
  • C:\Users\Stephan Bijzitter\jagexcache
  • D:\Users\Stephan Bijzitter\jagexcache

I then deleted all of them, uninstalled RuneScape NXT and Old School RuneScape and made sure the system was as good as new.

After re-installing the Oldschool RuneScape client, a directory appeared in:
  • D:\Users\Stephan Bijzitter\jagexcache
This directory seems to be created during installation, rather than during the loading of the game.
Loading the game creates no additional directories.

After re-installing the RuneScape NXT client with all default options (in C), no additional directory had been created. After starting the game, again no directory had been created. I proceed to assume NXT solely uses appdata.

I then launched OSBuddy Pro, and a new directory had been created in:
  • C:\Users\Stephan Bijzitter\jagexcache
This is strange, as I would have expected OSBuddy to use the cache in its own OSBuddy directory, but apparently not.

Finally, I started on OSRS instance using RuneMate 2.0.7 and no additional directory had been created.
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,044
Sure.

Without changing anything, I found the following exact matches of "jagexcache" on my system:
  • C:\Users\Stephan Bijzitter\OSBuddy\jagexcache
  • C:\Users\Stephan Bijzitter\jagexcache
  • D:\Users\Stephan Bijzitter\jagexcache

I then deleted all of them, uninstalled RuneScape NXT and Old School RuneScape and made sure the system was as good as new.

After re-installing the Oldschool RuneScape client, a directory appeared in:
  • D:\Users\Stephan Bijzitter\jagexcache
This directory seems to be created during installation, rather than during the loading of the game.
Loading the game creates no additional directories.

After re-installing the RuneScape NXT client with all default options (in C), no additional directory had been created. After starting the game, again no directory had been created. I proceed to assume NXT solely uses appdata.

I then launched OSBuddy Pro, and a new directory had been created in:
  • C:\Users\Stephan Bijzitter\jagexcache
This is strange, as I would have expected OSBuddy to use the cache in its own OSBuddy directory, but apparently not.

Finally, I started on OSRS instance using RuneMate 2.0.7 and no additional directory had been created.
@Cloud perhaps we should be scanning all drives for the cache.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
@Cloud perhaps we should be scanning all drives for the cache.
Scanning the entirety of all the partitions would be way too intensive.
 
@Salvation Thanks for the information, that was exactly what we needed actually.
@Arbiter The most important of those would be the one the contains the jagexlauncher folder which has their JRE in it.
 
First Bot Author
Joined
Aug 7, 2013
Messages
262
Scanning the entirety of all the partitions would be way too intensive.
 
@Salvation Thanks for the information, that was exactly what we needed actually.
@Arbiter The most important of those would be the one the contains the jagexlauncher folder which has their JRE in it.
In my case, that is the D drive.
 
First Bot Author
Joined
Aug 7, 2013
Messages
262
Any idea why it would do that? That's not where user.home points to is it?
Well, I'm running Windows 10 and it allows you to change the drive for directories like the desktop, downloads, documents, pictures, etc. I changed all those to D, as C is an old SSD which only has a 120GB capacity.

Perhaps that is related, although running "cd %HOMEPATH%" does go to the C drive user directory.
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,044
Scanning the entirety of all the partitions would be way too intensive.
 
@Salvation Thanks for the information, that was exactly what we needed actually.
@Arbiter The most important of those would be the one the contains the jagexlauncher folder which has their JRE in it.
I didn't mean scan the whole drive lol. I meant scan a number of possible directories, such as the %USER_HOME% path but across all the mounted drives.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
Well, I'm running Windows 10 and it allows you to change the drive for directories like the desktop, downloads, documents, pictures, etc. I changed all those to D, as C is an old SSD which only has a 120GB capacity.

Perhaps that is related, although running "cd %HOMEPATH%" does go to the C drive user directory.
That sounds like it could definitely be a part of the problem... Hmm now how to approach that with java....
 
First Bot Author
Joined
Aug 7, 2013
Messages
262
That sounds like it could definitely be a part of the problem... Hmm now how to approach that with java....
File (Java Platform SE 8 )

Java:
    public static void main(final String... args) {
        final File[] drives = File.listRoots();
        final String home = System.getProperty("user.home");

        for (File drive : drives) {
            String location = home.replaceFirst(".*?:\\\\", drive.toString() + "\\");
            location += "\\jagexcache\\jagexlauncher";

            final File directory = new File(location);
            System.out.println(location + " does " + (directory.exists() ? "not exist" : "exist"));
        }
    }

Output:
C:\Users\Stephan Bijzitter\jagexcache\jagexlauncher does exist
D:\Users\Stephan Bijzitter\jagexcache\jagexlauncher does not exist

Sidenote @Arbiter please add Java syntax to the code markdown
 
Last edited by a moderator:
Mod Automation
Joined
Jul 26, 2013
Messages
3,044
File (Java Platform SE 8 )

Java:
    public static void main(final String... args) {
        final File[] drives = File.listRoots();
        final String home = System.getProperty("user.home");

        for (File drive : drives) {
            String location = home.replaceFirst(".*?:\\\\", drive.toString() + "\\");
            location += "\\jagexcache\\jagexlauncher";

            final File directory = new File(location);
            System.out.println(location + " does " + (directory.exists() ? "not exist" : "exist"));
        }
    }

Output:
C:\Users\Stephan Bijzitter\jagexcache\jagexlauncher does exist
D:\Users\Stephan Bijzitter\jagexcache\jagexlauncher does not exist

Sidenote @Arbiter please add Java syntax to the code markdown
Already exists. Edited your post to use it.
 
Also your proposal, while simple, isn't the complete picture. Bruteforcing all the mounted drives could have adverse effects, like spinning up CD drives and timing out on network drives.
 
@Salvation while we try to engineer a proper solution to this you can create a symlink from C:\Users\You\jagexcache\ to D:\Users\You\jagexcache\. That should get the client working just fine.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
We could use JNA for a windows specific solution
 
Kernel32.dll exports the function GetDriveType(lpRootPathName) which appears to do what we need, but as stated that would be a windows only solution.
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,044
We could use JNA for a windows specific solution
 
Kernel32.dll exports the function GetDriveType(lpRootPathName) which appears to do what we need, but as stated that would be a windows only solution.
If it works, I think it's our best option. I doubt this issue will occur in *nix OSes, and even if they did their solution would have to be unique regardless.
 
First Bot Author
Joined
Aug 7, 2013
Messages
262
@Arbiter just had the time to test symlinking it, and it indeed works :)
RszTpiO.png
 
Joined
Jul 25, 2015
Messages
17
What exactly did you symlink? I'm having the same issue but when symlinking C:\Users\*me*\Favorites\jagexcache to C:\Users\*me*\Favorites\jagexcache I get "Cannot create file when that file already exists"
 
Joined
Nov 22, 2017
Messages
1
If your runescape is installed to the D drive and your runemate is installed on the C drive, you need to delete the "C:\Users\*username*\jagexcache" folder and then do
"mklink /J "C:Users\username\jagexcache" "D:\Users\username\jagexcache""
 
Top