Android Question Rapid Debugger Fails on every Android device!!!

artsoft

Active Member
Licensed User
Longtime User
Hi Folks!

- I updated to new version 5.80 .... ok
- I updated to new Android SDK .... ok
- I loaded my app code in B4a ..... ok
- I compiled my app and started my app on smartphone ...... ok!
- I switched to debugger (legacy) ..... started my app on smartphone : ok!
- I switched to debugger (rapid) ....... and try do start the app on smartphone (or tab) ... NOT OK!!! .... always the same result: I see the short message on smartphone or tab: "Waiting for IDE debugger..." ....... a few seconds later: message disappears, info windows in B4A disappears, logout windows empty. Nothing more!!!!

So, whats wrong!?
Who can help me please?

Thx in advance and best regards
ARTSOFT :)
 

artsoft

Active Member
Licensed User
Longtime User
Hi Erel!

Yes! I tested with Java 6, 7 and 8.

So currently 8 is running: C:\Program Files (x86)\Java\jdk1.8.0_73

I tested now on my own smartphone (GALAXY S3), on my own tab (TrekStore breeze 7.0 quadcore) and on a new Genymotion instance (a virtual device). All devices are in USB-Debug-Mode of course!!

My test: I wrote a little app with 1 button. By clicking this button, the app should end (--> Activity.Finish). Thats a very simple example!

Result:

- Runtime version runs ok
- legacy debugger runs ok
- But no way to run the rapid debugger on each device!!!

