Bug 1575624
Summary: | crrcsim crashes on Fedora 28 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jan "Yenya" Kasprzak <kas> | ||||
Component: | crrcsim | Assignee: | Damian Wrobel <dwrobel> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 28 | CC: | dwrobel, kas, klaus.crusius | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
URL: | https://sourceforge.net/p/crrcsim/bugs/41/ | ||||||
Whiteboard: | |||||||
Fixed In Version: | crrcsim-0.9.13-5.fc28 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-07-20 17:42:56 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Jan "Yenya" Kasprzak
2018-05-07 13:00:45 UTC
I forgot to mention that I also tried to remove all additional models and sceneries I had installed, as well as my ~/.crrcsim. But it still behaves the same way. I grabbed the F27 version of crrcsim (0.9.12-29), recompiled it using "rpmbuild --rebuild", installed, and tried to run it: It also crashes with the same assertion. So I think there is probably an older bug somewhere in crrcsim, which has only been made visible by a newly added assertion in STL or another C++ library. (In reply to Jan "Yenya" Kasprzak from comment #0) > /usr/include/c++/8/bits/stl_vector.h:932: std::vector<_Tp, > _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, > _Alloc>::size_type) [with _Tp = short int; _Alloc = std::allocator<short > int>; std::vector<_Tp, _Alloc>::reference = short int&; std::vector<_Tp, > _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < > this->size(), true)' failed. > Aborted (core dumped) Having a full callstack would be helpful. I ran debuginfo-install crrcsim, and then executed crrcsim inside gdb. The backtrace is this: (gdb) where #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007ffff466d591 in __GI_abort () at abort.c:79 #2 0x000055555567ea82 in std::__replacement_assert ( __condition=0x55555568cee0 "__builtin_expect(__n < this->size(), true)", __function=<synthetic pointer>, __line=932, __file=0x55555568cf10 "/usr/include/c++/8/bits/stl_vector.h") at /usr/include/c++/8/x86_64-redhat-linux/bits/c++config.h:2389 #3 std::vector<short, std::allocator<short> >::operator[] (__n=0, this=<optimized out>) at /usr/include/c++/8/bits/stl_vector.h:932 #4 T_VariometerSound::init (this=<optimized out>, fmt=<optimized out>) at src/crrc_sound.cpp:337 #5 0x000055555567eff8 in T_VariometerSound::T_VariometerSound(SDL_AudioSpec*) () at src/crrc_sound.cpp:319 #6 0x00005555555937c9 in main () at src/crrc_main.cpp:733 #7 0x00007ffff466f1bb in __libc_start_main (main=0x5555555911a0 <main>, argc=1, argv=0x7fffffffe728, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe718) at ../csu/libc-start.c:308 #8 0x00005555555941ea in _start () at src/mod_mode/F3A/handlerF3A.cpp:782 (gdb) Feel free to ask for more information. Created attachment 1456515 [details]
patch for std::vector usage
OK, I have finally got time to dig into this. The problem is apparently in C++ being a moving target. Apparently std::vector does not only need myvector.reserve(n) in order to be able to use myvector[0] to myvector[n-1], but the values should be added themselves.
With the attached patch I am able to run crrcsim on Fedora 28. I will try to submit it upstream as well, but since the upstream appears to be dormant, I kindly ask to build a new Fedora packages with this patch without waiting for upstream. Thanks!
*** Bug 1580508 has been marked as a duplicate of this bug. *** crrcsim-0.9.13-5.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e77cd62005 (In reply to Jan "Yenya" Kasprzak from comment #4) > Created attachment 1456515 [details] > patch for std::vector usage Thank you for fixing it. crrcsim-0.9.13-5.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e77cd62005 crrcsim-0.9.13-5.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report. |