Android Question ... Isn't Responding. Do you want to close it?

TheWind777

Active Member
Licensed User
Longtime User
I am so frustrated.

My program keeps doing that.

Even when I turn off all the timers it does it.

I have put DoEvents in every subroutine.

I have put a:

B4X:
EventCounter = 0

Do While Not(Done)
   ' (code that does stuff until stuff is done, then Done = True)

   If EventCounter Mod 3 = 0 Then
      If Debug Then Log("DoEvents")
      DoEvents
   EndIf

   EventCounter = EventCounter + 1
Loop

Inside every 'Do Until' and 'Do While' statement

If I ever have an else that might end up empty if the Debug flag is turned-off I put a DoEvents:

B4X:
If something= something then
  ' Do a bunch of stuff
else
  If Debug then Log("such-and-such")
  DoEvents
end if

In every timing event I have put DoEvents in every If / then / else section

I did it via copy/paste and then verified that all 350 subroutines had a DoEvents.

All of the Service module's Subroutines all have almost too many DoEvents scattered throughout (in every loop, in every if/then/else..., before exiting every Sub).

I have copious settings flags which turn-off almost everything (meaning disabling most every timer that might be running in the background) and even when I turn them off, it occurs.

I figure that, somewhere, maybe some infinite loop must be occurring?

What am I missing? Is there a way to see what subroutine or timer the operating system is thinking is locked-up?

How do I debug this problem and determine what is causing it? I've been plagued by it for about a week (been working on the program now since January, and it's proprietary code; so can't post it).
 
Last edited:

stevel05

Expert
Licensed User
Longtime User
somewhere, maybe some infinite loop must be occurring?

Sounds likely, put some identifying logs at the beginning and end of subs that you suspect it may be looping, or start from the beginning of the app and follow it through the process.

Check for subs that may be calling themselves recursively, depending on your naming conventions it could be a simple typo.

It's difficult to suggest anything else without being able to see the code.
 
Upvote 0

TheWind777

