java - SharedPreferences error when updating app -


when updating application error, sometimes.

 java.lang.stackoverflowerror

@ android.app.contextimpl.getsharedpreferences(contextimpl.java:354) @ android.content.contextwrapper.getsharedpreferences(contextwrapper.java:146) @ it.veneto.arpa.controller.controller.verifybulletin(controller.java:377) @ it.veneto.arpa.controller.controller.retrievebulletin(controller.java:509) @ it.veneto.arpa.controller.controller.verifybulletin(controller.java:394) @ it.veneto.arpa.controller.controller.retrievebulletin(controller.java:509) @ it.veneto.arpa.controller.controller.verifybulletin(controller.java:394) @ it.veneto.arpa.controller.controller.retrievebulletin(controller.java:509) @ it.veneto.arpa.controller.controller.verifybulletin(controller.java:394)

on line 377 there is:

sharedpreferences prefs = context.getsharedpreferences(preferences, context.mode_private);

if connecting server (i assuming because of retrievebulletin method) again , again, try waiting (thread.sleep(time_out);) second or 2 before try again. have maximum number of tries. if tried 10 times , still didn't receive response or valid response, try handling situation rather forever trying. if don't, result insufficient stack space , end getting error receiving.

based comment, similar situation - bad recursive call without handling worst scenario.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -