Android Question live wallpaper with declaration of map or list variables

radwanderer

New Member
Licensed User
Longtime User
I create a live wallpaper (WallpaperService Module) where i have to handle map and/or list variables.
But when i declare it under process_globals the application always crashes after installation an start

Sub Process_Globals
Dim lwm As LWManager
Dim ft_reg, ft_thi, ft_bla, ft_bol, ft_lig As String
Dim cp_main, cp_text1 As Int
Dim rect_basic1, rect_w_main, rect_events As Rect
Dim wbmp_main As Bitmap
Dim mymap As Map
End Sub

It also crashes when i declare it in an sub!
No problem with the app without the line "Dim mymap As Map"

It's really frustrating

Thanks
 

DonManfred

Expert
Licensed User
Longtime User
When it crashes you should see in the logs the error you get.
Without posting the complete error from log (or better from unfiltered log too) it is hard to give an concrete advice

As from your date of registration i should ask too which version of b4a you are using?

Most important is the full error from the log i suppose
 
Upvote 0

radwanderer

New Member
Licensed User
Longtime User
Ok
One step back.
I tried to install the wallpaper sample/tutorial "LiveWallpaperBall". After installation and open I get a popup message that the application will terminated instead of the toast message

ToastMessageShow("Please go to the home screen and add the Live Wallpaper.", True)

But when i choose the live wallpaper from the menu it will run without an error.

I use the b4a version 2.71, a Nexus7 running 4.4 and i also tried different platforms (14, 17, 19)

And here the unfilterd logcat:

LogCat connected to: B4A-Bridge: asus Nexus 7-
--------- beginning of /dev/log/main
PackageAdded: package:cc.allview
Installing file.
GC_CONCURRENT freed 435K, 8% free 7979K/8596K, paused 20ms+1ms, total 51ms
WAIT_FOR_CONCURRENT_GC blocked 7ms
GC_FOR_ALLOC freed 342K, 8% free 7968K/8596K, paused 20ms, total 20ms
PackageAdded: package:cc.allview
Installing file.
GC_CONCURRENT freed 417K, 8% free 7977K/8592K, paused 3ms+3ms, total 33ms
WAIT_FOR_CONCURRENT_GC blocked 12ms
GC_FOR_ALLOC freed 331K, 8% free 7968K/8592K, paused 24ms, total 25ms
PackageAdded: package:cc.allview
Installing file.
GC_CONCURRENT freed 391K, 8% free 7977K/8592K, paused 3ms+1ms, total 28ms
WAIT_FOR_CONCURRENT_GC blocked 18ms
GC_FOR_ALLOC freed 331K, 8% free 7968K/8592K, paused 20ms, total 20ms
PackageAdded: package:cc.allview
java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:545)
at libcore.io.IoBridge.recvfrom(IoBridge.java:509)
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 anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.readNumberOfBytes(AsyncStreams.java:272)
at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:198)
at java.lang.Thread.run(Thread.java:841)
Caused by: libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)
at libcore.io.Posix.recvfromBytes(Native Method)
at libcore.io.Posix.recvfrom(Posix.java:141)
at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)
at libcore.io.IoBridge.recvfrom(IoBridge.java:506)
... 6 more
libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)
sending message to waiting queue (CallSubDelayed - UpdateStatus)
running waiting messages (1)
** Activity (main) Resume **
** Service (service1) Destroy **
** Service (service1) Create **
** Service (service1) Start **
Connected to B4A-Bridge (Wifi)
GC_CONCURRENT freed 217K, 4% free 8263K/8520K, paused 2ms+2ms, total 29ms
WAIT_FOR_CONCURRENT_GC blocked 7ms
** Activity (main) Pause, UserClosed = false **
Installing file.
GC_CONCURRENT freed 716K, 10% free 7973K/8808K, paused 5ms+2ms, total 34ms
WAIT_FOR_CONCURRENT_GC blocked 13ms
PackageAdded: package:cc.allview
Installing file.
GC_CONCURRENT freed 454K, 9% free 7977K/8764K, paused 5ms+2ms, total 44ms
GC_CONCURRENT freed 450K, 10% free 7968K/8764K, paused 11ms+1ms, total 108ms
PackageAdded: package:cc.allview
Installing file.
GC_CONCURRENT freed 426K, 8% free 7976K/8656K, paused 1ms+3ms, total 29ms
PackageAdded: package:cc.allview
Installing file.
GC_CONCURRENT freed 441K, 7% free 7984K/8552K, paused 5ms+6ms, total 47ms
PackageAdded: package:anywheresoftware.b4a.samples.livewallpaperball
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…