Page 1 of 1

ERROR vtkPNGReader

Posted: Thu Dec 05, 2013 2:43 am
by lauraaapeeters
Hello,

I just installed OpenSim 3.1 on my computer, on the C disk. When I want to load some model, I'll get the following error in the vtkOutputWindow:
ERROR: In \eran\dev\Vtk\lo\vtkPNGReader.cxx, line 43
vtkPNGReader (0BF5ED88): unable to open file \\fs01\igd$\users\name.. etc.

I hope someone could explain to me what kind of error this is or how I can solve this problem?
I have to mention that the computer is secured by the organization, so only the administrator can install the software on my computer (in the C or D disk) which I can use. Maybe there is a problem?!

Thank you very much!

Regards Laura

Re: ERROR vtkPNGReader

Posted: Fri Dec 06, 2013 9:53 am
by aymanh
Hi Laura,

OpenSim (version 3.0 and later) uses an environment variable OPENSIM_HOME to locate various resources it needs, including geometry and image files. The likely scenario is that the environment variable set by the installer is not accessible to you because of security/permissions. You can get around that by setting the environment variable for your account to point to the toplevel directory where OpenSim is installed.

If you need help doing this, or if you set it and continue to have problems please let us know and we'll help you troubleshoot further.

Best regards,
-Ayman

Re: ERROR vtkPNGReader

Posted: Mon Jun 12, 2017 7:05 am
by ccarignan
I'm having the exact same problem. I am trying to run the ToyLandingSim model from the tutorial, and that error pops up and I can't see the plate. I have no clue where the environment variable OPENSIM_HOME is set so don't even know how to check it. Also, I just did the standard OpenSim 3.3 installation and did not change any of the directory structure so the Model directory is where it should be. Why would this happen? Thanks, Craig

Re: ERROR vtkPNGReader

Posted: Mon Jun 12, 2017 12:43 pm
by tkuchida
I have no clue where the environment variable OPENSIM_HOME is set so don't even know how to check it.
Instructions may vary depending on what version of Windows you are running. You should be able to find instructions by Googling "Windows <version> environment variable". On Windows 7, I have a variable named "OPENSIM_HOME" under "User variables" whose value is "C:\OpenSim 3.3".
Why would this happen?
Possible reasons include running the installer without Admin privileges (in which case the installer can't set environment variables) and selecting "Do not add OpenSim to the system PATH" in Step 5 of the installation instructions (http://simtk-confluence.stanford.edu:80 ... ng+OpenSim).

Re: ERROR vtkPNGReader

Posted: Mon Jun 12, 2017 2:59 pm
by ccarignan
Hi Tom,

Thanks very much for you quick and helpful response. I am also using Windows 7, and the problem was related to OPENSIM_HOME which was set to C:\OpenSim 3.3. My OpenSim 3.3 installer was in the root directory, but the OpenSim 3.3 app was under C:\Program Files (that was probably the location I chose). I was able to access OPENSIM_HOME by right clicking on any file under OpenSim 3.3/bin and selecting "Properties". I changed OPENSIM_HOME to C:\Program Files\OpenSim 3.3, and it was then able to load the image files. Perhaps there should be a note about that in the instructions about needing to change that path in case others have similar problems.

Thanks!
Craig

Re: ERROR vtkPNGReader

Posted: Sun Jun 18, 2017 9:50 am
by ccarignan
To clarify, the path change for OPENSIM_HOME is done in the registry:
- in the Windows startup menu, type "regedit" (Registry Editor)
- search for OPENSIM_HOME (for me, it was under HKEY_CURRENT_USER/Environment)
- edit the string to change the path from C:\OpenSim 3.3 to wherever the app is located
If you installed the app in your root directory, then you don't need to make any changes.

Re: ERROR vtkPNGReader

Posted: Sun Jun 18, 2017 6:58 pm
by tkuchida
Thank you for posting the solution. I think editing the registry directly is generally discouraged. On Windows 7, the environment variables can be modified by right-clicking Computer from the Start menu, selecting the Properties item, clicking Advanced system settings, and clicking the Environment Variables… button on the Advanced tab. A Google search should reveal how to access environment variables on other versions of Windows without directly editing the registry.