DriveML Huawei Autonomous Vehicles Challenge Forum

Go back to competition Back to thread list Post in this thread

> sumo-gui returns segmentation fault

Hi,

I am running Macos Catalina and after running sumo-gui command by typing just "sumo-gui" on the terminal window, it throws a segmentation fault. How can I fix this?

thanks

Posted by: Team53 @ Nov. 4, 2019, 1:02 p.m.

The same problem! I am going crazy...
How to solve it?

Posted by: Team129 @ Nov. 4, 2019, 1:41 p.m.

log:
zsh: segmentation fault sumo-gui
MacOS vision:
catalina 10.15.1 (19B88)

Posted by: Team129 @ Nov. 4, 2019, 1:46 p.m.

Hi

New macOS 10.15 required much more strict permission checking policy, which is the reason for segmentation fault like below.
It can be solved by turning on some permissions in settings:
Steps: Settings -> Security & Privacy -> Privacy -> Developer Tools -> Terminal [on]

=======example error message=======

'''
[1] 9070 segmentation fault python run.py
Error: tcpip::Socket::recvAndCheck @ recv: peer shutdown ACT 0 BUF 0)
Quitting (on error).
sumo(9140,0x10cb4cd40) malloc: Incorrect checksum for freed object 0x7fb308d6a4c0: probably modified after being freed.
Corrupt value: 0x0
sumo(9140,0x10cb4cd40) malloc: *** set a breakpoint in malloc_error_break to debug
'''

Posted by: HuaweiUK @ Nov. 4, 2019, 2:39 p.m.

Thank you for your reply.
I opened the permissions in the settings and restarted the Terminal. But the problem still exists.

~ % sumo-gui
zsh: segmentation fault sumo-gui

Posted by: Team129 @ Nov. 4, 2019, 3:07 p.m.

Hi,

