Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FreeDV Reporter crash when sending RX record. #443

Merged
merged 5 commits into from
Jun 18, 2023
Merged

Conversation

tmiw
Copy link
Collaborator

@tmiw tmiw commented Jun 18, 2023

Resolves very intermittent crash when receiving RX records. On my M1 Mac, the crash log for this issue looked like the following:

Thread 15 Crashed:
0   libsystem_platform.dylib      	       0x19b50e7fc _platform_memmove + 444
1   libc++.1.dylib                	       0x19b40fa24 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) + 64
2   FreeDV                        	       0x102c4608c sio::string_message::string_message(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) + 76 (sio_message.h:202)
3   FreeDV                        	       0x102c45ffc sio::string_message::string_message(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) + 36 (sio_message.h:203)
4   FreeDV                        	       0x102c45ec8 sio::string_message::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) + 44 (sio_message.h:213)
5   FreeDV                        	       0x102c423bc sio::object_message::insert(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) + 44 (sio_message.h:359)
6   FreeDV                        	       0x102c55338 FreeDVReporter::addReceiveRecord(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned long long, char)::$_1::operator()() const + 124 (FreeDVReporter.cpp:120)
7   FreeDV                        	       0x102c552b0 decltype(std::declval<FreeDVReporter::addReceiveRecord(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned long long, char)::$_1&>()()) std::__1::__invoke[abi:v15006]<FreeDVReporter::addReceiveRecord(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned long long, char)::$_1&>(FreeDVReporter::addReceiveRecord(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned long long, char)::$_1&) + 24 (invoke.h:394)
8   FreeDV                        	       0x102c55268 void std::__1::__invoke_void_return_wrapper<void, true>::__call<FreeDVReporter::addReceiveRecord(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned long long, char)::$_1&>(FreeDVReporter::addReceiveRecord(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned long long, char)::$_1&) + 24 (invoke.h:479)
9   FreeDV                        	       0x102c55244 std::__1::__function::__alloc_func<FreeDVReporter::addReceiveRecord(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned long long, char)::$_1, std::__1::allocator<FreeDVReporter::addReceiveRecord(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned long long, char)::$_1>, void ()>::operator()[abi:v15006]() + 28 (function.h:185)
10  FreeDV                        	       0x102c53ff8 std::__1::__function::__func<FreeDVReporter::addReceiveRecord(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned long long, char)::$_1, std::__1::allocator<FreeDVReporter::addReceiveRecord(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, unsigned long long, char)::$_1>, void ()>::operator()() + 28 (function.h:359)
11  FreeDV                        	       0x102bb2b9c std::__1::__function::__value_func<void ()>::operator()[abi:v15006]() const + 68 (function.h:512)
12  FreeDV                        	       0x102bb2b4c std::__1::function<void ()>::operator()() const + 24 (function.h:1197)
13  FreeDV                        	       0x102c41f74 FreeDVReporter::threadEntryPoint_() + 356 (FreeDVReporter.cpp:434)
14  FreeDV                        	       0x102c4c568 decltype(*std::declval<FreeDVReporter*&>().*std::declval<void (FreeDVReporter::*&)()>()()) std::__1::__invoke[abi:v15006]<void (FreeDVReporter::*&)(), FreeDVReporter*&, void>(void (FreeDVReporter::*&)(), FreeDVReporter*&) + 116 (invoke.h:359)
15  FreeDV                        	       0x102c4c4e8 std::__1::__bind_return<void (FreeDVReporter::*)(), std::__1::tuple<FreeDVReporter*>, std::__1::tuple<>, __is_valid_bind_return<void (FreeDVReporter::*)(), std::__1::tuple<FreeDVReporter*>, std::__1::tuple<>>::value>::type std::__1::__apply_functor[abi:v15006]<void (FreeDVReporter::*)(), std::__1::tuple<FreeDVReporter*>, 0ul, std::__1::tuple<>>(void (FreeDVReporter::*&)(), std::__1::tuple<FreeDVReporter*>&, std::__1::__tuple_indices<0ul>, std::__1::tuple<>&&) + 60 (bind.h:263)
16  FreeDV                        	       0x102c4c4a0 std::__1::__bind_return<void (FreeDVReporter::*)(), std::__1::tuple<FreeDVReporter*>, std::__1::tuple<>, __is_valid_bind_return<void (FreeDVReporter::*)(), std::__1::tuple<FreeDVReporter*>, std::__1::tuple<>>::value>::type std::__1::__bind<void (FreeDVReporter::*)(), FreeDVReporter*>::operator()[abi:v15006]<>() + 36 (bind.h:295)
17  FreeDV                        	       0x102c4c448 decltype(std::declval<std::__1::__bind<void (FreeDVReporter::*)(), FreeDVReporter*>>()()) std::__1::__invoke[abi:v15006]<std::__1::__bind<void (FreeDVReporter::*)(), FreeDVReporter*>>(std::__1::__bind<void (FreeDVReporter::*)(), FreeDVReporter*>&&) + 24 (invoke.h:394)
18  FreeDV                        	       0x102c4c424 void std::__1::__thread_execute[abi:v15006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, std::__1::__bind<void (FreeDVReporter::*)(), FreeDVReporter*>>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, std::__1::__bind<void (FreeDVReporter::*)(), FreeDVReporter*>>&, std::__1::__tuple_indices<>) + 28 (thread:290)
19  FreeDV                        	       0x102c4c12c void* std::__1::__thread_proxy[abi:v15006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, std::__1::__bind<void (FreeDVReporter::*)(), FreeDVReporter*>>>(void*) + 84 (thread:301)
20  libsystem_pthread.dylib       	       0x19b4dffa8 _pthread_start + 148
21  libsystem_pthread.dylib       	       0x19b4dada0 thread_start + 8

I suspect some on Windows and Linux were running into similar as well.

@tmiw tmiw merged commit 3358941 into master Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant