Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 1 Jahr, 1 Monat
Letzter Beitrag:
vor 1 Jahr, 1 Monat
Beteiligte Autoren:
ccc2, Danny Lauwers

[wm21 - android] infinite progress bar can cause crash?

Startbeitrag von ccc2 am 14.12.2016 12:45

Hi,

i create control template looper (multi thread) with LooperAddInProgress() and use infinite progress bar (native circular) while retrieve / filled data in progress .

first time looper load data -> no problem
using swipe to delete a row then call load data -> crash

if I take out infinite control and use image control -> no problem.

anyone encounter similar problem?

i will try look into logcat to see what cause it

Antworten:

this is part of logcat before crash


W/InputMethodManagerService( 2100): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@41ea3540 attribute=null, token = android.os.BinderProxy@42275f88
I/wpa_supplicant( 2725): [CTRL_IFACE]wlan0: SIGNAL_POLL
W/SurfaceFlinger( 1200): couldn't log to binary event log: overflow.
I/Choreographer(20107): Skipped 36 frames! The application may be doing too much work on its main thread.


when I run another time

W/InputMethodManagerService( 2100): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@41c859d8 attribute=null, token = android.os.BinderProxy@41ec9c00
W/SurfaceFlinger( 1200): couldn't log to binary event log: overflow.
I/wpa_supplicant( 2725): [CTRL_IFACE]wlan0: SIGNAL_POLL
I/Choreographer(25413): Skipped 41 frames! The application may be doing too much work on its main thread.



the strange part is after load data() I add code info() then it won't crash



is running infinite progress bar cause main thread over load ? or the focused ?

for now , I will just use image control to show in-progress status

von ccc2 - am 15.12.2016 03:09
Hi,

You cannot you GUI stuff in Multithread. You cannot do anything with GUI controls, you have to run that on the mainthread.

You can do that by using the ExecuteMainThread function (http://doc.windev.com/en-US/?1000019862).

Danny

von Danny Lauwers - am 15.12.2016 07:37
Quote
Danny Lauwers
Hi,

You cannot you GUI stuff in Multithread. You cannot do anything with GUI controls, you have to run that on the mainthread.

You can do that by using the ExecuteMainThread function (http://doc.windev.com/en-US/?1000019862).

Danny


Hi Danny,

I use ExecuteMainThread() or else will get different error

von ccc2 - am 15.12.2016 08:41
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.