imagry / Gym-Torcs-DQN

Torcs-DQN implementaion
http://www.imagry.co/?p=49609
Other
13 stars 5 forks source link

Segmentation Fault on initBackground() #2

Open cppntn opened 6 years ago

cppntn commented 6 years ago

Hello,

I appreciated a lot the work you have done to treat color vision in vtorcs-rl-color. I followed the entire installation process and the compilation worked fine (after I manually added .png images for the tracks that were not present in data/tracks folder and data/data/img). Then the game regularly starts but whenever I try to start the race, be it 'practice' or 'new race', an error occurs as following (issuing the command sudo torcs -d):

############################################################# GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/local/lib/torcs/torcs-bin...done. (gdb) Starting program: /usr/local/lib/torcs/torcs-bin -l /home/antonio/.torcs -L /usr/local/lib/torcs -D /usr/local/share/games/torcs

Visual Properties Report

z-buffer depth: 24 (good) multisampling : available alpha bits : available [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault. initBackground () at grscene.cpp:597 warning: Source file is more recent than executable. 597 envst->enable(GL_BLEND); (gdb) #0 initBackground () at grscene.cpp:597

1 0x00007fffef3300da in grLoadScene (track=0x1278f60) at grscene.cpp:231

2 0x00007fffef31d687 in initTrack (track=) at grmain.cpp:451

3 0x00007ffff6f6d2f4 in ReRaceEventInit () at racemain.cpp:120

4 0x00007ffff6f6efea in ReStateManage () at racestate.cpp:96

5 0x00007ffff75a9960 in gfuiKeyboard (key=13 '\r') at gui.cpp:265

6 0x00007ffff692ed1f in glutMainLoopEvent () from /usr/lib/x86_64-linux-gnu/libglut.so.3

7 0x00007ffff692f145 in glutMainLoop () from /usr/lib/x86_64-linux-gnu/libglut.so.3

8 0x0000000000401627 in main (argc=7, argv=0x7fffffffe498) at main.cpp:180

(gdb) quit A debugging session is active.

Inferior 1 [process 15954] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal] ##########################################################

Just 2 questions: 1) Is there any way to overcome this segmentation fault? 2) What changes have you done to the original code ?

s271 commented 6 years ago

It is an OpenGL error, never observed it in my torcs. You can try one of the following:

  1. update your display driver
  2. update mesa
  3. go to sudo torcs (like in the "2.3 Initialize race" of readme) and set different OpenGL mode and/or z-buffer format. Also you should "copying all the .png files from the original repository of gym_torcs to the correct folders in the Gym-Torcs-DQN repository, before starting the installation procedure. This because in .gitignore of Gym-Torcs-DQN all the .png files are excluded from git"

Also you can check original vtorcs forums, may be they encounter this error