1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resolved instrument library is missing in target VM

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

  1. Salvation

    Salvation First Bot Author

    Joined:
    Aug 7, 2013
    Messages:
    262
    Likes Received:
    68
    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):
    1.  
    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. Best Answer:
    Post #19 by Cloud, Aug 14, 2018
  3. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,938
    Likes Received:
    1,266
    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.
     
  4. Salvation

    Salvation First Bot Author

    Joined:
    Aug 7, 2013
    Messages:
    262
    Likes Received:
    68
    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.
     
  5. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,938
    Likes Received:
    1,266
    @Cloud perhaps we should be scanning all drives for the cache.
     
  6. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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.
     
  7. Salvation

    Salvation First Bot Author

    Joined:
    Aug 7, 2013
    Messages:
    262
    Likes Received:
    68
    In my case, that is the D drive.
     
  8. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    Any idea why it would do that? That's not where user.home points to is it?
     
  9. Salvation

    Salvation First Bot Author

    Joined:
    Aug 7, 2013
    Messages:
    262
    Likes Received:
    68
    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.
     
  10. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,938
    Likes Received:
    1,266
    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.
     
  11. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    That sounds like it could definitely be a part of the problem... Hmm now how to approach that with java....
     
  12. Salvation

    Salvation First Bot Author

    Joined:
    Aug 7, 2013
    Messages:
    262
    Likes Received:
    68
    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");
    4.  
    5.         for (File drive : drives) {
    6.             String location = home.replaceFirst(".*?:\\\\", drive.toString() + "\\");
    7.             location += "\\jagexcache\\jagexlauncher";
    8.  
    9.             final File directory = new File(location);
    10.             System.out.println(location + " does " + (directory.exists() ? "not exist" : "exist"));
    11.         }
    12.     }
    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
     
    #11 Salvation, Apr 24, 2016
    Last edited by a moderator: Apr 24, 2016
  13. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,938
    Likes Received:
    1,266
    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.
     
  14. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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.
     
  15. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,938
    Likes Received:
    1,266
    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.
     
  16. Salvation

    Salvation First Bot Author

    Joined:
    Aug 7, 2013
    Messages:
    262
    Likes Received:
    68
    @Arbiter just had the time to test symlinking it, and it indeed works :)
    [​IMG]
     
  17. stankysox

    Joined:
    Jul 25, 2015
    Messages:
    17
    Likes Received:
    3
    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"
     
  18. SniffingPowder

    Joined:
    Nov 22, 2017
    Messages:
    1
    Likes Received:
    0
    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""
     
  19. joe12

    Joined:
    Aug 7, 2018
    Messages:
    2
    Likes Received:
    0
    how do I symlink?
     
  20. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    This issue should now be resolved.
     

Share This Page

Loading...