Active Member
Licensed User
Longtime User
(
Sounds likely, put some identifying logs at the beginning and end of subs that you suspect it may be looping, or start from the beginning of the app and follow it through the process.

Check for subs that may be calling themselves recursively, depending on your naming conventions it could be a simple typo.

It's difficult to suggest anything else without being able to see the code.

Every single subroutine has a DEBUG_ flag at the front-end (DEBUG_Debugging3 is for lead-in and exit, DEBUG_Debugging1 is what I change them all to after I am done testing specific things; so if I turn on 1, I get EVERYTHING. DEBUG_Debugging2 is if I want an alternate debug, so if I'm debugging two dfferent things at once. DEBUG_Debugging4 is my general-purpose 'debugging current problem').

So, if I turn off all DEBUG flags except 3, I can then let it run and see if each '+++ Begin' matches-up with a '--- End'; but that is tedious because I can't figure out how to make the debugs indent. HMMM. That gives me an idea. If I create a method whereby, somehow, the entry/exit DEBUG Logs indent properly... I would be able to clearly see if ever Enter has a corresponding Exit.

(The Main routine has something like 360 Subroutines and the Overlord Service Module has 31). There are 40 timers; but most of those timers are triggered timers that are turned-off after one or two times through. Only two timers are always running (the TIMER_Quue in the main routine for checking the next timer value and OVERLORD_TIMER_Queue in the Service Module which takes-over when the person goes into Paused mode. Does the same thing as TIMER_Queue does, just when it's paused).

That's an excellent idea.

Now I just have to implement it somehow.

Here's my methodical method (do you know how to make this interface include indents so I don't have to go line-by-line adding indents on the paste? because this interface strips them):

B4X:
Sub TIMER_LockTap_Tick
    Dim NowTicks As Long
    Dim TotalSecs As Double
    Dim Num_Secs_Between_Taps As Double

    If DEBUG_Debugging3 Then Log(" +++ Begin TIMER_LockTap_Tick")

    DisableTIMER(TIMERNUMBER_LockTap)

    If pnlLock.Visible Then

        TotalSecs = 0.32 * LockTap - 0.1

        NowTicks = DateTime.Now
        Num_Secs_Between_Taps = (NowTicks - LOCK_TouchTicks) / 1000
        If DEBUG_Debugging1 Then Log("LockPanel_Click - Num_Secs_Between_Taps = " & Num_Secs_Between_Taps)

        If Num_Secs_Between_Taps > TotalSecs Then
            ' NumSecs has passed. Check to see how many times they tapped in that time.

            If LOCK_Number_of_Taps <= LockTap Then
                If DEBUG_Debugging1 Then Log("TIMER_LockTap_Tick - DIDN'T TAP " & LockTap & " Times in " & TotalSecs & " Seconds. (Tapped " &    LOCK_Number_of_Taps & " times).")
                DoEvents
            Else
                If DEBUG_Debugging1 Then Log("TIMER_LockTap_Tick - DID TAP " & LockTap & " Times in " & TotalSecs & " Seconds. Unlocking...")
                If pnlLock.Visible Then
                    pnlLock.Visible = False
                    DoLock = False
                    WriteSettingsFromGlobals("")
                End If
            End If
        End If
    End If

    LOCK_Number_of_Taps = 1

    DoEvents
    If DEBUG_Debugging3 Then Log(" --- End TIMER_LockTap_Tick")
    If DEBUG_Debugging3 Then Log(" ")
End Sub


So, all Subs always have, at bare minimum:

B4X:
Sub TIMER_LockTap_Tick
    If DEBUG_Debugging3 Then Log(" +++ Begin TIMER_LockTap_Tick")
    ' Code goes here

    DoEvents
    If DEBUG_Debugging3 Then Log(" --- End TIMER_LockTap_Tick")
    If DEBUG_Debugging3 Then Log(" ")
End Sub


That's a good next-step to do. If I come up with a simple indent method that can be used throughout, it will make it very easy to debug things, also.

Thank you. I didn't know WHAT my next step was going to me. You gave it to me.

First step will to replace DoEntry function at the top of every subroutine and a DoExit Sub at the bottom. Time-consuming, but necessary.

Is there a way for the DoEntry function to know what the Subroutine name that it just came from is called? Can I use 'Sender' to find that out (or some function like it?)

... ( Looked it up - and apparently not. Here's a post where Erel replied to a similar request... http://www.b4x.com/android/forum/th...to-the-name-of-the-current-sub.33920/#content Guess I got work to do. ;)

At least now I have a direction, though. Now I got to figure out how to trigger some flag when a return wasn't made???)

Also, the Service Module is running separate from the main module - so it's entries and exits would conflict with the Main routine's entries and exits. Problems! Problems! If I can do it, though, then it will definitely show me (easier) that a routine is stuck.

(Is there another way to tell, is the question. Hmmm. Let me think... ).

Well, it got me thinking already. If any routine wasn't exiting, then it should never be able to continue with the Debug flags, as I currently have it, and it should just stop; which isn't happening.

Huh.

So, what I already have should be stopping and never going forward from there, and that's not happening.

So WHY is the stupid requester popping-up to tell me that the program is stuck (when the program is working perfectly besides the stupid thing popping-up? )

Huh, and double huh.

I even had tried creating another always-runs timer called CARETAKER which looked to see what timers were currently enabled. There were no strange enabled timers which weren't supposed to be currently enabled. The CARETAKER routine caused more problems than it solved, however, so I removed it.

Hmmmm. When a program THIS BIG start giving strange problems such as this - it's always difficult.

Anybody know, exactly, what the operating system is looking at when it determines a thread is stuck?

I remember seeing the list of things and it seemed like a very long period of time (relatively) that the messages weren't being received before the system triggered that error.

The two Queue timers trigger every second. You'd think that just a simple DoEvents on each of the two timers would satisfy the operating system??? One second is not that long a time???

Problems, problems...
 
Last edited:
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Did you see an error in the unfiltered logs as Luca suggested? It should at least narrow down your search.
 
Upvote 0

TheWind777

Active Member
Licensed User
Longtime User
Check the logs as Luca wrote. The threads status is written to an internal log file which you can pull from the device and then understand why it happens.

So, where are the (is the) log file/files found?

I can always build a program which reads in the code file and removes whatever systemic thing when I need to rid myself of them.

Why do I need to? It seems that copious DoEvents are necessary when you have such complexity of timers to keep ones own App, and every other App from having delays.

I ensure that no DoEvent is called more than once every tenth of a second. It seems like that's what makes it happy. To keep too many DoEvents from occurring (in Loops) I add a counter, then do an 'if counter mod 3 = 0 then DoEvents'.

It is a very processor-intensive program. Both main timers basically wait for intricate timing events to occur. They count them down (with notifications if paused, or on each of ten screens if not).

But that, in no way, is all that is occurring. There's also a timer that has to keep checking ScrollPos positions as I save the ScrollPos for all 10 panels, and over 800 different text files. Some method of doing ScrollPos are very awkward because I'm saving the ScrollPos in various different kind of panels (many which don't easily give you the ScrollPosition).

Much of the code is dealing with inadequacies of the Android operating system (with one kind of View you can't get at the ScrollPos, whereas with another you can stream the information easily...

I'm also having to wait for them to click on particular words. That allows them to copy one word to the clipboard, then have it automatically transfer the sentence containing that word to a diary, etc.

So, it is EXTREMELY intricate and delicately-balanced to say the least. Particularly because such things as I just described are nearly impossible to implement in the real -world. The keyboard keeps wanting to pop-up, for example. You know the problems.

However, I have about 50 choices from the Settings page, so I can turn on-or-off almost ALL of the strange functions (which may never be released once it is complete unless they all work on ever operating system).

Thus the need for many intricate DoEvents in very strategic places.

The only problem I have seen with peppering an extreme number of DoEvents around is when you're in the middle of a loop that needs to be fast (like when I'm searching text files for particular sentences given one word it will slow-down the code)...
 
Last edited:
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
I get mad reading the complexity of your code. Are you sure you can not do otherwise?

upload_2014-7-18_1-16-21.png
 
Upvote 0

TheWind777

Active Member
Licensed User
Longtime User
I get mad reading the complexity of your code. Are you sure you can not do otherwise?

View attachment 26403


When you are doing as many things as I am... nope.


So, it gets off the track at:

WIN DEATH: Window is the line where it begins. It occurs right after coming out of my main Queue Timer.

Occurs just after coming out of the timer queue, which doesn't seem to be having problems:

TIMER_Queue_tick - UPCOMING TIMER: Hours from Now... HOURS = 1
TIMER_Queue_tick - UPCOMING TIMER: Minutes from Now... MIN'S = 27
TIMER_Queue_tick - UPCOMING TIMER: Seconds from Now... SEC'S = 51
+++ Begin IntToStr()
--- End IntToStr()
+++ Begin SetCountdownText()
--- End SetCountdownText()
TIMER_Queue_tick - DoEvents #5
TIMER_Queue_tick - DoEvents #7
--- End TIMER_Queue_tick

So, there's an hour 27 minutes and 51 seconds until the next timer event. It sets the countdown text, does two DoEvents, then return from the timer tick and BAM.

I've seen other time where it returned from the Overlord timer tick and BAM.

So, it's occurring after the main time exits.

Anybody understand this junk?

You think my code is confusing? My code talks like English. This is all just garbage. If only these guys had it speak in English. I would love if it talked in verbose English instead of unintelligible garbage language.

B4X:
GC_FOR_ALLOC freed 4640K, 19% free 34081K/41632K, paused 214ms, total 214ms
Force stopping b4a.acim appid=10557 user=-1: uninstall pkg
Killing 4207:b4a.acim/u0a557 (adj 0): stop b4a.acim
Force removing ActivityRecord{423aa2c8 u0 b4a.acim/.main t137}: app died, no saved state
WIN DEATH: Window{42b85030 u0 b4a.acim/b4a.acim.main}
Package b4a.acim codePath changed from /data/app/b4a.acim-1.apk to /data/app/b4a.acim-2.apk; Retaining data and using new
Got RemoteException sending setActive(false) notification to pid 4207 uid 10557
Caught a RuntimeException from the binder stub implementation.
java.lang.NullPointerException
 at android.inputmethodservice.IInputMethodWrapper.setSessionEnabled(IInputMethodWrapper.java:280)
 at com.android.internal.view.IInputMethod$Stub.onTransact(IInputMethod.java:129)
 at android.os.Binder.execTransact(Binder.java:404)
 at dalvik.system.NativeStart.run(Native Method)
Running dexopt on: b4a.acim
DexOpt: load 59ms, verify+opt 321ms, 1284132 bytes
Code path for pkg : b4a.acim changing from /data/app/b4a.acim-1.apk to /data/app/b4a.acim-2.apk
Force stopping b4a.acim appid=10557 user=-1: update pkg
Resource path for pkg : b4a.acim changing from /data/app/b4a.acim-1.apk to /data/app/b4a.acim-2.apk
Force stopping b4a.acim appid=10557 user=0: pkg removed
Notified by action android.intent.action.PACKAGE_REMOVED to invalidate app cache
Start proc com.antutu.powersaver for broadcast com.antutu.powersaver/cn.dm.download.DownloadBroadcastReceiver: pid=5130 uid=10263 gids={50263, 3003, 3002, 3001, 1028, 1015}
Reconfiguring input devices.  changes=0x00000010
GC_EXPLICIT freed 157K, 4% free 9169K/9460K, paused 1ms+2ms, total 46ms
Notified by action android.intent.action.PACKAGE_ADDED to invalidate app cache
Notified by action android.intent.action.PACKAGE_REPLACED to invalidate app cache
Reconfiguring input devices.  changes=0x00000010
Unable to load service info ResolveInfo{4369d3f8 com.gau.go.launcherex.gowidget.emailwidget/.exchange.EasAuthenticatorService m=0x108000}
org.xmlpull.v1.XmlPullParserException: No android.accounts.AccountAuthenticator meta-data
 at android.content.pm.RegisteredServicesCache.parseServiceInfo(RegisteredServicesCache.java:440)
 at android.content.pm.RegisteredServicesCache.generateServicesMap(RegisteredServicesCache.java:305)
 at android.content.pm.RegisteredServicesCache.access$100(RegisteredServicesCache.java:70)
 at android.content.pm.RegisteredServicesCache$1.onReceive(RegisteredServicesCache.java:148)
 at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:759)
 at android.os.Handler.handleCallback(Handler.java:733)
 at android.os.Handler.dispatchMessage(Handler.java:95)
 at android.os.Looper.loop(Looper.java:136)


 at com.android.server.ServerThread.initAndLoop(SystemServer.java:1093)
 at com.android.server.SystemServer.main(SystemServer.java:1179)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:515)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
 at dalvik.system.NativeStart.main(Native Method)
Reconfiguring input devices.  changes=0x00000010
GC_CONCURRENT freed 788K, 9% free 10269K/11188K, paused 2ms+2ms, total 21ms
WAIT_FOR_CONCURRENT_GC blocked 18ms
GC_CONCURRENT freed 785K, 12% free 9885K/11188K, paused 2ms+1ms, total 17ms
Killing 4519:com.android.musicfx/u0a42 (adj 15): empty #17
Start proc com.p_soft.sysmon for broadcast com.p_soft.sysmon/.SysMonBroadcastReceiver: pid=5150 uid=10300 gids={50300, 3003}
Start proc android.process.acore for broadcast com.android.providers.contacts/.PackageIntentReceiver: pid=5162 uid=10000 gids={50000, 3003, 1028, 1015}
Killing 4570:eu.chainfire.supersu/u0a69 (adj 15): empty #17
GC_CONCURRENT freed 1K, 9% free 10285K/11188K, paused 2ms+1ms, total 18ms
Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:b4a.acim flg=0x4000010 (has extras) }
Unable to load service info ResolveInfo{438ae748 com.gau.go.launcherex.gowidget.emailwidget/.exchange.EasAuthenticatorService m=0x108000}
org.xmlpull.v1.XmlPullParserException: No android.accounts.AccountAuthenticator meta-data
 at android.content.pm.RegisteredServicesCache.parseServiceInfo(RegisteredServicesCache.java:440)
 at android.content.pm.RegisteredServicesCache.generateServicesMap(RegisteredServicesCache.java:305)
 at android.content.pm.RegisteredServicesCache.access$100(RegisteredServicesCache.java:70)
 at android.content.pm.RegisteredServicesCache$1.onReceive(RegisteredServicesCache.java:148)
 at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:759)
 at android.os.Handler.handleCallback(Handler.java:733)
 at android.os.Handler.dispatchMessage(Handler.java:95)
 at android.os.Looper.loop(Looper.java:136)
 at com.android.server.ServerThread.initAndLoop(SystemServer.java:1093)
 at com.android.server.SystemServer.main(SystemServer.java:1179)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:515)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
 at dalvik.system.NativeStart.main(Native Method)
Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:b4a.acim flg=0x4000010 (has extras) }
removePackageParticipantsLocked: uid=10557 #1
addPackageParticipantsLocked: #1
GC_CONCURRENT freed 270K, 4% free 9220K/9524K, paused 1ms+3ms, total 18ms
GC_EXPLICIT freed 6053K, 18% free 34323K/41632K, paused 10ms+32ms, total 316ms
WAIT_FOR_CONCURRENT_GC blocked 65ms
WAIT_FOR_CONCURRENT_GC blocked 65ms
Killing 4775:com.google.android.apps.magazines/u0a38 (adj 15): empty #17
Shutting down VM
GC_CONCURRENT freed 95K, 16% free 560K/660K, paused 0ms+0ms, total 2ms
Start proc com.android.musicfx for broadcast com.android.musicfx/.Compatibility$Receiver: pid=5176 uid=10042 gids={50042, 3003, 3002}
AddressBook Labels [en_US]: [, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Α, Β, Γ, Δ, Ε, Ζ, Η, Θ, Ι, Κ, Λ, Μ, Ν, Ξ, Ο, Π, Ρ, Σ, Τ, Υ, Φ, Χ, Ψ, Ω, , А, Б, В, Г, Д, Е, Є, Ж, З, И, І, Ї, Й, К, Л, М, Н, О, П, Р, С, Т, У, Ф, Х, Ц, Ч, Ш, Щ, Ю, Я, , א, ב, ג, ד, ה, ו, ז, ח, ט, י, כ, ל, מ, נ, ס, ע, פ, צ, ק, ר, ש, ת, , ا, ب, ت, ث, ج, ح, خ, د, ذ, ر, ز, س, ش, ص, ض, ط, ظ, ع, غ, ف, ق, ك, ل, م, ن, ه, و, ي, , ก, ข, ฃ, ค, ฅ, ฆ, ง, จ, ฉ, ช, ซ, ฌ, ญ, ฎ, ฏ, ฐ, ฑ, ฒ, ณ, ด, ต, ถ, ท, ธ, น, บ, ป, ผ, ฝ, พ, ฟ, ภ, ม, ย, ร, ฤ, ล, ฦ, ว, ศ, ษ, ส, ห, ฬ, อ, ฮ, , ㄱ, ㄴ, ㄷ, ㄹ, ㅁ, ㅂ, ㅅ, ㅇ, ㅈ, ㅊ, ㅋ, ㅌ, ㅍ, ㅎ, , あ, か, さ, た, な, は, ま, や, ら, わ, #, ]


Start proc com.android.keychain for broadcast com.android.keychain/.KeyChainBroadcastReceiver: pid=5190 uid=1000 gids={41000, 1028, 1015, 3002, 3001, 3003}
Killing 4813:com.ebay.mobile/u0a581 (adj 15): empty #17
GC_EXPLICIT freed 41K, 1% free 8985K/9060K, paused 1ms+2ms, total 20ms
GC_EXPLICIT freed <1K, 1% free 8985K/9060K, paused 1ms+2ms, total 17ms
Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1487 android.content.ContextWrapper.startService:494 android.content.ContextWrapper.startService:494 com.android.keychain.KeyChainBroadcastReceiver.onReceive:12 android.app.ActivityThread.handleReceiver:2407 
GC_EXPLICIT freed <1K, 1% free 8986K/9060K, paused 1ms+2ms, total 17ms
Start proc jp.co.omronsoft.iwnnime.ml for broadcast jp.co.omronsoft.iwnnime.ml/.UninstallReceiver: pid=5203 uid=10064 gids={50064}
Killing 4848:stericson.busybox/u0a75 (adj 15): empty #17
Start proc eu.chainfire.supersu for broadcast eu.chainfire.supersu/.InstallReceiver: pid=5216 uid=10069 gids={50069}
Killing 4862:com.abc.abcnews/u0a540 (adj 15): empty #17
Start proc com.google.android.apps.docs for broadcast com.google.android.apps.docs/.receivers.AppPackageAddRemoveReceiver: pid=5231 uid=10056 gids={50056, 3003, 1028, 1015}
GC_CONCURRENT freed 197K, 3% free 9291K/9520K, paused 2ms+3ms, total 24ms
GC_CONCURRENT freed 326K, 4% free 9076K/9440K, paused 2ms+2ms, total 27ms
GC_CONCURRENT freed 339K, 4% free 9431K/9800K, paused 1ms+3ms, total 23ms
GC_CONCURRENT freed 332K, 4% free 9579K/9944K, paused 2ms+1ms, total 18ms
Killing 4887:com.pandora.android/u0a148 (adj 15): empty #17
GC_CONCURRENT freed 349K, 4% free 9702K/10084K, paused 1ms+2ms, total 17ms

>>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
CheckJNI is OFF
Trying to load lib libjavacore.so 0x0
Added shared lib libjavacore.so 0x0
Trying to load lib libnativehelper.so 0x0
Added shared lib libnativehelper.so 0x0
No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
GC_CONCURRENT freed 291K, 4% free 9911K/10236K, paused 1ms+4ms, total 25ms
Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
Received broadcast action=android.intent.action.PACKAGE_REMOVED and uri=b4a.acim
Thread[main,5,main]: Need to call initialize() and be in fallback mode to start dispatch.
Start proc com.google.android.gms.drive for broadcast com.google.android.gms/.drive.api.DriveSystemBroadcastReceiver: pid=5306 uid=10021 gids={50021, 3003, 1007, 1028, 1015, 3002, 3001, 3007, 2001, 3006}
GC_CONCURRENT freed 264K, 3% free 10079K/10376K, paused 1ms+4ms, total 34ms
install
MultiDexExtractor.load(/data/app/com.google.android.gms-2.apk, false)
loading existing secondary dex files
load found 1 secondary dex files
install done
Insert disabled by gate 'gms:security:enable_conscrypt_in_gms_application'
Start proc com.google.android.apps.plus for broadcast com.google.android.apps.plus/.service.PackagesMediaMonitor: pid=5324 uid=10050 gids={50050, 3003, 3002, 1028, 1015}
Killing 4701:com.SketchGuruArtistPicturePhotoDrawShare:aviary_system_receiver/u0a230 (adj 15): empty #17
Calling main entry com.android.commands.am.Am
Trying to load lib /data/app-lib/com.google.android.apps.plus-1/libcrashreporter.so 0x41e96978
Added shared lib /data/app-lib/com.google.android.apps.plus-1/libcrashreporter.so 0x41e96978
Shutting down VM
START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=b4a.acim/.main} from pid 5265
GC_CONCURRENT freed 96K, 15% free 586K/684K, paused 0ms+0ms, total 2ms
Start proc b4a.acim for activity b4a.acim/.main: pid=5341 uid=10557 gids={50557, 3003, 1028, 1015, 3002, 3001}
GC_CONCURRENT freed 261K, 4% free 9173K/9468K, paused 3ms+3ms, total 21ms
Start proc xcxin.filexpert for broadcast xcxin.filexpert/.receiver.PackageActionReceiver: pid=5355 uid=10399 gids={50399, 3003, 3002, 3001, 1028, 1015}
method Lorg/holoeverywhere/LayoutInflater;.createViewFromTag incorrectly overrides package-private method with same name in Landroid/view/LayoutInflater;


