0

I've been using Veins (v5.1) along with SUMO (v1.8) and OMNeT++ (v5.6.2) in Linux Ubuntu 20.04 and 18.04. When I try to run the example provided by veins I keep getting the same error both in Ubuntu 20.04 and 18.04.

According to the information in OMNeT, the error code is 133 or 137 and there isn't much information about the error in the above lines.

Sumo seems to be running correctly, listening on port 9999, and sumo-gui is actually launching. However, a few seconds later it terminates with the following error log "Error: Storage::readChar(): invalid position". There's also an error code in the terminal.

In the past I faced this problem in Ubuntu 14.04 due to incompatibility issues between the versions I was using. This time I'm using the recommended versions from veins webpage. Has anyone faced this problem before? Could this be an incompatibility issue with the operating system and if so, does anyone know what the compatible versions are for Ubuntu 18.04 or 20.04? I haven't used Linux before so I'm not sure if there's something else I'm missing.

I've included a screenshot with the errors I'm getting in case that helps.

Thanks!

Christina
  • 70
  • 7
  • Try running your simulation in a debugger. For details, see the Veins FAQ , specifically the entry "How can I debug my OMNeT++ simulation models? How do I create a stack trace?". This should point you to exactly which part of your simulation failed and, hopefully, allow you to diagnose why. If all else fails, check if your simulation works on Instant Veins, a virtual machine which has everything preconfigured to work out of the box. – Christoph Sommer Mar 11 '21 at 12:43
  • I've used the debugging mode and the first error is the following: cRuntimeError notifyEnvir at exception.cc:260 0x7ffff6ad91ea The rest are related to the connection with the TraCI server. – Christina Mar 12 '21 at 09:02
  • Thanks for trying! Seems like you'd need to be more familiar with debugging C++ code for this. I'm afraid I can only leave you with the recommendation to try Instant Veins then. – Christoph Sommer Mar 12 '21 at 15:30
  • I tried something else and for some reason it worked at least for Ubuntu 18. I don't know if I have missed something in the documentation of the later versions of Veins but for some reason, if veins is extracted into a src folder and then imported to Omnet++ it works just fine. – Christina Mar 13 '21 at 10:03
  • Interesting - thanks for following up! Did I understand you right that you first tried importing Veins without extracting it first (which led to errors), then you imported it again and it worked? – Christoph Sommer Mar 13 '21 at 11:45
  • 1
    Both times I extracted veins before importing it. However, the first time the location was /home///veins-5.1 (led to errors) the second time was /home///src/veins-5.1 (no errors) – Christina Mar 13 '21 at 11:55

2 Answers2

1

I faced the same issue when using ubuntu 20.04, Omnet++ 5.6.2 and SUMO 1.9.0, and I managed to solve it by downgrading sumo to an older version.

  1. First remove the current sumo:

    $sudo apt-get remove sumo 
    
  2. Then install the old version:

    $sudo apt-get install sumo=1.4.0+dfsg1-1
    
Anatolii
  • 14,139
  • 4
  • 35
  • 65
ah.ibrahim
  • 21
  • 3
0

I don't know if that is actually an answer to the problem or why this works. I've tried it both in my laptop (Ubuntu 18.04) and in two different virtual machines (Ubuntu 18.04 and Ubuntu 20.04) and this seems to fix the problem.

Veins should be saved in a folder called src and then imported to OMNeT++ to avoid the error. The path to Veins should be similar to the following.

 /home/<me>/<folder>/src/veins-5.1
Christina
  • 70
  • 7