Autotest.py exception on current "master"

I had no problems with testing on my system, but since some days it’s no more possible.
After facing an exception on starting autotest on my code I tried to go back for finding the root cause.

Now I’m running on current master (08b8a43ab583301b0f1de358d8a0273caf97e24b/14.June)
Linux Mint 20.4 (Ubuntu 20.04)
(Btw: Also sim_vehicle.py is not running, because it’s not connecting. Maybe a component is not running correctly.)

That’s the output of “./Tools/autotest/autotest.py test.Plane.MainFlight”: autotest_error.txt (4.7 KB)

Could an experienced developer have a look at it, please.
I have no idea where to dig deeper for finding the cause of that problem.

Is it caused by the updates of python?

hello,

if sim_vehicle.py doesn’t work then you probably got an compilation issue.
Try to clean up you repo with waf clean or waf distclean .
Then watch for error on the xterm when using sim_vehicle.py

Hello Pierre,
cleaning and building with no error, but still not running:
sim_vehicle_error.txt (57.5 KB)

Ok so that is mavproxy log. What is needed it what happen in the other window that should open when using sim_vehicle.py !
If no other window open, install xterm :

sudo apt install xterm

xterm is still installed: xterm is still the latest Version (353-1ubuntu1.20.04.2)

then you should have SITL output into the xterm window saying why it fails to launch !

xterm is opening the window without any output and is killed at the end:

What’s going wrong in SITL you can see here https://discuss.ardupilot.org/uploads/short-url/hKCIHiQGyh8E6qEBDErpjvOQwmo.txt as I mentioned in first post, but I’m not able to interpret that info and would need help here.

The autotest failure is related to pexpect but don’t give a clue on what fails. With sim_vehicle.py, we see that the sitl binary fails to start as you don’t have anything into the xterm.

do you get something by launching SITL manually ?
/home/willy/ardupilot/build/sitl/bin/arduplane -S --model plane --speedup 1 --defaults /home/willy/ardupilot/Tools/autotest/default_params/plane.parm -I0

It should print at least :

Setting SIM_SPEEDUP=1.000000
Starting sketch ‘ArduPlane’
Starting SITL input
Using Irlock at port : 9005
bind port 5760 for 0
Serial port 0 on TCP port 5760
Waiting for connection …

Then in another terminal you could connect mavproxy :

mavproxy.py --master=tcp:0.0.0.0:5760 --console

This is what sim_vehicle.py does, but doing manually should show you the full print strace

At start of SITL it immediatlelly tells me:
Speicherzugriffsfehler (Speicherabzug geschrieben) (that means -> memory access error)
???

This is unexpected … unfortunately, I got no clue why it happens. I will need to ask some other dev. But normally your system is configured correctly. So either you got an issue with the toolchain and SITL end up compiled weirdly or you got some linux safety beeing overzealous.

1 Like

Thank you very much so far - I will wait because I’ve no idea how to proceed.

This is the apport-crash-dump, if anybody is able to interpret it:
_home_willy_ardupilot_build_sitl_bin_arduplane .1000.crash.txt (114.1 KB)

Ah yes, we could try in debug mode!
Could build the binary in debug mode ?
waf configure --debug
And then try launch again manually SITL.

Much business today - I’ll try asap

Unfortunately the same result:
sim_vehicle_debug_error.txt (3.2 KB)

In former years I used ICEs and SW-debuggers, but on ardupilot-project I’m not familiar with that.
Could you give me a helping hand to start SITL plane in a debugger to go through line by line?

Edit: I’m using VS Code, so I found a tutorial https://ardupilot.org/dev/docs/debugging-with-gdb-on-linux.html?highlight=debug#vs-code
I’ll try that.

@khancyr I’m very very sorry - while debugging I realized that I’m not on master, but on my own dev branch. After switching to master, all worked as it should. But after switching back to my dev branch that was not able to build because of an error ?!
Dont know what happened or what I’ve done wrong.
But via that way I learned much about separate start of SITL and debugging with VS Code :woozy_face:
Thank you again Pierre :smiley:

No problem! I glad you have find a way to fix your issue.
At least, I am relieved that we don’t have a weird configuration/linux issue with SITL