method Lorg/holoeverywhere/LayoutInflater;.rInflate incorrectly overrides package-private method with same name in Landroid/view/LayoutInflater;
method Lorg/holoeverywhere/widget/LinearLayout;.drawDividersHorizontal incorrectly overrides package-private method with same name in Landroid/widget/LinearLayout;
method Lorg/holoeverywhere/widget/LinearLayout;.drawDividersVertical incorrectly overrides package-private method with same name in Landroid/widget/LinearLayout;
method Lorg/holoeverywhere/widget/LinearLayout;.drawHorizontalDivider incorrectly overrides package-private method with same name in Landroid/widget/LinearLayout;
method Lorg/holoeverywhere/widget/LinearLayout;.drawVerticalDivider incorrectly overrides package-private method with same name in Landroid/widget/LinearLayout;
method Lorg/holoeverywhere/widget/LinearLayout;.getChildrenSkipCount incorrectly overrides package-private method with same name in Landroid/widget/LinearLayout;
method Lorg/holoeverywhere/widget/LinearLayout;.getLocationOffset incorrectly overrides package-private method with same name in Landroid/widget/LinearLayout;
method Lorg/holoeverywhere/widget/LinearLayout;.getNextLocationOffset incorrectly overrides package-private method with same name in Landroid/widget/LinearLayout;
method Lorg/holoeverywhere/widget/LinearLayout;.getVirtualChildAt incorrectly overrides package-private method with same name in Landroid/widget/LinearLayout;
method Lorg/holoeverywhere/widget/LinearLayout;.getVirtualChildCount incorrectly overrides package-private method with same name in Landroid/widget/LinearLayout;
method Lorg/holoeverywhere/widget/LinearLayout;.measureChildBeforeLayout incorrectly overrides package-private method with same name in Landroid/widget/LinearLayout;
method Lorg/holoeverywhere/widget/LinearLayout;.measureHorizontal incorrectly overrides package-private method with same name in Landroid/widget/LinearLayout;
method Lorg/holoeverywhere/widget/LinearLayout;.measureNullChild incorrectly overrides package-private method with same name in Landroid/widget/LinearLayout;
method Lorg/holoeverywhere/widget/LinearLayout;.measureVertical incorrectly overrides package-private method with same name in Landroid/widget/LinearLayout;
method Lorg/holoeverywhere/widget/ListView;.createContextMenuInfo incorrectly overrides package-private method with same name in Landroid/widget/AbsListView;
method Lorg/holoeverywhere/widget/ListView;.drawDivider incorrectly overrides package-private method with same name in Landroid/widget/ListView;
method Lorg/holoeverywhere/widget/ListView;.invokeOnItemScrollListener incorrectly overrides package-private method with same name in Landroid/widget/AbsListView;
method Lorg/holoeverywhere/widget/ListView;.reportScrollStateChange incorrectly overrides package-private method with same name in Landroid/widget/AbsListView;
<qeglDrvAPI_eglInitialize:320>: EGL 1.4 QUALCOMM Build: I0404c4692afb8623f95c43aeb6d5e13ed4b30ddbDate: 11/06/13
Registering ActionBarSherlockCompat with qualifier @com.actionbarsherlock.ActionBarSherlock$Implementation(api=7, dpi=-1)
Registering ActionBarSherlockNative with qualifier @com.actionbarsherlock.ActionBarSherlock$Implementation(api=14, dpi=-1)
Registering AddonSherlock$HoloActionBarSherlockNative with qualifier @com.actionbarsherlock.ActionBarSherlock$Implementation(api=14, dpi=-1)
Registering AddonSherlock$HoloActionBarSherlockCompat with qualifier @com.actionbarsherlock.ActionBarSherlock$Implementation(api=7, dpi=-1)
GC_CONCURRENT freed 229K, 3% free 9395K/9656K, paused 3ms+3ms, total 19ms
Enabling debug mode 0
GC_FOR_ALLOC freed 120K, 2% free 9058K/9212K, paused 19ms, total 19ms
Grow heap (frag case) to 9.958MB for 1136622-byte allocation
GC_FOR_ALLOC freed 0K, 2% free 10168K/10324K, paused 11ms, total 11ms
GC_CONCURRENT freed 133K, 2% free 9272K/9436K, paused 3ms+2ms, total 17ms
Switching to real app window: Window{42d147c0 u0 b4a.acim/b4a.acim.main}