And I need the rapid debug mode of course for RAD (rapid application development). Thats really strange. Currently I develop a password manager app. And there is no development possible currently. Thats not funny :-(

I use B4A since 2014 and I love your application. I am also a Java and a C++ developer for web apps (Apache Tomcat based).

But this effect with the rapid debugger is very strange.

What can I do?
Do you have any ideas?
Has anybody an idea?

Thank you all in advance!

Regards
artsoft
 
Upvote 0

artsoft

Active Member
Licensed User
Longtime User
I set unfiltered log to ON while testing on my virtual device (GenyMotion instance):

>>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
CheckJNI is OFF
Unable to stat classpath element '/system/framework/filterfw.jar'
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
Calling main entry com.android.commands.pm.Pm
No content provider found for permission revoke: file:///data/local/tmp/TestApp_RAPID_DEBUG.apk
No content provider found for permission revoke: file:///data/local/tmp/TestApp_RAPID_DEBUG.apk
Running dexopt on: b4a.example
Unable to stat classpath element '/system/framework/filterfw.jar'
DexOpt: load 28ms, verify+opt 60ms, 867284 bytes
Force stopping package b4a.example uid=10050
New package installed in /data/app/b4a.example-1.apk
generateServicesMap(android.accounts.AccountAuthenticator): 2 services unchanged
Reconfiguring input devices. changes=0x00000010
generateServicesMap(android.content.SyncAdapter): 4 services unchanged
Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:b4a.example flg=0x8000010 (has extras) }
GC_CONCURRENT freed 873K, 7% free 16994K/18119K, paused 72ms+4ms, total 100ms
WAIT_FOR_CONCURRENT_GC blocked 44ms
addPackageParticipantsLocked: #1
WAIT_FOR_CONCURRENT_GC blocked 56ms
GC_EXPLICIT freed 409K, 8% free 16780K/18119K, paused 8ms+4ms, total 40ms
WAIT_FOR_CONCURRENT_GC blocked 108ms
WAIT_FOR_CONCURRENT_GC blocked 108ms
WAIT_FOR_CONCURRENT_GC blocked 108ms
WAIT_FOR_CONCURRENT_GC blocked 104ms
WAIT_FOR_CONCURRENT_GC blocked 104ms
WAIT_FOR_CONCURRENT_GC blocked 96ms
WAIT_FOR_CONCURRENT_GC blocked 96ms
Loaded meta-data for 1 account types, 0 accounts in 208ms(wall) 2ms(cpu)
Shutting down VM
GC_CONCURRENT freed 96K, 90% free 445K/4096K, paused 0ms+0ms, total 4ms
setLoadOnResume
NOTE: attach of thread 'Binder_3' failed
Nobody to tell about the new app. Launcher is probably loading.
GC_CONCURRENT freed 1492K, 35% free 15706K/23815K, paused 4ms+0ms, total 12ms
Failure getting entry for 0x7f060000 (t=5 e=0) in package 0 (error -75)
Failure getting entry for 0x7f060000 (t=5 e=0) in package 0 (error -75)
Found no subtypes in a system IME: com.android.inputmethod.pinyin
no available voice recognition services found
>>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
CheckJNI is OFF
Unable to stat classpath element '/system/framework/filterfw.jar'
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
Calling main entry com.android.commands.am.Am
START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=b4a.example/.main u=0} from pid 1976
readFully was waiting for 764896 bytes, got 375220
readFully was waiting for 389676 bytes, got 16192
readFully was waiting for 373484 bytes, got 16192
readFully was waiting for 357292 bytes, got 16192
readFully was waiting for 341100 bytes, got 16192
readFully was waiting for 324908 bytes, got 16192
readFully was waiting for 308716 bytes, got 16192
readFully was waiting for 292524 bytes, got 16192
readFully was waiting for 276332 bytes, got 16192
readFully was waiting for 260140 bytes, got 16192
readFully was waiting for 243948 bytes, got 16192
readFully was waiting for 227756 bytes, got 16192
readFully was waiting for 211564 bytes, got 16192
readFully was waiting for 195372 bytes, got 16192
readFully was waiting for 179180 bytes, got 16192
readFully was waiting for 162988 bytes, got 16192
readFully was waiting for 146796 bytes, got 16192
readFully was waiting for 130604 bytes, got 16192
readFully was waiting for 114412 bytes, got 16192
readFully was waiting for 98220 bytes, got 16192
readFully was waiting for 82028 bytes, got 16192
readFully was waiting for 65836 bytes, got 16192
readFully was waiting for 49644 bytes, got 16192
readFully was waiting for 33452 bytes, got 16192
readFully was waiting for 17260 bytes, got 4264
GC_FOR_ALLOC freed 108K, 7% free 16913K/18119K, paused 32ms, total 32ms
onPause: false
Shutting down VM
GC_CONCURRENT freed 97K, 89% free 475K/4096K, paused 0ms+0ms, total 4ms
NOTE: attach of thread 'Binder_3' failed
Start proc b4a.example for activity b4a.example/.main: pid=1987 uid=10050 gids={3003, 1015, 1028}
TextureCache::flush: target size: 664780
TextureCache::callback: name, removed size, mSize = 2, 9216, 1098752
TextureCache::callback: name, removed size, mSize = 4, 36864, 1061888
TextureCache::callback: name, removed size, mSize = 1, 1048576, 13312
loaded /system/lib/egl/libEGL_genymotion.so
HostConnection::get() New Host Connection established 0xb9257db8, tid 1987
loaded /system/lib/egl/libGLESv1_CM_genymotion.so
loaded /system/lib/egl/libGLESv2_genymotion.so
eglSurfaceAttrib not implementedEnabling debug mode 0
TextureCache::get: create texture(0xb924b898): name, size, mSize = 1, 1048576, 1048576
TextureCache::get: create texture(0xb923c1f0): name, size, mSize = 2, 9216, 1057792
TextureCache::get: create texture(0xb92442f0): name, size, mSize = 4, 82944, 1140736
Displayed b4a.example/.main: +2s220ms
Launch timeout has expired, giving up wake lock!
Activity idle timeout for ActivityRecord{537a794c b4a.example/.main}
No longer want com.android.providers.calendar (pid 747): hidden #16
java.net.SocketTimeoutException
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:108)
at java.net.ServerSocket.implAccept(ServerSocket.java:202)
at java.net.ServerSocket.accept(ServerSocket.java:127)
at anywheresoftware.b4a.shell.ShellConnector.connect(ShellConnector.java:152)
at anywheresoftware.b4a.shell.ShellConnector.run(ShellConnector.java:119)
at java.lang.Thread.run(Thread.java:856)
Caused by: libcore.io.ErrnoException: accept failed: EAGAIN (Try again)
at libcore.io.Posix.accept(Native Method)
at libcore.io.BlockGuardOs.accept(BlockGuardOs.java:55)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:98)
... 5 more
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.shell.Shell.stopProgram(Shell.java:175)
at anywheresoftware.b4a.shell.Shell.connectionStatus(Shell.java:114)
at anywheresoftware.b4a.shell.ShellConnector.run(ShellConnector.java:135)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.NullPointerException
at b4a.example.main.killProgram(main.java:336)
... 6 more
GC_CONCURRENT freed 122K, 3% free 11018K/11271K, paused 28ms+12ms, total 56ms
VM exiting with result code 0, cleanup skipped.
Process b4a.example (pid 1987) has died.
Scheduling restart of crashed service b4a.example/.starter in 21394ms
Force removing ActivityRecord{537a794c b4a.example/.main}: app died, no saved state
WIN DEATH: Window{5384c200 b4a.example/b4a.example.main paused=false}
eglSurfaceAttrib not implemented
Got RemoteException sending setActive(false) notification to pid 1987 uid 10050
TextureCache::get: create texture(0xb924b898): name, size, mSize = 45, 1048576, 1061888
TextureCache::get: create texture(0xb923c1f0): name, size, mSize = 46, 9216, 1071104
TextureCache::get: create texture(0xb924fa90): name, size, mSize = 48, 36864, 1107968Received Set Clipboard
Received Set Clipboard
Got clipboard for user=0

I hope this helps!

Regards
ARTsoft
 
Upvote 0

artsoft

Active Member
Licensed User
Longtime User
Additional info:

This is my manifest:

'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136

AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)

SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")

'End of default text.
 
Upvote 0

artsoft

Active Member
Licensed User
Longtime User
I had a little error in my little programm = The loading of the layout was missing!

So now, i can present my little programm:


#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region

#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region

Sub Process_Globals
End Sub

Sub Globals
Private Button1 As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)

Activity.LoadLayout("Main")
End Sub

Sub Activity_Resume
End Sub

Sub Activity_Pause (UserClosed As Boolean)
End Sub

Sub Button1_Click

Activity.Finish
End Sub


I tested now on my real smartphone (Samsung G S3)!

Result: See log.zip!

Thx all!

Regards
ARTSOFT
 

Attachments

  • log.zip
    47 KB · Views: 217
Upvote 0

artsoft

Active Member
Licensed User
Longtime User
Where can I find this log content?

You see the screenshot: the log win is empty (before and after the rapid debugger). The debugger never run if I choose the rapid mode.

My anti virus app is disabled (see also the screenshot for this).

Strange, isn't it?

Regards ARTsoft
 

Attachments

  • TestApp - B4A.png
    TestApp - B4A.png
    46.9 KB · Views: 283
  • screenshot_antivirus.png
    screenshot_antivirus.png
    29 KB · Views: 224
Upvote 0

artsoft

Active Member
Licensed User
Longtime User
The link helped, thx a lot!

This is the log.txt content:

B4A version: 5.80
.Net version: 4.0.30319.34209
B4XClassifer created
B4XErrorTagger created
B4XClassifer created
B4XErrorTagger created
Gui: 1014
*** no reuse ***
*** no reuse ***
Gui: 968
Gui: 93
B4XClassifer created
B4XErrorTagger created
B4XClassifer created
B4XErrorTagger created
*** no reuse ***
*** no reuse ***
Gui: 132
Compilation task: 234.003
ExitCode: 0
Output:
jar signed.
Warning:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2049-03-25) or after any future revocation date.

Error:

Gui: 80
optimizedDex receive: 33
OptimizedDexer exitCode=0
Optimized worked...
Compilation task: 27958.9861

Trying to connect to port: 59712
LogCat process: 176
Gui: 153

Trying to connect to port: 59829

Trying to connect to port: 59712
Trying to connect to port: 59829
Trying to connect to port: 59712


RD e: java.net.SocketTimeoutException: Accept timed out
RD e: at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
RD e: at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:135)
RD e: at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
RD e: at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
RD e: at java.net.ServerSocket.implAccept(ServerSocket.java:545)
RD e: at java.net.ServerSocket.accept(ServerSocket.java:513)
RD e: at anywheresoftware.b4a.DebugConnector.mainLoop(DebugConnector.java:92)
RD e: at anywheresoftware.b4a.DebugConnector.run(DebugConnector.java:54)
RD e: at java.lang.Thread.run(Thread.java:745)
RD: exit
ExitCode: 0
Output:

Error:

Gui: 65
OptimizedDexer exitCode=-1
dontWait=False
Gui: 181



I hope this helps you to fix this prob.

Thx in advance.

Regards
ARTSOFT
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
The IDE fails to connect to the rapid engine. Make sure again that you are using Java 8 (under Tools - Configure Paths).

It might be a firewall issue, though by default Windows firewall should not block the debugger as it only uses internal network connection.

You will need to use the legacy debugger for now. It is available under Tools - IDE Options.
 
Upvote 0

DrAlex

Member
Licensed User
Longtime User
Hello, today I tried my program after a 2-month interruption and ran into exactly the same problem as described by ARTSOFT. When I switched to the legacy debugger, the problem disappeared.
 
Upvote 0

artsoft

Active Member
Licensed User
Longtime User
Hi Erel!

The paths are correct I think.

B4A-Settings:

upload_2016-2-29_15-32-41.png


Explorer screenshot:

upload_2016-2-29_15-32-17.png


Internal network connection?
Do you mean local addresses with 192.168.XXX.XXX ????

I think there is no firewall configured for this on my screen.
But I see also the TimeOut exceptions in the log.
How can I see the URL in the logs?

Thx for your help.

Regards
ARTSOFT
 
Upvote 0

artsoft

Active Member
Licensed User
Longtime User
Hi Erel!

upload_2016-2-29_16-1-44.png


I turn it on --> no change
I turn it off --> no change

Same effect: Rapid debugger don't run!

I will try it on another PC this evening and I will give feednack asap.

CU

Regards
ARTsoft
 
Upvote 0
Top