Patent attributes
An improved SDK includes a set of APIs and a crash handler registered with the operating system. Each API is an interface accessible by a computer software application. Up on entrance, each API determines the current thread identifier, and inserts it into a list if it is not already in the list. Each thread identifier corresponds to an API call counter, which is incremented by one at the entrance and decremented by one at the exit point of the API. The SDK also records the identifier of the thread it creates for callback functions. When a crash occurs, the crash handler is executed. It determines that the crash is related to a callback interface if the crash thread identifier matches the callback thread identifier. The crash is determined to be caused by the SDK if the API call counter corresponding to the crash thread identifier is greater than zero.