How to debug bus error?

when i run a program on com terminal foreground, "bus error" happened and process exit
so i want to know how to debug it ?

[DEBUG] [09-29 01:19:51.179707] device_report_self_defining_data_cb enter

rwlock unlock at subdev_address_hash_find
cmd 16
SD convert to report json {"batteryLevel":0,"batteryPercentage":40}
Bus error