ftCommunity / ftcommunity-TXT

Fischertechnik ROBOTICS TXT firmware, community edition
http://cfw.ftcommunity.de/
GNU General Public License v3.0
46 stars 31 forks source link

robopro programs do not run simtimes in the FT GUI #289

Open hypnotoad opened 11 months ago

hypnotoad commented 11 months ago

it is reported that some rpp programs do not run in offline mode (online is working): https://forum.ftcommunity.de/viewtopic.php?f=33&t=8086&p=62953#p62953.

hypnotoad commented 11 months ago

Working: test2.rpp.zip

uffi63 commented 11 months ago

The RoboPro program FTS.rpp below is only working before FT GUI is left. After FT GUI was left and restarted or after a new boot of the CFW and start of FT GUI the program cannot be executed anymore correctly (corrected version July 24th):

FTS.zip

In case another RoboPro Program is selected, loaded and executed (after new start of FT GUI) this works perfectly and afterwords also FTS.rpp is executed properly again.

hypnotoad commented 11 months ago

I guess this will be a difficult problem. I could reproduce the problem with the following commands:

ssh txt
su -
pgrep xinit | xargs kill
chroot /rom/ /bin/su - ROBOPro -c "strace -f -e open ./TxtControlMain /dev/ttyO2 65000"

To stop the TxtControlMain, one can use another terminal (and then use the last above command to start it again):

su -
pgrep -u ROBOPro | xargs kill -9

When the file is loaded from flash, there is a segmentation fault.

The strace log indicates it is sent to a thread which does something with the sound system (1539 in nok.txt and 1573 in ok.txt. Permissions of /dev/video0 and the /dev/snd files seem all ok.

However, I learned to be carful to focus on particular threads. Another idea is that it crashes in the video thread between "status A" and "status B".

hypnotoad commented 11 months ago

test2.rpp (which did not crash) does not mention video initialization: test2.txt

hypnotoad commented 11 months ago

I would continue to test which robopro component causes the behaviour. When I add a camera to test2.rpp, it still works test3.rpp.zip. I don't see anything special in the log files: test3.txt