ll7 / robot_sf_ll7

robot_sf in the ll7 namespace.
GNU General Public License v3.0
0 stars 1 forks source link

Resizing of the Pygame window crashes #22

Open ll7 opened 3 months ago

ll7 commented 3 months ago
Exception has occurred: error
Invalid texture
  File "/home/luttkule/git/robot_sf_ll7/robot_sf/render/sim_view.py", line 246, in render
    pygame.display.update()
  File "/home/luttkule/git/robot_sf_ll7/robot_sf/gym_env/robot_env.py", line 206, in render
    self.sim_ui.render(state)
  File "/home/luttkule/git/robot_sf_ll7/examples/simulate_with_svg_map.py", line 50, in test_simulation
    env.render()
  File "/home/luttkule/git/robot_sf_ll7/examples/simulate_with_svg_map.py", line 69, in main
    test_simulation(map_definition)
  File "/home/luttkule/git/robot_sf_ll7/examples/simulate_with_svg_map.py", line 74, in <module>
    main()
pygame.error: Invalid texture
ll7 commented 1 month ago

The following is the latest indication when the resizing crashes the application:

/workspaces/robot_sf_ll7# python examples/demo_offensive.py 
2024-05-31 13:45:05.614 | INFO     | robot_sf.render.sim_view:__post_init__:86 - Initializing the simulation view.
/opt/venv/lib/python3.10/site-packages/torch/cuda/__init__.py:141: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 804: forward compatibility was attempted on non supported HW (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:108.)
  return torch._C._cuda_getDeviceCount() > 0
/opt/venv/lib/python3.10/site-packages/stable_baselines3/common/vec_env/patch_gym.py:95: UserWarning: You loaded a model that was trained using OpenAI Gym. We strongly recommend transitioning to Gymnasium by saving that model again.
  warnings.warn(
/opt/venv/lib/python3.10/site-packages/stable_baselines3/common/base_class.py:748: UserWarning: You are probably loading a model saved with SB3 < 1.7.0, we deactivated exact_match so you can save the model again to avoid issues in the future (see https://github.com/DLR-RM/stable-baselines3/issues/1233 for more info). Original error: Error(s) in loading state_dict for MultiInputActorCriticPolicy:
        Missing key(s) in state_dict: "pi_features_extractor.ray_extractor.0.weight", "pi_features_extractor.ray_extractor.0.bias", "pi_features_extractor.ray_extractor.3.weight", "pi_features_extractor.ray_extractor.3.bias", "pi_features_extractor.ray_extractor.6.weight", "pi_features_extractor.ray_extractor.6.bias", "pi_features_extractor.ray_extractor.9.weight", "pi_features_extractor.ray_extractor.9.bias", "vf_features_extractor.ray_extractor.0.weight", "vf_features_extractor.ray_extractor.0.bias", "vf_features_extractor.ray_extractor.3.weight", "vf_features_extractor.ray_extractor.3.bias", "vf_features_extractor.ray_extractor.6.weight", "vf_features_extractor.ray_extractor.6.bias", "vf_features_extractor.ray_extractor.9.weight", "vf_features_extractor.ray_extractor.9.bias".  
Note: the model should still work fine, this only a warning.
  warnings.warn(
2024-05-31 13:45:42.894 | DEBUG    | robot_sf.render.sim_view:_resize_window:259 - Resizing the window.
2024-05-31 13:49:07.073 | DEBUG    | robot_sf.render.sim_view:_resize_window:259 - Resizing the window.
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  130 (MIT-SHM)
  Minor opcode of failed request:  3 (X_ShmPutImage)
  Value in failed request:  0xecc
  Serial number of failed request:  208504
  Current serial number in output stream:  208505