GC_CONCURRENT freed 1K, 2% free 10184K/10324K, paused 5ms+1ms, total 26ms
GC_CONCURRENT freed 345K, 4% free 9596K/9984K, paused 6ms+3ms, total 39ms
GC_CONCURRENT freed 482K, 6% free 9308K/9824K, paused 1ms+1ms, total 16ms
GC_CONCURRENT freed 279K, 4% free 10297K/10708K, paused 2ms+2ms, total 15ms
Displayed b4a.acim/.main: +300ms (total +1m28s573ms)
Killing 4725:larry.zou.colorfullife:feather_system_receiver/u0a449 (adj 15): empty #17
GC_FOR_ALLOC freed 128K, 4% free 10361K/10708K, paused 13ms, total 13ms
Grow heap (frag case) to 10.426MB for 294346-byte allocation
GC_FOR_ALLOC freed 191K, 5% free 10456K/10996K, paused 13ms, total 13ms
GC_FOR_ALLOC freed <1K, 5% free 10456K/10996K, paused 10ms, total 10ms
Grow heap (frag case) to 10.660MB for 441514-byte allocation
GC_CONCURRENT freed 287K, 8% free 10600K/11428K, paused 3ms+4ms, total 18ms
WAIT_FOR_CONCURRENT_GC blocked 15ms
GC_FOR_ALLOC freed <1K, 8% free 10600K/11428K, paused 11ms, total 11ms
Grow heap (frag case) to 11.010MB for 662266-byte allocation
GC_FOR_ALLOC freed 431K, 11% free 10816K/12076K, paused 13ms, total 13ms
GC_CONCURRENT freed <1K, 11% free 10816K/12076K, paused 3ms+1ms, total 14ms
GC_CONCURRENT freed 723K, 12% free 10685K/12076K, paused 4ms+1ms, total 14ms
GC_CONCURRENT freed 307K, 11% free 10839K/12076K, paused 2ms+2ms, total 14ms
GC_FOR_ALLOC freed 191K, 10% free 10935K/12076K, paused 10ms, total 10ms
GC_FOR_ALLOC freed 287K, 9% free 11078K/12076K, paused 11ms, total 11ms
Grow heap (frag case) to 11.478MB for 662266-byte allocation
GC_CONCURRENT freed 431K, 12% free 11294K/12724K, paused 6ms+1ms, total 18ms
WAIT_FOR_CONCURRENT_GC blocked 15ms
WAIT_FOR_CONCURRENT_GC blocked 2ms
GC_CONCURRENT freed 1798K, 20% free 10204K/12724K, paused 1ms+2ms, total 11ms
GC_CONCURRENT freed 36K, 17% free 10679K/12724K, paused 1ms+2ms, total 15ms
WAIT_FOR_CONCURRENT_GC blocked 3ms
GC_CONCURRENT freed 756K, 18% free 10491K/12724K, paused 1ms+2ms, total 18ms
WAIT_FOR_CONCURRENT_GC blocked 9ms
GC_CONCURRENT freed 133K, 15% free 10870K/12724K, paused 1ms+1ms, total 19ms
WAIT_FOR_CONCURRENT_GC blocked 9ms
GC_CONCURRENT freed 151K, 11% free 11350K/12724K, paused 1ms+2ms, total 20ms
WAIT_FOR_CONCURRENT_GC blocked 10ms
GC_CONCURRENT freed 190K, 7% free 11951K/12724K, paused 1ms+4ms, total 31ms
WAIT_FOR_CONCURRENT_GC blocked 21ms
GC_FOR_ALLOC freed 383K, 4% free 12360K/12852K, paused 23ms, total 23ms
GC_FOR_ALLOC freed 366K, 6% free 12538K/13332K, paused 29ms, total 29ms
Grow heap (frag case) to 12.693MB for 441514-byte allocation
GC_FOR_ALLOC freed 287K, 8% free 12682K/13764K, paused 31ms, total 31ms
GC_FOR_ALLOC freed 42K, 8% free 12699K/13764K, paused 30ms, total 30ms
Grow heap (frag case) to 13.060MB for 662266-byte allocation
GC_FOR_ALLOC freed 431K, 11% free 12914K/14412K, paused 41ms, total 41ms
BEGIN Process_Globals - %%% MEMORY_FreeBytesAtStart = 191749008
GC_FOR_ALLOC freed 3787K, 30% free 10201K/14412K, paused 20ms, total 20ms
GC_FOR_ALLOC freed 191K, 29% free 10297K/14412K, paused 12ms, total 12ms
GC_CONCURRENT freed 287K, 28% free 10441K/14412K, paused 2ms+2ms, total 26ms

