cyberbotics / webots

Webots Robot Simulator
https://cyberbotics.com
Apache License 2.0
3.27k stars 1.7k forks source link

webots frozen if running slowly and enter url #3352

Closed Thomas-Feldmeier closed 2 years ago

Thomas-Feldmeier commented 3 years ago

webots should run slow. start the world below (it must run), right click on robot "show robot window", "override controller" and "enable all" to turn on the RangeFinder with an very high resolution of 10000x1000. simulation speed drops on my computer now to below 0.3x. (if your computer does not show that error below, maybe your computer is much faster so try to increase "height 1000". don't use very big numbers or your computer gets very slow.)

now select shape > appearance > texture ImageTexture > url > "", click on "select". webots window will not get darker and does not respond on imput, but simulation is still running. the computer gets slow too, not only webots. if webots was started from an terminal by typing "webots", and you edited something in the world, and you click ctrl+c in that terminal, webots will receive a signal to stop and now two things happen: the window to choose a file (from url select) will appear, and an alert box from webots asking you if you want to save the changes of the world. (under linux, type "pkill webots" to kill the non responding webots)

decreasing rangefinder resolution or increasing worldinfo timestep helps to fix this bug. i think the error happens if the simulation needs all the (cpu? graphics?) resources then the window to enter an url file name never pops ups. webots does not freeze if the simulation is stopped and then url is edited. webots freezes in worlds like sample world ure (no rangefinder, but very big meshes).

same error happens for other windows too: e.g. appearance > material Material > diffuseColor > click on color box and there should be an window to select the color, but webots freezes. same error happens if self-made RobotWindow *.html a file or color input field is clicked

my_robot_window.html:

...
    <label for="avatar">Choose a profile picture:</label>
    <input type="file"
       id="avatar" name="avatar">
    <label for="head">Choose a color:</label>
    <input type="color" id="head" name="head">
...

world file:

#VRML_SIM R2021b utf8
WorldInfo {
}
Viewpoint {
}
Shape {
  appearance Appearance {
    texture ImageTexture {
      url [
        ""
      ]
    }
  }
}
Robot {
  children [
    RangeFinder {
      width 10000
      height 1000
    }
  ]
}

ubuntu 20.04 webots --sysinfo System: Linux 5.8.0-59-generic x86_64 Processor: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz Number of cores: 4 OpenGL vendor: NVIDIA Corporation OpenGL renderer: GeForce GTX 1050/PCIe/SSE2 OpenGL version: 4.6.0 NVIDIA 450.119.03 webots --version Webots version: R2021b Nightly Build 5/7/2021 78b7a331a73351101fe880671d98e2e7708dd708

BenjaminDeleze commented 2 years ago

I'm closing this for now, feel free to reopen it if you have additional issues.