after having written this bug report, i found several such old reports (much further down the lists of topics) on each of the two mods and PDA seems to be at fault, and not being actively supported any longer (reports are 4+ months old, a possible fix to be applied to PDA was posted 7 months ago, and last update was 11 months ago).
for reference:
https://mods.factorio.com/mod/aai-programmable-vehicles/discussion/5bac60f3a592bc000a93fbbb
https://mods.factorio.com/mod/PavementDriveAssist/discussion/5bac9cdea592bc000bf7b24e
possible fix :
https://mods.factorio.com/mod/PavementDriveAssist/discussion/5b202cadd1d6bb000b064fc7
and my "ps" still applies since it is not related to that bug:
ps: is it possible to use AAI to simulate a busy road network by letting cars (from any mods or vanilla) drive around automatically? :-) and would it be possible to keep vanilla cars separate from AAI (for easier personal transport), eg with a mod setting and no or different default settings for the AI status (on for AAI cars, off for vanilla cars) ?
I'm using this mod and PDA (pavement drive assist) and many more mods.
on my current map, i have installed several of the AAI mods (but not yet built anything with them except for the miner i got at the start). since i want to enter and leave normal cars quickly and then collect them in my pocket, i changed the default setting for the AI to be "always off". when i recently placed a car again, sat in the car and switched from off to auto, there was no problem, but when i wanted to switch back to off (going from auto through on to off), the game crashed.
i could reproduce the crash, and it seems to always crash when (1) i am sitting in the car, AND (2) switching from auto to AI. there is no crash when i do the switching while standing next to the car or when switching from on to off or from off to auto.
since this happened while also using PDA, maybe one mod has messed up a value that the other tries to use. could you please have a look, and in case it is the other mod then forward the bug report to that other mod ? thanks in advance.
here is the long error "Notice" :
Error while running event aai-programmable-vehicles::on_tick (ID 0)
Error while running event PavementDriveAssist::on_player_driving_changed_state (ID 26)
PavementDriveAssist/pda.lua:90: attempt to index a nil value
stack traceback:
aai-programmable-vehicles/control.lua:1420: in function 'unit_update_mode'
aai-programmable-vehicles/control.lua:4696: in function 'unit_tick'
aai-programmable-vehicles/control.lua:4734: in function <aai-programmable-vehicles/control.lua:4704>