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

Nvidia driver 378.49 breaks Processing sketches (Target VM failed to initialize) #4853

Closed
briankngo opened this Issue Jan 25, 2017 · 34 comments

Comments

Projects
None yet
@briankngo

briankngo commented Jan 25, 2017

  1. Processing version 3.2.3
  2. PC operating system and hardware
    Windows 10 64-bit
    Intel i7-4790k processor
    H97 GAMING 3 Motherboard
    NVIDIA GeForce GTX 970 graphics card
    16.0 GB ddr3
  3. Here's a copy of the smallest possible piece of code that will produce the error
    error details: [https://cdn.discordapp.com/attachments/271440764402139138/273695422998904842/error.JPG ]
    alt. “Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help ? Troubleshooting.”
  4. Processing used to work but now it just says, "Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help ? Troubleshooting." Processing just stopped working and I don't know how to fix it. An error started to pop up every time i try to run something. A reinstall did not fix the problem, I tried deleting preferences, and finding the solution in the forums.
@dwhit

This comment has been minimized.

Show comment
Hide comment
@dwhit

dwhit Jan 25, 2017

Yeah same bug for me. I've used processing on a mac before, just tried installing on my windows machine after updating nvidia driver this afternoon, and all I get is the same could not run sketch error, even on a blank sketch. Super relieving to know someone else has the same bug.

dwhit commented Jan 25, 2017

Yeah same bug for me. I've used processing on a mac before, just tried installing on my windows machine after updating nvidia driver this afternoon, and all I get is the same could not run sketch error, even on a blank sketch. Super relieving to know someone else has the same bug.

@aarondbaron

This comment has been minimized.

Show comment
Hide comment
@aarondbaron

aarondbaron Jan 25, 2017

This happened to me as well. same graphics card. i rolled back the driver and processing was back to normal and working.

aarondbaron commented Jan 25, 2017

This happened to me as well. same graphics card. i rolled back the driver and processing was back to normal and working.

@qckpea

This comment has been minimized.

Show comment
Hide comment
@qckpea

qckpea Jan 25, 2017

Same issue here, after totally wiping out NVIDIA drivers it works properly.

Win 10 64bit
GTX 970 8GB
i5 4590
H97 PC-MATE(MS-7850)

Processing 3.2.3 but this issue is present with earlier versions as well.

qckpea commented Jan 25, 2017

Same issue here, after totally wiping out NVIDIA drivers it works properly.

Win 10 64bit
GTX 970 8GB
i5 4590
H97 PC-MATE(MS-7850)

Processing 3.2.3 but this issue is present with earlier versions as well.

@esponapule

This comment has been minimized.

Show comment
Hide comment
@esponapule

esponapule Jan 26, 2017

Same here. Will not run and all the fonts are corrupt after Nvidia driver update. Both x86 and x64 versions of processing

Windows 10 x64
GTX 1050t
GeForce Driver 378.49 released 01/23/2017

Could not run the sketch (Target VM failed to initialize).
Make sure that you haven't set the maximum available memory too high.
For more information, read revisions.txt and Help ? Troubleshooting.

(https://cloud.githubusercontent.com/assets/3163504/22315489/9d0163e2-e32c-11e6-8da5-9408d256c54d.png)

esponapule commented Jan 26, 2017

Same here. Will not run and all the fonts are corrupt after Nvidia driver update. Both x86 and x64 versions of processing

Windows 10 x64
GTX 1050t
GeForce Driver 378.49 released 01/23/2017

Could not run the sketch (Target VM failed to initialize).
Make sure that you haven't set the maximum available memory too high.
For more information, read revisions.txt and Help ? Troubleshooting.

(https://cloud.githubusercontent.com/assets/3163504/22315489/9d0163e2-e32c-11e6-8da5-9408d256c54d.png)

@ricsinaruto

This comment has been minimized.

Show comment
Hide comment
@ricsinaruto

ricsinaruto Jan 26, 2017

Same issue here with gtx 970 card.
Processing stopped working after installing the 378.49 driver, had to downgrade to the previously released 376.33 driver

ricsinaruto commented Jan 26, 2017

Same issue here with gtx 970 card.
Processing stopped working after installing the 378.49 driver, had to downgrade to the previously released 376.33 driver

@Momel15

This comment has been minimized.

Show comment
Hide comment
@Momel15

Momel15 Jan 28, 2017

Same here.

Windows 8.1 x64
GTX 750ti
Driver 378.49

Installing previous driver version solves the problem

Momel15 commented Jan 28, 2017

Same here.

Windows 8.1 x64
GTX 750ti
Driver 378.49

Installing previous driver version solves the problem

@caicofer

This comment has been minimized.

Show comment
Hide comment
@caicofer

caicofer Jan 28, 2017

Yeah, the driver is definetely the problem. I was having the exact same issue and everything went back to normal after I donwgraded the driver.

caicofer commented Jan 28, 2017

Yeah, the driver is definetely the problem. I was having the exact same issue and everything went back to normal after I donwgraded the driver.

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Jan 28, 2017

Contributor

It's a bug in Nvidia driver. Lots of games running on Java (like Minecraft) have problems as well. For now, please use older driver until Nvidia releases fixed driver.

Contributor

JakubValtar commented Jan 28, 2017

It's a bug in Nvidia driver. Lots of games running on Java (like Minecraft) have problems as well. For now, please use older driver until Nvidia releases fixed driver.

@JakubValtar JakubValtar added the known label Jan 28, 2017

@JakubValtar JakubValtar changed the title from Processing cannot run after NVidia drivers update? to Nvidia driver 378.49 breaks Processing sketches (Target VM failed to initialize) Jan 28, 2017

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Jan 30, 2017

Member

Reddit thread from Minecraft fans with discussion about problem/solutions: https://www.reddit.com/r/Minecraft/comments/5q05wu/psa_latest_nvidia_gpu_driver_crashes_minecraft/

Member

benfry commented Jan 30, 2017

Reddit thread from Minecraft fans with discussion about problem/solutions: https://www.reddit.com/r/Minecraft/comments/5q05wu/psa_latest_nvidia_gpu_driver_crashes_minecraft/

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Jan 30, 2017

Member

Anyone know of a means to get the driver version (i.e. from command line, a file, etc)? This is gonna be a bumpy couple of days/weeks for anyone who gets stuck on this driver, so we may want to warn people from the PDE.

Member

benfry commented Jan 30, 2017

Anyone know of a means to get the driver version (i.e. from command line, a file, etc)? This is gonna be a bumpy couple of days/weeks for anyone who gets stuck on this driver, so we may want to warn people from the PDE.

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Jan 30, 2017

Contributor

@benfry This sketch works on my pc and my test PC with clean Win10 install, sorry I can't test more today.

You should also handle exceptions better

import java.util.Scanner;

try {
  Process p = Runtime.getRuntime().exec("powershell Get-WmiObject Win32_PnPSignedDriver| select devicename, driverversion | where {$_.devicename -like \\\"*nvidia*\\\"}");
  InputStream is = p.getInputStream();
  Scanner s = new Scanner(is).useDelimiter("\\A");
  String result = s.hasNext() ? s.next() : "";
  s.close();
  boolean hasBuggyDriver = result.contains("3.7849");
  println("buggy driver found:", hasBuggyDriver);
} catch (IOException e) {
  
}

PowerShell returns this, last five numbers give version: 3.6909 -> 369.09


devicename                                          driverversion
----------                                          -------------
NVIDIA Virtual Audio Device (Wave Extensible) (WDM) 1.2.31.0
NVIDIA GeForce GTX 760M                             21.21.13.6909


Contributor

JakubValtar commented Jan 30, 2017

@benfry This sketch works on my pc and my test PC with clean Win10 install, sorry I can't test more today.

You should also handle exceptions better

import java.util.Scanner;

try {
  Process p = Runtime.getRuntime().exec("powershell Get-WmiObject Win32_PnPSignedDriver| select devicename, driverversion | where {$_.devicename -like \\\"*nvidia*\\\"}");
  InputStream is = p.getInputStream();
  Scanner s = new Scanner(is).useDelimiter("\\A");
  String result = s.hasNext() ? s.next() : "";
  s.close();
  boolean hasBuggyDriver = result.contains("3.7849");
  println("buggy driver found:", hasBuggyDriver);
} catch (IOException e) {
  
}

PowerShell returns this, last five numbers give version: 3.6909 -> 369.09


devicename                                          driverversion
----------                                          -------------
NVIDIA Virtual Audio Device (Wave Extensible) (WDM) 1.2.31.0
NVIDIA GeForce GTX 760M                             21.21.13.6909


@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Jan 30, 2017

Member

That's what I'm looking for; thanks.

Member

benfry commented Jan 30, 2017

That's what I'm looking for; thanks.

@algotrash

This comment has been minimized.

Show comment
Hide comment
@algotrash

algotrash Feb 2, 2017

Removing 3D vision drivers worked well for me, thank you benfry for the link.

algotrash commented Feb 2, 2017

Removing 3D vision drivers worked well for me, thank you benfry for the link.

@LoubiTek

This comment has been minimized.

Show comment
Hide comment
@LoubiTek

LoubiTek Feb 11, 2017

I just installed the new version of processing 3.2.4 and my version of NVIDIA and 378.49.
I am also on Windows 10 and also a GTX 970 graphics card.
I have the same message: Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help ? Troubleshooting.
I wanted to reinstall the old driver (which takes enough time to download) and then I read below the trick to fix without altering the driver version.
Thanks for the link @benfry ! I have renamed the two dll like this: _fixProcessing3. ;)
Hoping that the new version of the NVIDIA driver will solve this problem in the future.

LoubiTek commented Feb 11, 2017

I just installed the new version of processing 3.2.4 and my version of NVIDIA and 378.49.
I am also on Windows 10 and also a GTX 970 graphics card.
I have the same message: Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help ? Troubleshooting.
I wanted to reinstall the old driver (which takes enough time to download) and then I read below the trick to fix without altering the driver version.
Thanks for the link @benfry ! I have renamed the two dll like this: _fixProcessing3. ;)
Hoping that the new version of the NVIDIA driver will solve this problem in the future.

@benfry

This comment has been minimized.

Show comment
Hide comment
Member

benfry commented Feb 11, 2017

Updated driver from NVIDIA: http://nvidia.custhelp.com/app/answers/detail/a_id/4378

benfry added a commit that referenced this issue Feb 11, 2017

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Feb 11, 2017

Member

Added Jakub's code to check for the driver to the next release.

Member

benfry commented Feb 11, 2017

Added Jakub's code to check for the driver to the next release.

@LoubiTek

This comment has been minimized.

Show comment
Hide comment
@LoubiTek

LoubiTek commented Feb 11, 2017

Perfect !

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Feb 13, 2017

Member

I don't have a copy of this driver version—can someone verify that with Processing 3.3 they see the dialog box warning them about the problem when using the 369.09 driver?

Member

benfry commented Feb 13, 2017

I don't have a copy of this driver version—can someone verify that with Processing 3.3 they see the dialog box warning them about the problem when using the 369.09 driver?

@leadedge

This comment has been minimized.

Show comment
Hide comment
@leadedge

leadedge Feb 15, 2017

With Processing Version 3.3, the warning dialog box did not show up for me, just the console message including "Target VM failed to initialize". Empty sketch, Windows 7 64bit NVIDIA driver 378.49.

The sketch worked OK after re-naming the two dll files nvSCPAPI64.dll and nvSCPAPI.dll. Confirmed by re-naming them back.

Installation of the Driver version 378.57 hotfix fixed the problem.

leadedge commented Feb 15, 2017

With Processing Version 3.3, the warning dialog box did not show up for me, just the console message including "Target VM failed to initialize". Empty sketch, Windows 7 64bit NVIDIA driver 378.49.

The sketch worked OK after re-naming the two dll files nvSCPAPI64.dll and nvSCPAPI.dll. Confirmed by re-naming them back.

Installation of the Driver version 378.57 hotfix fixed the problem.

@lisajamhoury

This comment has been minimized.

Show comment
Hide comment
@lisajamhoury

lisajamhoury Feb 23, 2017

Installation of the Driver version 378.57 hotfix fixed the problem for me as well. Thanks!

lisajamhoury commented Feb 23, 2017

Installation of the Driver version 378.57 hotfix fixed the problem for me as well. Thanks!

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Feb 23, 2017

Member

Hm, now to debug why the warning dialog isn't coming up…

Member

benfry commented Feb 23, 2017

Hm, now to debug why the warning dialog isn't coming up…

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Feb 24, 2017

Contributor

@benfry I can install the faulty driver and debug it when I'm back next week.

Contributor

JakubValtar commented Feb 24, 2017

@benfry I can install the faulty driver and debug it when I'm back next week.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Feb 24, 2017

Member

@JakubValtar that'd be great, thanks

Member

benfry commented Feb 24, 2017

@JakubValtar that'd be great, thanks

@leadedge

This comment has been minimized.

Show comment
Hide comment
@leadedge

leadedge Feb 27, 2017

This could be resolved by NVIDIA driver 378.66. Works for me with a quick test.

leadedge commented Feb 27, 2017

This could be resolved by NVIDIA driver 378.66. Works for me with a quick test.

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Feb 27, 2017

Contributor

@benfry works for me: image

The problem could be that some manufacturers may not include NVIDIA in the device name.

Contributor

JakubValtar commented Feb 27, 2017

@benfry works for me: image

The problem could be that some manufacturers may not include NVIDIA in the device name.

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Feb 27, 2017

Contributor

@leadedge could you please copy paste this code into Processing editor, run it and post here what the console shows? It should list your graphics cards with their driver versions.

import java.util.Scanner;

try {
  Process p = Runtime.getRuntime().exec("powershell Get-WmiObject Win32_PnPSignedDriver| select devicename, driverversion | where {$_.devicename -like \\\"*nvidia*\\\"}");
  InputStream is = p.getInputStream();
  Scanner s = new Scanner(is).useDelimiter("\\A");
  String result = s.hasNext() ? s.next() : "";
  s.close();
  boolean hasBuggyDriver = result.contains("3.7849");
  println("buggy driver found:", hasBuggyDriver);
  println(result);
} catch (IOException e) {
  e.printStackTrace();
}
Contributor

JakubValtar commented Feb 27, 2017

@leadedge could you please copy paste this code into Processing editor, run it and post here what the console shows? It should list your graphics cards with their driver versions.

import java.util.Scanner;

try {
  Process p = Runtime.getRuntime().exec("powershell Get-WmiObject Win32_PnPSignedDriver| select devicename, driverversion | where {$_.devicename -like \\\"*nvidia*\\\"}");
  InputStream is = p.getInputStream();
  Scanner s = new Scanner(is).useDelimiter("\\A");
  String result = s.hasNext() ? s.next() : "";
  s.close();
  boolean hasBuggyDriver = result.contains("3.7849");
  println("buggy driver found:", hasBuggyDriver);
  println(result);
} catch (IOException e) {
  e.printStackTrace();
}
@leadedge

This comment has been minimized.

Show comment
Hide comment
@leadedge

leadedge Feb 28, 2017

The sketch stops at - Scanner s = new Scanner(is).useDelimiter("\A");

If I change it to - Scanner s = new Scanner(is); - I can print 21 lines -

devicename
driverversion
(two lines of dashes removed due to style problems)
NVIDIA
Virtual
Audio
Device
(Wave
Ex...
3.40.1.0
NVIDIA
High
Definition
Audio
1.3.34.21
NVIDIA
GeForce
GT
640
21.21.13.7866

leadedge commented Feb 28, 2017

The sketch stops at - Scanner s = new Scanner(is).useDelimiter("\A");

If I change it to - Scanner s = new Scanner(is); - I can print 21 lines -

devicename
driverversion
(two lines of dashes removed due to style problems)
NVIDIA
Virtual
Audio
Device
(Wave
Ex...
3.40.1.0
NVIDIA
High
Definition
Audio
1.3.34.21
NVIDIA
GeForce
GT
640
21.21.13.7866

@leadedge

This comment has been minimized.

Show comment
Hide comment
@leadedge

leadedge Mar 2, 2017

I realise that the post above might not be all that useful. From this, it seems to me that the code in the processing core might not be working in my environment. I don't know why but, similar to above, the sketch stops with -

String[] lines = loadStrings(createReader(p.getInputStream()));

Here is what I have been able to get to work - clearly the driver number would be changed to 3.7849.

try {  
  Process p = Runtime.getRuntime().exec("powershell Get-WmiObject Win32_PnPSignedDriver| select devicename, driverversion | where {$_.devicename -like \\\"*nvidia*\\\"}");
  BufferedReader reader = createReader(p.getInputStream());
  String line;
  do { 
    line = reader.readLine();
    println(line);
    if (line.contains("3.786")) {
      println("driver found:");
    }    
  } while(!line.equals(null));
  println("done");
} catch (Exception e) {
   println("Problem checking NVIDIA driver", e);
}

leadedge commented Mar 2, 2017

I realise that the post above might not be all that useful. From this, it seems to me that the code in the processing core might not be working in my environment. I don't know why but, similar to above, the sketch stops with -

String[] lines = loadStrings(createReader(p.getInputStream()));

Here is what I have been able to get to work - clearly the driver number would be changed to 3.7849.

try {  
  Process p = Runtime.getRuntime().exec("powershell Get-WmiObject Win32_PnPSignedDriver| select devicename, driverversion | where {$_.devicename -like \\\"*nvidia*\\\"}");
  BufferedReader reader = createReader(p.getInputStream());
  String line;
  do { 
    line = reader.readLine();
    println(line);
    if (line.contains("3.786")) {
      println("driver found:");
    }    
  } while(!line.equals(null));
  println("done");
} catch (Exception e) {
   println("Problem checking NVIDIA driver", e);
}
@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Apr 22, 2017

Member

I've just checked in a new version of the code that works more like this—can you try it? It's not functionally any different from using loadStrings() but maybe I'm missing something.

Member

benfry commented Apr 22, 2017

I've just checked in a new version of the code that works more like this—can you try it? It's not functionally any different from using loadStrings() but maybe I'm missing something.

@leadedge

This comment has been minimized.

Show comment
Hide comment
@leadedge

leadedge Apr 23, 2017

I don't know what the problem is with loadStrings, but I checked again and it stops the sketch.

I think the current code is OK on my system. Here is what works ( I still have not updated the driver) -

import java.util.Scanner;
import java.util.regex.Pattern;

 try { 
  Process p = Runtime.getRuntime().exec("powershell Get-WmiObject Win32_PnPSignedDriver| select devicename, driverversion | where {$_.devicename -like \\\"*nvidia*\\\"}");
  BufferedReader reader = createReader(p.getInputStream());
  String line = null;
  while ((line = reader.readLine()) != null) {
    println(line);
    if (line.contains("3.7849")) {
      println("buggy driver found 1");
    } 
    else if (line.contains("3.8165")) {
      println("buggy driver found 2");
    }
    else if (line.contains("3.7866")) {
      println("My driver found OK");
    }
  }
} catch (Exception e) {
   println("Problem checking NVIDIA driver", e);
}

leadedge commented Apr 23, 2017

I don't know what the problem is with loadStrings, but I checked again and it stops the sketch.

I think the current code is OK on my system. Here is what works ( I still have not updated the driver) -

import java.util.Scanner;
import java.util.regex.Pattern;

 try { 
  Process p = Runtime.getRuntime().exec("powershell Get-WmiObject Win32_PnPSignedDriver| select devicename, driverversion | where {$_.devicename -like \\\"*nvidia*\\\"}");
  BufferedReader reader = createReader(p.getInputStream());
  String line = null;
  while ((line = reader.readLine()) != null) {
    println(line);
    if (line.contains("3.7849")) {
      println("buggy driver found 1");
    } 
    else if (line.contains("3.8165")) {
      println("buggy driver found 2");
    }
    else if (line.contains("3.7866")) {
      println("My driver found OK");
    }
  }
} catch (Exception e) {
   println("Problem checking NVIDIA driver", e);
}
@leadedge

This comment has been minimized.

Show comment
Hide comment
@leadedge

leadedge Apr 23, 2017

To check the latest problem, I installed 381.65 and it works OK on Windows 7. Must be specific to Windows 10 and maybe only laptops, because the hotfix is only for Windows 10 laptops. But I haven't tried Windows 8.

leadedge commented Apr 23, 2017

To check the latest problem, I installed 381.65 and it works OK on Windows 7. Must be specific to Windows 10 and maybe only laptops, because the hotfix is only for Windows 10 laptops. But I haven't tried Windows 8.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Apr 23, 2017

Member

Ok, I've tweaked the check to only run on Windows 10. I think this is all we can do from our end.

If someone has a bad driver on Windows 10 and the error message doesn't pop up, please let us know.

Member

benfry commented Apr 23, 2017

Ok, I've tweaked the check to only run on Windows 10. I think this is all we can do from our end.

If someone has a bad driver on Windows 10 and the error message doesn't pop up, please let us know.

@benfry benfry closed this Apr 23, 2017

@charlesdedijon

This comment has been minimized.

Show comment
Hide comment
@charlesdedijon

charlesdedijon Jun 17, 2017

Hello,
i try to update the driver but my card is NVIDIA GeForce 6600 GT (Windows 7 64bit with processing 3.3) so i can't use the new driver 378.57...
The message "Could not run the sketch (Target VM failed to initialize)" arrive after 66minute of start programm. I don't understand.

Please, help me.

charlesdedijon commented Jun 17, 2017

Hello,
i try to update the driver but my card is NVIDIA GeForce 6600 GT (Windows 7 64bit with processing 3.3) so i can't use the new driver 378.57...
The message "Could not run the sketch (Target VM failed to initialize)" arrive after 66minute of start programm. I don't understand.

Please, help me.

@charlesdedijon

This comment has been minimized.

Show comment
Hide comment
@charlesdedijon

charlesdedijon Jun 18, 2017

NVIDIA GeForce 6600 GT 9.18.13.783
Contr?leur de r?seau NVIDIA nForce 1.0.1.211
Gestion de syst?me NVIDIA nForce PCI 6.1.7601.17514
Pont HyperTransport NVIDIA nForce4 6.1.7601.17514

charlesdedijon commented Jun 18, 2017

NVIDIA GeForce 6600 GT 9.18.13.783
Contr?leur de r?seau NVIDIA nForce 1.0.1.211
Gestion de syst?me NVIDIA nForce PCI 6.1.7601.17514
Pont HyperTransport NVIDIA nForce4 6.1.7601.17514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment