I upgraded from v9.5 to v9.8 this morning without apparent issue. A project I was working on yesterday that was working fine under the previous version is now behaving oddly. The only change (other than clean project and re-compile) was changing the target SDK from 26 to 28. It is a complex project with many moving parts: MQTT client, Bluetooth printer, BT serial barcode scanner (SPP not HID), a remote display device (done via IP/Socket to another B4A app running on the remote display device). The remote display connects and displays properly. And while the barcode scanner is attempted to re-connect every couple of seconds (it is not usually on) the printer is only connected to in a print attempt which I haven't even tried yet.
Running the app in debug mode on v9.5 was decidedly slower than in release mode, but in v9.8 it is now so slow as to be unusable. At some point during the startup the app will just freeze and then eventually exit without any messages (no log messages, filtered or unfiltered). I then figured I'd try in release mode with bridgelogging enabled, and while it does run without self-terminating, I'm seeing a Bluetooth error message spammed into the unfiltered logs (I apologize for the length but I don't know what may be relevant):
The "BluetoothManagerCallback" message is repeating every half-second or less while the app is running, and I am quite confident my barcode scanner re-attempt connect is firing only every 2 seconds. Perhaps there is a dependent library that I failed to update when I updated the B4A?
Running the app in debug mode on v9.5 was decidedly slower than in release mode, but in v9.8 it is now so slow as to be unusable. At some point during the startup the app will just freeze and then eventually exit without any messages (no log messages, filtered or unfiltered). I then figured I'd try in release mode with bridgelogging enabled, and while it does run without self-terminating, I'm seeing a Bluetooth error message spammed into the unfiltered logs (I apologize for the length but I don't know what may be relevant):
Unflitered log:
Starting remote logger. Port: 12095
After accept
common created.
Starting remote logger. Port: 12095
Add to mViews: DecorView@1669fd4[main], this = android.view.WindowManagerGlobal@f5cd57d
HWUI GL Pipeline
hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
DecorView setVisiblity: visibility = 0, Parent = ViewRoot{f412c72 phx.erpregister/phx.erpregister.main,ident = 0}, this = DecorView@1669fd4[main]
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
Initialized EGL, version 1.4
Swap behavior 2
type=1400 audit(0.0:65): avc: denied { search } for name="clients" dev="debugfs" ino=5988 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:debugfs_ion:s0 tclass=dir permissive=0
** Activity (main) Pause, UserClosed = true **
DecorView setVisiblity: visibility = 4, Parent = null, this = DecorView@fb317ed[]
Add to mViews: DecorView@fb317ed[actinitialize], this = android.view.WindowManagerGlobal@f5cd57d
hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
DecorView setVisiblity: visibility = 0, Parent = ViewRoot{4ef1e70 phx.erpregister/phx.erpregister.actinitialize,ident = 1}, this = DecorView@fb317ed[actinitialize]
** Activity (actinitialize) Create, isFirst = true **
** Activity (actinitialize) Resume **
After accept
*** Service (httputils2service) Create ***
No Network Security Config specified, using platform default
** Service (httputils2service) Start **
port:443
[Warning] assignParent to null: this = DecorView@1669fd4[main]
Remove from mViews: DecorView@1669fd4[main], this = android.view.WindowManagerGlobal@f5cd57d
Invoking build picture cache for acct #1136
*** Service (srvimageloader) Create ***
** Service (srvimageloader) Start **
Begin Build_PictureCache
End Build_PictureCache - 100 items found on local device.
srvImageLoder cache has been built.
Do partial code cache collection, code=30KB, data=30KB
After code cache collection, code=30KB, data=30KB
Increasing code cache capacity to 128KB
ProductImageDataset received - 100 images on website.
ProductImageDataset waiting for imageloader cache
Comparing list of 100 images.
Load list built, beginning process.
No download queue loaded.
Do partial code cache collection, code=53KB, data=43KB
After code cache collection, code=53KB, data=43KB
Increasing code cache capacity to 256KB
** Activity (actinitialize) Pause, UserClosed = true **
Sleep not resumed (context is paused): phx.busyindicatortest.busyindicator$ResumableSub_MainLoop
DecorView setVisiblity: visibility = 4, Parent = null, this = DecorView@e52c645[]
Add to mViews: DecorView@e52c645[actregister], this = android.view.WindowManagerGlobal@f5cd57d
hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
DecorView setVisiblity: visibility = 0, Parent = ViewRoot{d602a8 phx.erpregister/phx.erpregister.actregister,ident = 2}, this = DecorView@e52c645[actregister]
** Activity (actregister) Create, isFirst = true **
Deoptimizing android.view.ViewGroup$LayoutParams anywheresoftware.b4a.objects.ViewWrapper.getLayoutParams() due to JIT inline cache
** Activity (actregister) Resume **
getBluetoothService() called with no BluetoothManagerCallback
Deoptimizing boolean anywheresoftware.b4a.objects.ViewWrapper.getVisible() due to JIT inline cache
port:51043
Do full code cache collection, code=119KB, data=92KB
After code cache collection, code=103KB, data=67KB
[Warning] assignParent to null: this = DecorView@fb317ed[actinitialize]
Remove from mViews: DecorView@fb317ed[actinitialize], this = android.view.WindowManagerGlobal@f5cd57d
port:1883
ErpMqtt Connected
ErpMqtt Subscribed to /1136/1/FromWeb
ErpMqtt Subscribed to /1136/1/FromDevice
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:685)
at android.bluetooth.BluetoothSocket.readInt(BluetoothSocket.java:697)
at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:374)
at anywheresoftware.b4a.objects.Serial$1.run(Serial.java:159)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
close() this: android.bluetooth.BluetoothSocket@6eab897, channel: -1, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@1f8ca84, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@abaa26dmSocket: android.net.LocalSocket@c428ea2 impl:android.net.LocalSocketImpl@3184733 fd:java.io.FileDescriptor@b7a0af0, mSocketState: INIT
getBluetoothService() called with no BluetoothManagerCallback
Add to mViews: android.widget.LinearLayout{75e139b V.E...... ......I. 0,0-0,0}, this = android.view.WindowManagerGlobal@f5cd57d
hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
[Warning] assignParent to null: this = android.widget.LinearLayout{75e139b V.E...... ......ID 0,0-312,89}
Remove from mViews: android.widget.LinearLayout{75e139b V.E...... ......ID 0,0-312,89}, this = android.view.WindowManagerGlobal@f5cd57d
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:685)
at android.bluetooth.BluetoothSocket.readInt(BluetoothSocket.java:697)
at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:374)
at anywheresoftware.b4a.objects.Serial$1.run(Serial.java:159)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
close() this: android.bluetooth.BluetoothSocket@f7ddb4d, channel: -1, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@bf60602, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@5215b13mSocket: android.net.LocalSocket@ca5c150 impl:android.net.LocalSocketImpl@759df49 fd:java.io.FileDescriptor@ec2804e, mSocketState: INIT
getBluetoothService() called with no BluetoothManagerCallback
CustDisplay.moClient_Connected - connection failed: (SocketTimeoutException) java.net.SocketTimeoutException: failed to connect to /10.0.0.38 (port 51043) from /10.0.0.108 (port 56354) after 15000ms
java.net.SocketException: Socket is not connected
at java.net.Socket.shutdownInput(Socket.java:1586)
at anywheresoftware.b4a.objects.SocketWrapper$3.run(SocketWrapper.java:250)
at anywheresoftware.b4a.objects.SocketWrapper.Close(SocketWrapper.java:266)
at phx.erpregister.custdisplay._closeclient(custdisplay.java:219)
at phx.erpregister.custdisplay._moclient_connected(custdisplay.java:396)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at anywheresoftware.b4a.BA$2.run(BA.java:370)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
Add to mViews: android.widget.LinearLayout{127198b V.E...... ......I. 0,0-0,0}, this = android.view.WindowManagerGlobal@f5cd57d
hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
port:51043
[Warning] assignParent to null: this = android.widget.LinearLayout{127198b V.E...... ......ID 0,0-530,75}
Remove from mViews: android.widget.LinearLayout{127198b V.E...... ......ID 0,0-530,75}, this = android.view.WindowManagerGlobal@f5cd57d
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:685)
at android.bluetooth.BluetoothSocket.readInt(BluetoothSocket.java:697)
at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:374)
at anywheresoftware.b4a.objects.Serial$1.run(Serial.java:159)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
close() this: android.bluetooth.BluetoothSocket@c7b4ca0, channel: -1, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@5989059, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@bc6c41emSocket: android.net.LocalSocket@96d4ff impl:android.net.LocalSocketImpl@15892cc fd:java.io.FileDescriptor@538d915, mSocketState: INIT
getBluetoothService() called with no BluetoothManagerCallback
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:685)
at android.bluetooth.BluetoothSocket.readInt(BluetoothSocket.java:697)
at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:374)
at anywheresoftware.b4a.objects.Serial$1.run(Serial.java:159)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
close() this: android.bluetooth.BluetoothSocket@40dc21b, channel: -1, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@6e20fb8, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@f5af191mSocket: android.net.LocalSocket@67938f6 impl:android.net.LocalSocketImpl@53c64f7 fd:java.io.FileDescriptor@f846f64, mSocketState: INIT
getBluetoothService() called with no BluetoothManagerCallback
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:685)
at android.bluetooth.BluetoothSocket.readInt(BluetoothSocket.java:697)
at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:374)
at anywheresoftware.b4a.objects.Serial$1.run(Serial.java:159)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
Last edited: