[wm21 - android] LooperaddLine() cause exception if swipe row is use

Startbeitrag von ccc2 am 17.12.2016 12:11

Hi,

recently I keep getting exception
"Error in Initialiazing myApp process.
Internal error of WDJava framework.
Java.lang.NullPointerException"


after days of tracing , I finally found which function LooperaddLine() that cause it .

what really cause this function throw exception is because I set "swipe of a row : action by programming"

The exception only occurred if you using in multi thread . in single thread no need worry.

Antworten:

Hi

are you telling us that you are accessing the UI from a secondary thread?

If the answer is yes, then stop. This is the BIG NO NO of secondary threads, clearly stated in the help.

Best regards

von Fabrice Harari - am 17.12.2016 14:48
Quote
Fabrice Harari
Hi

are you telling us that you are accessing the UI from a secondary thread?

If the answer is yes, then stop. This is the BIG NO NO of secondary threads, clearly stated in the help.

Best regards



NO . I didn't . when user swipe a row , I prompt confirm delete . if yes I call local procedure to delete (the row in control didn't delete). if success delete i call loaddata()

the exception occurred .

right now i disable the swipe row and use long press event. no problem after that.

von ccc2 - am 18.12.2016 03:40
I give up . I couldn't find why reload looper in swipe event will cause exception .

at first i suspect the loaddata() local procedure which what it did
- start thread
- get data from webservice
- looperdeleteall()
- looperaddline()


I try test by looping calling it from button click 100 times each multitask 5000 . total record 200. no error or exception. I call it from long press event also no problem.
but only in swipe event then cause exception .
looperdeleteall() didn't throw error . but when add first row (looperaddline()) exception occurred.


next, I try swipe (automatic deletion) and put the code loaddata in after automatic deletion of row. this time no exception thrown.

why?????:confused:

von ccc2 - am 19.12.2016 10:06
I try put loaddata() & result false in "before automatic deleting of row" event . same exception pop up.

look like at that event, cannot performance looperdeleteall() . this will cause exception when call looperaddline() .

:mad:the help never mention this. :mad:

von ccc2 - am 19.12.2016 11:44
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.