i didn't want to speak out of turn last night, but i noticed a couple things regarding your code:
you can't assume the result of your "getException" call is not null. the documentation indicates that's a possibility. to use it (in the next statement) without having checked if it's valid will probably cause a crash). in java, you would check for null. possibly the same in b4a, but i think the convention is to do something like "if the-javaobject-.isInitialized = false then ...". the assignment alone isn't necessarily enough to cause a crash; it's the using that does.
you could probably also wrap the call in try/catch.
second, "getStatusCode" is a method of the geofences(client) api, not a method of the exc ("getException"). how you get back to the geofences api seems tricky, given the code shown. there is also the matter of an "apiexception", which is actually what appears to contain the status code. that's clearly mentioned in the task or geofences(client) api documentation. this exception is triggered additionally by the "addgeofences" method (as part of the callback). how you access it, i can't say. i don't use the api. but the documentation indicates pretty clearly that this exception does contain things similar to what you are looking for with "getStatusCode", but not with that method. i think. it was kind of late in the evening to start with documentation for task, geofencesclient api and apiexception all at once.
i know you saw the error 13 posts (i did too), but, in addition, many people have described the same problem as you did regarding mysterious failures. it seems to have been acknowledged by google and was related to its gms or play services version. not sure if you saw those posts as well.