Bug instrument library is missing in target VM

Discussion in 'Client & Site Support' started by Salvation, Apr 23, 2016.

  1. 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 bot).
    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 (Text):
    2. 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>
    3. [Debug] RuneMate Version: 2.0.5
    4. [Debug] Java Version: 8u92 x86 (Oracle Corporation)
    5. [Debug] Operating System: Windows 10 x64
    6. apr 23, 2016 11:35:17 PM java.util.prefs.WindowsPreferences <init>
    7. WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
    8. Attempting to start official client. If it does not open shortly please do so manually.
    9. Checking for a new game instance every second for two minutes or until one is found.
    10. Found a new game instance after 33 seconds.
    11. Exception in thread "3304 - Staking Salvation" java.lang.InternalError: instrument library is missing in target VM
    12.         at sun.tools.attach.HotSpotVirtualMachine.loadAgent(fh:13)
    13.         at nul.IiiIIIiIIIii.null(jjc:170)
    14.         at nul.IiIiIIiIiIiI.run(wbc:216)
    15. Caused by: com.sun.tools.attach.AgentLoadException: Failed to load agent library
    16.         at sun.tools.attach.WindowsVirtualMachine.execute(ck:145)
    17.         at sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(fh:43)
    18.         at sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(fh:204)
    19.         at sun.tools.attach.HotSpotVirtualMachine.loadAgent(fh:170)
    20.         ... 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?
    --- Double Post Merged, Apr 23, 2016, Original Post Date: Apr 23, 2016 ---
    I just removed some unneeded Java installations, and I am left with JRE 8.92 x86 and JDK 8.92 x64.
    --- Double Post Merged, Apr 23, 2016 ---
    It seems this also happens to bots I add through the store.
    --- Double Post Merged, Apr 23, 2016 ---
    Still present in 2.0.6
    --- Double Post Merged, Apr 24, 2016 ---
    Still happens in 2.0.7
  2. 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.
  3. 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.
  4. @Cloud perhaps we should be scanning all drives for the cache.
  5. Scanning the entirety of all the partitions would be way too intensive.
    --- Double Post Merged, Apr 24, 2016, Original Post Date: Apr 24, 2016 ---
    @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.
  6. In my case, that is the D drive.
  7. Any idea why it would do that? That's not where user.home points to is it?
  8. 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.
  9. 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.
  10. That sounds like it could definitely be a part of the problem... Hmm now how to approach that with java....
  11. File (Java Platform SE 8 )

    Code (Java):
    1.     public static void main(final String... args) {
    2.         final File[] drives = File.listRoots();
    3.         final String home = System.getProperty("user.home");
    5.         for (File drive : drives) {
    6.             String location = home.replaceFirst(".*?:\\\\", drive.toString() + "\\");
    7.             location += "\\jagexcache\\jagexlauncher";
    9.             final File directory = new File(location);
    10.             System.out.println(location + " does " + (directory.exists() ? "not exist" : "exist"));
    11.         }
    12.     }
    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
    #11 Salvation, Apr 24, 2016
    Last edited by a moderator: Apr 24, 2016
  12. Already exists. Edited your post to use it.
    --- Double Post Merged, Apr 24, 2016, Original Post Date: Apr 24, 2016 ---
    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.
    --- Double Post Merged, Apr 26, 2016 ---
    @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.
  13. We could use JNA for a windows specific solution
    --- Double Post Merged, Apr 26, 2016, Original Post Date: Apr 26, 2016 ---
    Kernel32.dll exports the function GetDriveType(lpRootPathName) which appears to do what we need, but as stated that would be a windows only solution.
  14. 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.
  15. @Arbiter just had the time to test symlinking it, and it indeed works :)
  16. 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"

Share This Page