SLADE
SLADE copied to clipboard
Crash on start / Ubuntu 20.04
SLADE Version: 3.2.0 beta @ dfeecacb3fdff87d02fc66e2be16f5baa4832078 Operating System: Ubuntu 20.04 Issue Details: SLADE crashes on start with the following callstack obtained from Debug build
#0 __GI___libc_free (mem=0x226b636162223d) at malloc.c:3102
#1 0x000055555707998c in __gnu_cxx::new_allocator<char>::deallocate(char*, unsigned long) (this=0x7fff999fb5d8, __p=0x226b636162223d <error: Cannot access memory at address 0x226b636162223d>) at /usr/include/c++/9/ext/new_allocator.h:128
#2 0x000055555707747b in std::allocator_traits<std::allocator<char> >::deallocate(std::allocator<char>&, char*, unsigned long) (__a=..., __p=0x226b636162223d <error: Cannot access memory at address 0x226b636162223d>, __n=1) at /usr/include/c++/9/bits/alloc_traits.h:470
#3 0x00005555570742b4 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_destroy(unsigned long) (this=0x7fff999fb5d8, __size=0) at /usr/include/c++/9/bits/basic_string.h:237
#4 0x0000555557073196 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose() (this=0x7fff999fb5d8) at /usr/include/c++/9/bits/basic_string.h:232
#5 0x000055555706ff6e in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() (this=0x7fff999fb5d8, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/basic_string.h:658
#6 0x000055555732d848 in sf::Http::Response::~Response() (this=0x7fff999fb580, __in_chrg=<optimized out>) at /usr/include/SFML/Network/Http.hpp:193
#7 0x000055555732cdaa in slade::web::getHttp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (host="slade.mancubus.net", uri="/news-latest.php") at /home/user/Desktop/Documents/SLADE/src/General/Web.cpp:61
#8 0x000055555732cf28 in slade::web::<lambda()>::operator()(void) const (__closure=0x55555a560208) at /home/user/Desktop/Documents/SLADE/src/General/Web.cpp:79
#9 0x000055555732d738 in std::__invoke_impl<void, slade::web::getHttpAsync(const string&, const string&, wxEvtHandler*)::<lambda()> >(std::__invoke_other, slade::web::<lambda()> &&) (__f=...) at /usr/include/c++/9/bits/invoke.h:60
#10 0x000055555732d6ed in std::__invoke<slade::web::getHttpAsync(const string&, const string&, wxEvtHandler*)::<lambda()> >(slade::web::<lambda()> &&) (__fn=...) at /usr/include/c++/9/bits/invoke.h:95
#11 0x000055555732d69a in std::thread::_Invoker<std::tuple<slade::web::getHttpAsync(const string&, const string&, wxEvtHandler*)::<lambda()> > >::_M_invoke<0>(std::_Index_tuple<0>) (this=0x55555a560208) at /usr/include/c++/9/thread:244
#12 0x000055555732d670 in std::thread::_Invoker<std::tuple<slade::web::getHttpAsync(const string&, const string&, wxEvtHandler*)::<lambda()> > >::operator()(void) (this=0x55555a560208) at /usr/include/c++/9/thread:251
#13 0x000055555732d654 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<slade::web::getHttpAsync(const string&, const string&, wxEvtHandler*)::<lambda()> > > >::_M_run(void) (this=0x55555a560200) at /usr/include/c++/9/thread:195
#14 0x00007ffff623ade4 in () at /lib/x86_64-linux-gnu/libstdc++.so.6
#15 0x00007ffff5fe0609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#16 0x00007ffff5f05293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
I have a very limited ability to debug on that PC, so that's pretty much all information I can provide. All dependencies were installed with the following command:
sudo apt update && \
sudo apt upgrade && \
sudo apt install libcurl4-openssl-dev libfluidsynth-dev libfmt-dev libfreeimage-dev \
libftgl-dev libglew-dev libgtk-3-dev liblua5.3-dev libmpg123-dev libsfml-dev \
libwxgtk3.0-gtk3-dev libwxgtk-media3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev
I think it's something to do with SFML's HTTP client. The crash does not happen if I make getHttp
return "connect_failed"
, and I comment out the rest of the code in getHttp
.
This one is really weird - I am getting it myself, but only in debug builds. I'm not sure it's an issue with SLADE or even SFML, the crash is happening in the sf::Response destructor when trying to destruct some string member variables.