Skip to content

Troubleshooting

Angel Chang edited this page Sep 23, 2024 · 8 revisions

Web-based STK applications

Chrome

Annotator/viewer is very slow or doesn't work

The STK uses WebGL and your GPU. You need to make sure that your browser (chrome) is using it!

  1. Checking the status of GPU acceleration in chrome by going to the address chrome://gpu in chrome -- all the GPU feature fields should say "hardware accelerated".
  2. If some fields above state "software only" or "disabled", following this troubleshooting guide to enable GPU acceleration: https://superuser.com/questions/836832/how-can-i-enable-webgl-in-my-browser Example: go to chrome://flags and set "Override software rendering list" to enabled,

Other errors - something is going wrong with the web based annotator/viewer, but I don't know what!

To debug what is going wrong in Chrome, you should use the developer tools:

  1. Click on the 3 dots on the upper right end of the chrome tool bar and select "More Tools" -> "Developer Tools" (see https://developer.chrome.com/devtools) Panel should open on the bottom of your chrome window.
  2. Click on the 'Console' tab on the dev tools panel. (see https://developers.google.com/web/tools/chrome-devtools/console)
  3. Please right click on the panel and click "Save as..." to save a log (see bottom of above link) that you can send to the STK team.

Building sstk

Issue with building - missing angle

If a node-gyp gl build issue is encountered due to missing angle submodule, this is due to a npm bug (https://github.com/npm/cli/issues/2774).

To resolve this, downgrade to an older npm through npm install -g npm@'^6.4.11' prior to running build.

Issue with building - error finding system files (X11.h, libEGL.lib)

If you have an issue with building and it is due to issues finding system files you know you have, make sure that you are not trying to build with a non-standard environment (e.g. conda or VSCode terminal), which may affect the header/library path used during node-gyp compilation.

Issue with npm install in ssc directory (when compiling libANGLE)

When trying to do npm install in the ssc directory, you encounter the following message:

../angle/src/libANGLE/renderer/gl/glx/FunctionsGLX.cpp:15:20: fatal error: GL/glx.h: No such file or directory
 #include <GL/glx.h>

or

lerna ERR! npm ERR! code ELIFECYCLE
lerna ERR! npm ERR! errno 1
lerna ERR! npm ERR! gl@4.0.4 install: `prebuild-install || node-gyp rebuild`
lerna ERR! npm ERR! Exit status 1
lerna ERR! npm ERR! 
lerna ERR! npm ERR! Failed at the gl@4.0.4 install script.

This means that you are missing the opengl headers.
To install them on Ubuntu:

sudo apt-get install build-essential libxi-dev libglu1-mesa-dev libglew-dev

Issue with missing ../build/Release/sharp.node when running ssc script

The ssc uses the sharp image processing library. It needs to compile itself and create a node_modules/sharp/build/Release/sharp.node. Sometimes, for some reason, it fails to do.

Before you build sharp.node you should make sure you have node-gyp installed

npm install -g node-gyp

To build sharp.node (from the scene-toolkit directory)

cd ssc/node_models/sharp
node-gyp rebuild

If you have trouble building sharp due to missing libvips (a fast image processing library), you can install libvips as follows on Ubuntu (see sharp installation for more details):

sudo apt-get install libvips

Running command-line STK scripts

Headless rendering

Please see Headless rendering

Got out of memory

If your node program crashes with message JavaScript heap out of memory, you can give your node js process more memory by running it with the --max-oldspace-size option:

node --max-old-space-size=2048

By default v8 has a memory limit of 512mb on 32-bit systems, and 1gb on 64-bit systems.

Problem with using Node v20.x.x

We have not yet tried running with the most recent version of Node. Please let us know what issues you experience!

Clone this wiki locally