Bug? App always crashes, even when the project is empty

sorex

Expert
Licensed User
Longtime User
Hello,

I'm using Win8.1 + B4A 3.00.

When I do a compile & send over usb my app always crashes after a few seconds.

This even happends with a blank project?

Doesn't it support Android 2.2 correctly anymore?
 

sorex

Expert
Licensed User
Longtime User
never mind, I closed all B4A instances and tried again, now the app runs normal.
 

sorex

Expert
Licensed User
Longtime User
hmm, this is odd...

I worked all night on a widget, and mailed it to work.

Now when I open it here and run it I have again this "application ended unexpectatly" at every run
and nothing in the debug log to see (when filtered)
 

sorex

Expert
Licensed User
Longtime User
Here unfiltered log data for an empty project that crashes aswell




>>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
CheckJNI is OFF


setted country_code = Belgium
setted sales_code = BSE
found sales_code tag = <BSE>, </BSE>
/system/csc/feature.xml ==> cannot open file
--- registering native functions ---
register_android_app_LibQmg
GC_EXPLICIT freed 80 objects / 3872 bytes in 49ms
volume aseced /mnt/sdcard
getAsecVolumeState :: result = mounted
Scanning package: /data/app/vmdl32283.tmp
Removing non-system package:b4a.example
Sending signal. PID: 3070 SIG: 9
Force stopping package b4a.example uid=10040
onWindowFocusChanged(true)
Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@46052098
Scanning package b4a.example
Package b4a.example codePath changed from /data/app/b4a.example-2.apk to /data/app/b4a.example-1.apk; Retaining data and using new
/data/app/b4a.example-1.apk changed; unpacking
DexInv: --- BEGIN '/data/app/b4a.example-1.apk' ---
DexOpt: load 120ms, verify 419ms, opt 11ms
DexInv: --- END '/data/app/b4a.example-1.apk' (success) ---
Force stopping package b4a.example uid=10040
Activities: b4a.example.main
Code path for pkg : b4a.example changing from /data/app/b4a.example-2.apk to /data/app/b4a.example-1.apk
Resource path for pkg : b4a.example changing from /data/app/b4a.example-2.apk to /data/app/b4a.example-1.apk
move /data/dalvik-cache/data@[email protected][email protected] -> /data/dalvik-cache/data@[email protected][email protected]
New package installed in /data/app/b4a.example-1.apk
Force stopping package b4a.example uid=10040
GC_EXPLICIT freed 19797 objects / 1068712 bytes in 181ms
GC_EXPLICIT freed 5386 objects / 394472 bytes in 144ms
application intent received: android.intent.action.PACKAGE_REMOVED, replacing=true
--> package:b4a.example
onReceive Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:b4a.example flg=0x10000000 cmp=com.android.voicedialer/.VoiceDialerReceiver (has extras) }
deleteCachedGrammarFiles /data/data/com.android.voicedialer/files/openentries.txt
onReceive() intent:Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:b4a.example flg=0x10000000 cmp=com.sec.android.app.controlpanel/.PackageIntentReceiver (has extras) } pkg:b4a.example action:android.intent.action.PACKAGE_REMOVED
application intent received: android.intent.action.PACKAGE_ADDED, replacing=true
--> package:b4a.example
--> update package b4a.example
updatePackage=b4a.example
GC_EXPLICIT freed 6926 objects / 359648 bytes in 165ms
onReceive Intent { act=android.intent.action.PACKAGE_ADDED dat=package:b4a.example flg=0x10000000 cmp=com.android.voicedialer/.VoiceDialerReceiver (has extras) }
deleteCachedGrammarFiles /data/data/com.android.voicedialer/files/openentries.txt
unlink /data/dalvik-cache/data@[email protected][email protected]
onReceive() intent:Intent { act=android.intent.action.PACKAGE_ADDED dat=package:b4a.example flg=0x10000000 cmp=com.sec.android.app.controlpanel/.PackageIntentReceiver (has extras) } pkg:b4a.example action:android.intent.action.PACKAGE_ADDED
package added b4a.example
WorkspaceDraw: Workspace drawWallpaperImage()
Shutting down VM
adbd disconnected
NOTE: attach of thread 'Binder Thread #3' failed

>>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
CheckJNI is OFF
setted country_code = Belgium
setted sales_code = BSE
found sales_code tag = <BSE>, </BSE>
/system/csc/feature.xml ==> cannot open file
--- registering native functions ---
register_android_app_LibQmg
Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=b4a.example/.main }
onPause()
Shutting down VM
adbd disconnected
NOTE: attach of thread 'Binder Thread #3' failed
WallpaperManager setVisibility visible true
Start proc b4a.example for activity b4a.example/.main: pid=3133 uid=10040 gids={}
Converting to boolean: TypedValue{t=0x3/d=0x552e "res/anim/accelerate_decelerate_interpolator.xml" a=2 r=0x10a0004}


Converting to boolean: TypedValue{t=0x3/d=0x552e "res/anim/accelerate_decelerate_interpolator.xml" a=2 r=0x10a0004}


Shutting down VM
threadid=1: thread exiting with uncaught exception (group=0x4001d7d0)


FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{b4a.example/b4a.example.main}: java.lang.ClassNotFoundException: b4a.example.main in loader dalvik.system.PathClassLoader[/data/app/b4a.example-1.apk]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: b4a.example.main in loader dalvik.system.PathClassLoader[/data/app/b4a.example-1.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
... 11 more
Force finishing activity b4a.example/.main
dumpmesg > /data/log/dumpstate_app_error.log
begin


onWindowFocusChanged(false)


asec list


done


Activity pause timeout for HistoryRecord{45fd5068 b4a.example/.main}


onResume(). mIsNewIntent : false


MTP-LAUNCHER: media scanning not yet finished .
onResume() ended
WorkspaceDraw: Workspace drawWallpaperImage()
Launch timeout has expired, giving up wake lock!


Activity idle timeout for HistoryRecord{45fd5068 b4a.example/.main}
Converting to boolean: TypedValue{t=0x3/d=0x552e "res/anim/accelerate_decelerate_interpolator.xml" a=2 r=0x10a0004}


WallpaperManager setVisibility visible true


ID[0]=0(0) Dn(0=>1)


Dsptch > Window{45fd5458 Sorry! paused=false}


Ulight 1->3|0
Setting target 2: cur=20.0 target=30 delta=0.6666667 nominalCurrentValue=20
Scheduling light animator!
ID[0]=0(0) Up(1=>0)


Dsptch > Window{45fd5458 Sorry! paused=false}
onWindowFocusChanged(true)


Sending signal. PID: 3133 SIG: 9
Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@45eea790
Process b4a.example (pid 3133) has died.
codecOn
Light Animator Finished curIntValue=30





ALSA OPEN mode 0,device 2
Try to open ALSA PLAYBACK device AndroidPlayback_Speaker_normal
Initialized ALSA PLAYBACK device AndroidPlayback_Speaker_normal
Set PLAYBACK PCM format to S16_LE (Signed 16 bit Little Endian)
Using 2 channels for PLAYBACK.
Set PLAYBACK sample rate to 44100 HZ
Buffer size: 1024
Latency: 23219


write blocked for 212 msecs, 2 delayed writes, thread 0x25c30
Timer 0x3->0x3|0x1


Output standby called!!. Turn off PCM device.


codecOff
AudioStreamOutALSA::standby call snd_pcm_close
 

sorex

Expert
Licensed User
Longtime User
hey TDS,

here the manifest file

that overwrite option is not tagged

<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="xxxp.Forwarder"
android:versionCode="1"
android:versionName=""
android:installLocation="internalOnly">

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<application
android:icon="@drawable/icon"
android:label="xxxp Forwarder">
<activity
android:windowSoftInputMode="stateHidden"
android:launchMode="singleTop"
android:name=".main"
android:label="xxxp Forwarder"
android:screenOrientation="unspecified">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

</activity>
<service android:name=".widgetservices">
</service>
<receiver
android:name=".widgetservices$widgetservices_BR"
android:label="xxxp Forwarder">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="@xml/widgetservices_info" />

</receiver>
</application>
</manifest>
 

sorex

Expert
Licensed User
Longtime User
could this be jdk 7.1.0.07 related? I know I used 1.6.x before even when 1.7 was already out for a while
 

sorex

Expert
Licensed User
Longtime User
here you go...
 

Attachments

  • empty_project.zip
    426.2 KB · Views: 224

sorex

Expert
Licensed User
Longtime User
yes, but only on this win8.1 machine. at home it works fine.

I will try to upload it to a site and download it like that maybe it corrupts during the transfer over usb
 

sorex

Expert
Licensed User
Longtime User
bad luck

I archived the apk to a zip
uploaded it to a webserver
downloaded it to the phone
unzipped the apk with total commander
ran it
bzzzz crash

it seems something goes wrong during compile then.

just tried in release mode, same thing.
 
Last edited:

sorex

Expert
Licensed User
Longtime User
I'm back at home, and compiled the files I uploaded here, apk has different size and that classes.dex file is a lot larger.

I'll try to compile it via admin execute and see what happends.
 

sorex

Expert
Licensed User
Longtime User
I managed to take over the machine.


I went to the B4A folder and right clicked basic4android.exe and selected run as admin.

I first got an error that it couldn't find x:\sources\b4a\libraries since that mapping doesn't exist under the admministrator profile but it's not needed for the empty project.

I did a compile and put the apk online again and guess what...

now it runs fine on my phone :)

is there a list of paths that need to readable or read/write so that I can by pass this problem?
 

sorex

Expert
Licensed User
Longtime User
it is, if not I wouldn't be able to put save my project there and I wouldn't have found the apk there.

but I think I found a hint. I noticed in process explorer that it had an issue with the mapped network drive.

when I copied the project to c:\users\myprofile\documents\sources and did a compile the apk was binary identical to the previous working one.

I tried the entire afternoon to get this poor windows 7 starter edition to connect to my xp desktop share to see if it always happends over shared but couldn't get it to work so far.

not sure if anyone who's reading this can try this for me/us?
 

sorex

Expert
Licensed User
Longtime User
making progress here :)

I noticed a path not found error on this path/command

\\;LanmanRedirector\;X:0000000000027bad\server-host\bddata\5. Documenten per Dienst of Persoon\9. Administratie\IT\0. Geert Verschueren\Sources\B4A\Sources\empty_project\Objects\META-INF\services\javax.annotation.processing.Processor

that's what lead me to the network share guessing.

I first though it was this 200 something pathname limit I was exceeding so I moved things up a few level, same thing.

then I mapped another server c$ copied the stuff there and it compiled correct.

now I'm gonna investigate if some antivirus was blocking some of the java sdk files.
 

sorex

Expert
Licensed User
Longtime User
Erel,

You can forget about this issue, it seems to be network related.

I'll put my sources locally and use a daily syncback back-up to the network drive instead.
 
Top