Crash reports stacks don't capture thread names

124 views
Skip to first unread message

Alec Miller

unread,
Apr 9, 2024, 10:26:59 AM4/9/24
to Firebase Google Group
On all our platforms, we set threads names.  Backtrace captures these and adds them to our crash reports.  But Crashlytics seems to just ignore them.  How do we get these recorded?  We use Crashlytics on iOS/Android.  And when you are just sorting through "Thread 1"..."Thread 80", that's not very helpful for identifying problems.

Alec Miller

unread,
Apr 9, 2024, 11:16:28 PM4/9/24
to Firebase Google Group
Here's our code for pthread systems like iOS/Android.  So any thread can pull the name off the pthread handle.  Win and consoles also have getters.

constexpr uint32_t kMaxThreadNameSize = 32;

void GetThreadName( pthread_t handle, char name[kMaxThreadNameSize] )

{

    pthread_getname_np( handle, name, kMaxThreadNameSize );

Joe Spiro

unread,
Apr 10, 2024, 2:21:48 PM4/10/24
to Firebase Google Group
Hello Alec,

As of the current moment, Crashlytics does not support displaying pthread names.

Regards,
Joe

Alec Miller

unread,
Apr 10, 2024, 3:58:25 PM4/10/24
to Firebase Google Group
That really makes triage difficult.  The code is one line above.  Crashlytics have the pthread id, so just query and store the name.  They're small too.  
Reply all
Reply to author
Forward
0 new messages