then finally comes back.

Looks like there's something happening with a null pointer, somewhere. Wonder why I'm not getting an error about it. That would be nice to know what line that's occurring on.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
you should never use an infinite do loop till a state changes, use a timer instead

B4X:
sub timer1_tick
if not(done) then
 'do your stuff
else
 timer1.enabled=false
end if
end sub
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Normally a programming language has a true debugging mode. This doesn't.

What are you expecting that is not available? The Legacy and rapid debug modes both allow step debugging by line.
 
Upvote 0

TheWind777

Active Member
Licensed User
Longtime User
I get mad reading the complexity of your code. Are you sure you can not do otherwise?

View attachment 26403


Well, the problem seems to be related to when the timer routine updates ten different EditText boxes on ten different panels.

It's the simplest of routines:

B4X:
Dim  CountdownArray() As  EditText
CountdownArray = Array As EditText(EditTextWBCountdown,EditTextWBTOCCountdown,EditTextACIMCountdown,EditTextACIMTOCCountdown,EditTextRTCountdown,EditTextSettingsCountdown,EditTextHelpOrTutorCountdown,EditTextHelpOrTutorCountdown,EditTextLinksCountdown,EditTextAboutCountdown,EditTextQueueCountdown)

B4X:
Sub SetCountdownText(TheText As String)

