retrofit icon indicating copy to clipboard operation
retrofit copied to clipboard

A synchronous use of the retrofit with the .execute method giving Error

Open abhishekpathak-agva opened this issue 2 years ago • 2 comments

While using retrofit in synchronous mode while using .execute method giving an error gives a error Fatal signal 11 (SIGSEGV), code 1, fault addr 0x14 in tid 16155 (JDWP), pid 16148. But the situation I am stuck in can be solved by only by the synchronous approach since the main thread initiates shutdown process and until the .enqueue method comes up with the result the main thread of the android app already reaches end. So .execute synchronous approach is the only way to resolve it, but the error is a pain.

abhishekpathak-agva avatar Mar 22 '22 09:03 abhishekpathak-agva

Can you provide a self-contained sample which reproduces the problem? We have plenty of usage of .execute() in Retrofit's own test suite without issue.

JakeWharton avatar Mar 30 '22 19:03 JakeWharton

Fatal signal 11 (SIGSEGV), code 1, fault addr 0x14 in tid 16155 (JDWP), pid 16148 was some issue arose because of some local build. And the .execute works but it didn't solved the problem the mainthread is in closing process, and .execute is a synchronous request but due to framework issues the network request cannot be made on the main thread so a background thread. But thanks.

abhishekpathak-agva avatar Apr 01 '22 03:04 abhishekpathak-agva

This limitation is imposed by Android, yes.

JakeWharton avatar Nov 30 '22 04:11 JakeWharton