We solved the segment problem (which doesn't exist in 10.14) by turning on permissions (maybe need more permissions like full disk?) and re-install the sumo.
And have you set/install the xcode command line tool after upgrading to 10.15, like "xcode-select --install" in the terminal.

Could you post the detailed error messages here, I am not quite sure about your problem now?

Best,
Competition Team

Posted by: HuaweiUK @ Nov. 4, 2019, 3:43 p.m.

Here is the full steps for sumo installation:

function do_install_for_macos {
echo "Installing sumo (used for traffic simulation and road network)"
brew tap dlr-ts/sumo
brew install sumo spatialindex

# start X11 manually the first time, logging im/out will also do the trick
open -g -a XQuartz.app

echo ""
echo "-- dependencies have been installed --"
echo ""
read -p "Add SUMO_HOME to ~/.bash_profile? [Yn]" should_add_SUMO_HOME
echo "should_add_SUMO_HOME $should_add_SUMO_HOME"
if [[ $should_add_SUMO_HOME =~ ^[yY\w]*$ ]]; then
echo 'export SUMO_HOME="/usr/local/opt/sumo/share/sumo"' >> ~/.bash_profile
echo "We've updated your ~/.bash_profile. Be sure to run:"
echo ""
echo " source ~/.bash_profile"
echo ""
echo "in order to set the SUMO_HOME variable in your current session"
else
echo "Not updating ~/.bash_profile"
echo "Make sure SUMO_HOME is set before proceeding"
fi
}

I saw you are using zsh, have you sourced the bash_profile or re-opened the terminal after the "./install_deps.sh"?
Have you checked the SUMO_HOME has been set properly?

Posted by: HuaweiUK @ Nov. 4, 2019, 3:47 p.m.

Hi
Thank you for your reply. I am sure that those permissions have been opened.

And then install the xcode command line tool, reinstall sumo, reinstall spatialindex, and follow your steps.
I have failed again. Is there any mistake in my operation? Below is the full logs. Thank you.

--------------------
scott@pc-141-140 starter_kit % ./install_deps.sh
Detected macOS
Installing sumo (used for traffic simulation and road network)
Warning: dlr-ts/sumo/sumo 1.3.1 is already installed and up-to-date
To reinstall 1.3.1, run `brew reinstall sumo`
Warning: spatialindex 1.9.3 is already installed and up-to-date
To reinstall 1.9.3, run `brew reinstall spatialindex`

-- dependencies have been installed --

Add SUMO_HOME to ~/.bash_profile? [Yn]Y
should_add_SUMO_HOME Y
We've updated your ~/.bash_profile. Be sure to run:

source ~/.bash_profile

in order to set the SUMO_HOME variable in your current session
scott@pc-141-140 starter_kit % source ~/.bash_profile
scott@pc-141-140 starter_kit % sumo-gui
zsh: segmentation fault sumo-gui

-------------------
Last login: Mon Nov 4 16:47:14 on ttys001
scott@pc-141-140 ~ % sumo-gui
zsh: segmentation fault sumo-gui

Posted by: Team129 @ Nov. 4, 2019, 4:47 p.m.

Didn't work for me either (original thread starter).

This REALLY puts me in a disadvantage as I regret now upgrading to a "faulty" OS which I will downgrade.

Posted by: Team53 @ Nov. 4, 2019, 6:39 p.m.

Hi

Is there any competition teams helping us solve this problem? Thank you.

-------------logs--------------------

scott@dachengzideMacBook-Pro starter_kit % sumo-gui
zsh: segmentation fault sumo-gui

scott@dachengzideMacBook-Pro starter_kit % ./install_deps.sh
Detected macOS
Installing sumo (used for traffic simulation and road network)
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
mpv
==> Updated Formulae
libtiff ✔ grafana libedit s3-backer
adwaita-icon-theme haproxy libetpan starship
ansible haxe libopenmpt tunnel
asdf hyperscan libsass youtube-dl
axel imageoptim-cli nodenv zydis
clojure inlets nomad
fig2dev jenkins packer
ghq jmeter pyenv

Warning: dlr-ts/sumo/sumo 1.3.1 is already installed and up-to-date
To reinstall 1.3.1, run `brew reinstall sumo`
Warning: spatialindex 1.9.3 is already installed and up-to-date
To reinstall 1.9.3, run `brew reinstall spatialindex`
LSOpenURLsWithRole() failed for the application /Applications/Utilities/XQuartz.app with error -10810.

-- dependencies have been installed --

Posted by: Team129 @ Nov. 5, 2019, 10:09 a.m.

console logs
----------------------
Process: sumo-gui [2892]
Path: /usr/local/Cellar/sumo/1.3.1/bin/sumo-gui
Identifier: sumo-gui
Version: 0
Code Type: X86-64 (Native)
Parent Process: zsh [703]
Responsible: iTerm2 [699]
User ID: 501

Date/Time: 2019-11-05 10:32:51.236 +0000
OS Version: Mac OS X 10.15.1 (19B88)
Report Version: 12
Bridge OS Version: 4.1 (17P1081)

Time Awake Since Boot: 2100 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [2892]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libdyld.dylib 0x00007fff69217386 stack_not_16_byte_aligned_error + 0
1 ??? 0x00007ffee9218150 0 + 140732809707856
2 sumo-gui 0x0000000106ab238e GUIIconSubSys::initIcons(FX::FXApp*) + 34
3 sumo-gui 0x00000001069ee516 GUIApplicationWindow::GUIApplicationWindow(FX::FXApp*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 554
4 sumo-gui 0x00000001069ed87c main + 620
5 libdyld.dylib 0x00007fff692262e5 start + 1

Thread 1:
0 libsystem_pthread.dylib 0x00007fff6942f56c start_wqthread + 0

Thread 2:
0 libsystem_pthread.dylib 0x00007fff6942f56c start_wqthread + 0

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000012138 rbx: 0x00007fc36951abe0 rcx: 0x00007fc36951ac0c rdx: 0x00007fc36951ac08
rdi: 0x0000000106e9eab0 rsi: 0x00007fc36951ac10 rbp: 0x00007ffee9218150 rsp: 0x00007ffee92180b8
r8: 0x0000000000000001 r9: 0x0000000000000001 r10: 0x00007ffee9218b90 r11: 0x0000000107c4b030
r12: 0x00007ffee9218200 r13: 0x00007fc36a013048 r14: 0x0000000106e9eab0 r15: 0x00007fc36a008000
rip: 0x00007fff69217386 rfl: 0x0000000000010202 cr2: 0x0000000107c7d4fe

Logical CPU: 4
Error Code: 0x00000000
Trap Number: 13

Posted by: Team129 @ Nov. 5, 2019, 10:38 a.m.

I am sorry about that, we got same problem before, but it was solved by turning on the permissions.
So can you open XQuartz follow the command "open -g -a XQuartz.app" in the terminal, is it normal? If not, what is the error message?
And can you turn on the full 'Full Disk Access' and 'Files and Folder' permissions in 'Setting-Security & Privacy-Privacy' for iTerm2 as well?

Best,
Ying

Posted by: HuaweiUK @ Nov. 5, 2019, 10:50 a.m.

I guess this is caused by privilege, the program needs to access some disk/memory space but without permission, so it crashes.
Maybe solution 1: using sudo command; 2: turning on the access permission.

Best,
Ying

Posted by: HuaweiUK @ Nov. 5, 2019, 10:55 a.m.

After you have granted proper permissions for terminal/iterm, please uninstall and then reinstall the sumo and spatialindex.
Maybe something like that:

```
brew reinstall sumo spatialindex
```

Posted by: HuaweiUK @ Nov. 5, 2019, 11:02 a.m.

Running open -g -a XQuartz.app, I got

LSOpenURLsWithRole() failed for the application /Applications/Utilities/XQuartz.app with error -10810.

Posted by: team03 @ Nov. 6, 2019, 12:24 a.m.

The `open -g -a XQuartz.app` clue is helpful.

To try,
* Reinstall XQuartz: https://www.xquartz.org/ (Apparently X11 on Catalina now uses install on demand. When you first launch an app that requires X11 libraries, you are directed to a download location for the most up-to-date version of X11 for Mac. Perhaps the installation didn't go well)
* Take a look at this macOS quarantine behaviour: https://apple.stackexchange.com/a/328207

Posted by: HuaweiUK @ Nov. 6, 2019, 2:42 p.m.

Hi Ying
Thanks for your reply.
I followed your steps, but the problem is still not resolved, I will provide further error logs to ask your help. thank you.

1. First, Xquartz can start normally after using "open -g -a XQuartz.app"
2. I turned on the full 'Full Disk Access' and 'Files and Folder' permissions in 'Setting-Security & Privacy-Privacy' for iTerm2
3. And then reinstalled the sumo and spatialindex

I tried it many times, but I still failed. So,I am looking for your next help. Here are some error messages:
-------------terminal---------
scott@pc-141-140 ~ % open -g -a XQuartz.app
scott@pc-141-140 ~ % sumo-gui
zsh: segmentation fault sumo-gui
scott@pc-141-140 ~ % bash
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
bash-3.2$ sumo-gui
Segmentation fault: 11
bash-3.2$ sudo sumo-gui
Password:
Segmentation fault: 11
----
scott@pc-141-140 starter_kit % ./install_deps.sh
Detected macOS
Installing sumo (used for traffic simulation and road network)
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
couchdb goreleaser python-yq squid
deployer grafana rgbds
gitmoji kubernetes-helm sispmctl

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
No changes to formulae.

Warning: dlr-ts/sumo/sumo 1.3.1 is already installed and up-to-date
To reinstall 1.3.1, run `brew reinstall sumo`
Warning: spatialindex 1.9.3 is already installed and up-to-date
To reinstall 1.9.3, run `brew reinstall spatialindex`

-- dependencies have been installed --

Add SUMO_HOME to ~/.bash_profile? [Yn]Y
should_add_SUMO_HOME Y
We've updated your ~/.bash_profile. Be sure to run:

source ~/.bash_profile

in order to set the SUMO_HOME variable in your current session
scott@pc-141-140 starter_kit % sumo-gui
zsh: segmentation fault sumo-gui

scott@pc-141-140 starter_kit % sudo sumo-gui
Password:
zsh: segmentation fault sudo sumo-gui

-------------console---------
ocess: sumo-gui [4935]
Path: /usr/local/Cellar/sumo/1.3.1/bin/sumo-gui
Identifier: sumo-gui
Version: 0
Code Type: X86-64 (Native)
Parent Process: zsh [3183]
Responsible: iTerm2 [3006]
User ID: 501

Date/Time: 2019-11-06 23:21:26.537 +0000
OS Version: Mac OS X 10.15.1 (19B88)
Report Version: 12
Bridge OS Version: 4.1 (17P1081)

Time Awake Since Boot: 4600 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [4935]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libdyld.dylib 0x00007fff6ea2f386 stack_not_16_byte_aligned_error + 0
1 ??? 0x00007ffee658d180 0 + 140732763001216
2 sumo-gui 0x000000010973d38e GUIIconSubSys::initIcons(FX::FXApp*) + 34
3 sumo-gui 0x0000000109679516 GUIApplicationWindow::GUIApplicationWindow(FX::FXApp*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 554
4 sumo-gui 0x000000010967887c main + 620
5 libdyld.dylib 0x00007fff6ea3e2e5 start + 1

Thread 1:
0 libsystem_pthread.dylib 0x00007fff6ec4756c start_wqthread + 0

Thread 2:
0 libsystem_pthread.dylib 0x00007fff6ec4756c start_wqthread + 0

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000012138 rbx: 0x00007fec34f66850 rcx: 0x00007fec34f6687c rdx: 0x00007fec34f66878
rdi: 0x0000000109b29ab0 rsi: 0x00007fec34f66880 rbp: 0x00007ffee658d180 rsp: 0x00007ffee658d0e8
r8: 0x0000000000000001 r9: 0x0000000000000001 r10: 0x00007ffee658dbb8 r11: 0x000000010a8d5030
r12: 0x00007ffee658d230 r13: 0x00007fec37853248 r14: 0x0000000109b29ab0 r15: 0x00007fec37853400
rip: 0x00007fff6ea2f386 rfl: 0x0000000000010202 cr2: 0x000000010a9074fe

Logical CPU: 0
Error Code: 0x00000000
Trap Number: 13

Posted by: Team129 @ Nov. 6, 2019, 11:35 p.m.

Hi, Team 129:

Directly run 'install_deps.sh' would not reinstall sumo.
Have you tried the following commands?

To reinstall 1.3.1, run `brew reinstall sumo`
To reinstall 1.9.3, run `brew reinstall spatialindex`

Best,
Ying

Posted by: HuaweiUK @ Nov. 7, 2019, 10:30 a.m.

I have tried everything you have mentioned and nothing has worked so far unfortunately.

Posted by: team03 @ Nov. 8, 2019, 2:07 a.m.

Hi Ying

Yes, I have already reinstalled them by `brew reinstall sumo` and `brew reinstall spatialindex`.

It always 'zsh: segmentation fault sumo-gui'
or 'bash: Segmentation fault: 11'

Posted by: Team129 @ Nov. 8, 2019, 10 p.m.

We got some official information from the sumo team. Please see https://github.com/eclipse/sumo/issues/6242#issuecomment-553458710

Posted by: HuaweiUK @ Nov. 13, 2019, 8:32 p.m.
Post in this thread