Dim z As Int 
    For z = 1 To PanelNum
        CountdownArray(z).Text = TheText

        If z Mod 3 = 0 Then DoEvents
    Next
End Sub

And, the unfiltered logs. I have strictmode turned-on... could that be the problem? (It had been recommended, one time)

B4X:
--- End IntToStr()

+++ Begin SetCountdownText()

StrictMode policy violation; ~duration=1 ms: android.os.StrictMode$StrictModeNetworkViolation: policy=31 violation=4

at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1151)

at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:163)

at libcore.io.IoBridge.recvfrom(IoBridge.java:506)

at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)

at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)

at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)

at java.io.InputStream.read(InputStream.java:162)

at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:142)

at java.io.BufferedInputStream.read(BufferedInputStream.java:227)

at java.io.DataInputStream.readByte(DataInputStream.java:75)

at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:225)

at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)

at java.lang.reflect.Method.invokeNative(Native Method)

at java.lang.reflect.Method.invoke(Method.java:515)

at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)

at anywheresoftware.b4a.objects.Timer$TickTack.run(Timer.java:105)

at android.os.Handler.handleCallback(Handler.java:733)

at android.os.Handler.dispatchMessage(Handler.java:95)

at anywheresoftware.b4a.Msgbox.waitForMessage(Msgbox.java:197)

at anywheresoftware.b4a.Msgbox.waitForMessage(Msgbox.java:166)

at anywheresoftware.b4a.keywords.Common.DoEvents(Common.java:380)

at java.lang.reflect.Method.invokeNative(Native Method)

at java.lang.reflect.Method.invoke(Method.java:515)

at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:485)

at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:232)

at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)

at java.lang.reflect.Method.invokeNative(Native Method)

at java.lang.reflect.Method.invoke(Method.java:515)

at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)

at anywheresoftware.b4a.objects.Timer$TickTack.run(Timer.java:105)

at android.os.Handler.handleCallback(Handler.java:733)

at android.os.Handler.dispatchMessage(Handler.java:95)

at android.os.Looper.loop(Looper.java:136)

at android.app.ActivityThread.main(ActivityThread.java:5001)

at java.lang.reflect.Method.invokeNative(Native Method)

at java.lang.reflect.Method.invoke(Method.java:515)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)

at dalvik.system.NativeStart.main(Native Method)

+++ Begin TIMER_CheckCursor_tick

VM exiting with result code 0, cleanup skipped.

Process b4a.acim (pid 7926) has died.

WIN DEATH: Window{42e54188 u0 b4a.acim/b4a.acim.main}

WIN DEATH: Window{42e81a28 u0 b4a.acim/b4a.acim.main}

Got RemoteException sending setActive(false) notification to pid 7926 uid 10557

Caught a RuntimeException from the binder stub implementation.

java.lang.NullPointerException

at android.inputmethodservice.IInputMethodWrapper.setSessionEnabled(IInputMethodWrapper.java:280)

at com.android.internal.view.IInputMethod$Stub.onTransact(IInputMethod.java:129)

at android.os.Binder.execTransact(Binder.java:404)

at dalvik.system.NativeStart.run(Native Method)
 
Upvote 0

TheWind777

Active Member
Licensed User
Longtime User
you should never use an infinite do loop till a state changes, use a timer instead

B4X:
sub timer1_tick
if not(done) then
'do your stuff
else
timer1.enabled=false
end if
end sub

Where am I using an infinite do loop? I have 40 timers, so I know that concept.
 
Upvote 0

TheWind777

Active Member
Licensed User
Longtime User
What are you expecting that is not available? The Legacy and rapid debug modes both allow step debugging by line.

That would be great. All I see is a drop-down choice. There's some sort of preferences setting for the debugger? Usually step-by-step debugging or the setting of a certain range to enter step-by-step debugging is a menu choice. How do I define the beginning and end debug areas?
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Change the option in the dropdown, then set a breakpoint on the line you want by clicking in the left hand gutter. You should see a red circle.


upload_2014-7-18_15-55-12.png
 
Upvote 0

TheWind777

Active Member
Licensed User
Longtime User
Change the option in the dropdown, then set a breakpoint on the line you want by clicking in the left hand gutter. You should see a red circle.


View attachment 26416

Oooh, ahhhh...

That's superb (and I have never used the word superb in my life...) That will be SO helpful.

Is there a way to turn OFF the Debug? By putting a second red circle, for example?
 
Upvote 0
Top