Native map crashes application

268 views
Skip to first unread message

wicky...@gmail.com

unread,
May 15, 2014, 4:37:08 AM5/15/14
to codenameone...@googlegroups.com
IDE: NetBeans

Device : Android from oldest to newest version.

Hi,

Been a long time since, i am almost ready to launch our first app developed with codenameone, many more to come,
however, i have adapted the map to be using the new c1nlib googlemap library, which is a native map and runs perfectly.

However the application keeps crashing when i change from the tab menu into another page.

I.e. when i click the list to show the detail form, the application crashes throwing this error (only in the device not simulator).

E/AndroidRuntime(15907): FATAL EXCEPTION: Thread-35
E
/AndroidRuntime(15907): java.lang.IllegalArgumentException: width and height mu
st be
> 0
E
/AndroidRuntime(15907):        at android.graphics.Bitmap.nativeCreate(Native M
ethod
)
E
/AndroidRuntime(15907):        at android.graphics.Bitmap.createBitmap(Bitmap.j
ava
:477)
E
/AndroidRuntime(15907):        at maps.e.ca.a(Unknown Source)
E
/AndroidRuntime(15907):        at maps.e.as.run(Unknown Source)
E
/AndroidRuntime(15907):        at java.lang.Thread.run(Thread.java:1019)



I checked it out a bit, and suspect there is some error towards the map trying to draw something once the form is already switched.
I tried clearing the container, it doesn't go away.
Please advise on the proper coding structure, or clearing of the map before i switch the form. I think that will fix it but how?

:)

Regards,
Wick

Shai Almog

unread,
May 15, 2014, 12:25:14 PM5/15/14
to codenameone...@googlegroups.com, wicky...@gmail.com
Hi,
the stack seems to be broken too badly by obfuscation. Can you toggle the build option to build a debug version and reproduce the issue?
You might need to delete the existing install on the device since the debug certificate will be used.

Wick S

unread,
May 15, 2014, 2:15:48 PM5/15/14
to Shai Almog, codenameone...@googlegroups.com

Hi...i have been using debug build. As well as tried un installing the app from device n reinstalling it. Still happens. I wonder if it has to do with me using the first load as tabs. Where first tab is a list. Second is map. N once i press the item on list. The app crashes with the error....
Is there a way to manage object i memory? Destroying n initiation. Also to save ram.
Still would b great to stop the crash coz i would hate to roll back to web map :(

wicky...@gmail.com

unread,
May 16, 2014, 1:18:31 AM5/16/14
to codenameone...@googlegroups.com, wicky...@gmail.com
I found the bug_report in netbean. Maybe it will help? but even with this it was working fine before i implement the native map.

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  sun.font.T2KFontScaler.getGlyphMetricsNative(Lsun/font/Font2D;JJILjava/awt/geom/Point2D$Float;)V+0
j  sun.font.T2KFontScaler.getGlyphMetrics(JILjava/awt/geom/Point2D$Float;)V+28
j  sun.font.FileFont.getGlyphMetrics(JILjava/awt/geom/Point2D$Float;)V+8
j  sun.font.FileFontStrike.getGlyphMetrics(IZ)Ljava/awt/geom/Point2D$Float;+201
j  sun.font.FileFontStrike.getGlyphMetrics(I)Ljava/awt/geom/Point2D$Float;+3
j  sun.font.StandardGlyphVector$GlyphStrike.addDefaultGlyphAdvance(ILjava/awt/geom/Point2D$Float;)V+5
j  sun.font.StandardGlyphVector.initPositions()V+162
j  sun.font.StandardGlyphVector.getLogicalBounds()Ljava/awt/geom/Rectangle2D;+5
j  java.awt.Font.getStringBounds([CIILjava/awt/font/FontRenderContext;)Ljava/awt/geom/Rectangle2D;+190
j  java.awt.Font.getStringBounds(Ljava/lang/String;Ljava/awt/font/FontRenderContext;)Ljava/awt/geom/Rectangle2D;+11
j  com.codename1.impl.javase.JavaSEPort.stringWidth(Ljava/lang/Object;Ljava/lang/String;)I+17
j  com.codename1.ui.Font.stringWidth(Ljava/lang/String;)I+24
j  com.codename1.ui.plaf.DefaultLookAndFeel.drawLabelText(Lcom/codename1/ui/Graphics;Lcom/codename1/ui/Label;Ljava/lang/String;III)I+28
j  com.codename1.ui.plaf.DefaultLookAndFeel.drawLabelString(Lcom/codename1/ui/Graphics;Lcom/codename1/ui/Label;Ljava/lang/String;III)I+122
j  com.codename1.ui.plaf.DefaultLookAndFeel.drawComponent(Lcom/codename1/ui/Graphics;Lcom/codename1/ui/Label;Lcom/codename1/ui/Image;Lcom/codename1/ui/Image;I)V+952
j  com.codename1.ui.plaf.DefaultLookAndFeel.drawLabel(Lcom/codename1/ui/Graphics;Lcom/codename1/ui/Label;)V+9
j  com.codename1.ui.Label.paint(Lcom/codename1/ui/Graphics;)V+9
j  com.codename1.ui.Component.internalPaintImpl(Lcom/codename1/ui/Graphics;Z)V+109
j  com.codename1.ui.Component.paintInternalImpl(Lcom/codename1/ui/Graphics;Z)V+97
j  com.codename1.ui.Component.paintInternal(Lcom/codename1/ui/Graphics;Z)V+171
j  com.codename1.ui.Container.paint(Lcom/codename1/ui/Graphics;)V+144
j  com.codename1.ui.Component.internalPaintImpl(Lcom/codename1/ui/Graphics;Z)V+109
j  com.codename1.ui.Component.paintInternalImpl(Lcom/codename1/ui/Graphics;Z)V+97
j  com.codename1.ui.Component.paintInternal(Lcom/codename1/ui/Graphics;Z)V+171
j  com.codename1.ui.Container.paint(Lcom/codename1/ui/Graphics;)V+144
j  com.codename1.ui.Form.paint(Lcom/codename1/ui/Graphics;)V+7
j  com.codename1.ui.Component.internalPaintImpl(Lcom/codename1/ui/Graphics;Z)V+109
j  com.codename1.ui.Component.paintInternalImpl(Lcom/codename1/ui/Graphics;Z)V+97
j  com.codename1.ui.Component.paintInternal(Lcom/codename1/ui/Graphics;Z)V+171
j  com.codename1.ui.Component.paintInternal(Lcom/codename1/ui/Graphics;)V+3
j  com.codename1.ui.Component.paintComponent(Lcom/codename1/ui/Graphics;Z)V+220
j  com.codename1.ui.Component.paintComponent(Lcom/codename1/ui/Graphics;)V+8
j  com.codename1.impl.CodenameOneImplementation.paintDirty()V+202
j  com.codename1.impl.javase.JavaSEPort.paintDirty()V+1
j  com.codename1.ui.Display.edtLoopImpl()V+197
j  com.codename1.ui.Display.invokeAndBlock(Ljava/lang/Runnable;Z)V+81
j  com.codename1.ui.Display.invokeAndBlock(Ljava/lang/Runnable;)V+3
j  com.codename1.impl.javase.JavaSEPort.createBrowserComponent(Ljava/lang/Object;)Lcom/codename1/ui/PeerComponent;+80
j  com.codename1.ui.BrowserComponent.<init>()V+39
j  com.codename1.components.WebBrowser.<init>()V+26
j  com.gismo.maps.GoogleMap$1.<init>(Lcom/gismo/maps/GoogleMap;)V+6
j  com.gismo.maps.GoogleMap.<init>()V+31
j  com.gismo.coffeeapp.StateMachine.postMain(Lcom/codename1/ui/Form;)V+4
j  generated.StateMachineBase.postShow(Lcom/codename1/ui/Form;)V+37
j  com.codename1.ui.util.UIBuilder.postShowImpl(Lcom/codename1/ui/Form;)V+2
j  com.codename1.ui.util.UIBuilder.showForm(Lcom/codename1/ui/Form;Lcom/codename1/ui/Command;Lcom/codename1/ui/Component;)V+465
j  com.codename1.ui.util.UIBuilder.showForm(Ljava/lang/String;Lcom/codename1/ui/Command;)Lcom/codename1/ui/Form;+17
j  generated.StateMachineBase.startApp(Lcom/codename1/ui/util/Resources;Ljava/lang/String;Z)Lcom/codename1/ui/Container;+106
j  generated.StateMachineBase.<init>(Lcom/codename1/ui/util/Resources;Ljava/lang/String;Z)V+8
j  generated.StateMachineBase.<init>(Ljava/lang/String;)V+4
j  com.gismo.coffeeapp.StateMachine.<init>(Ljava/lang/String;)V+2
j  com.gismo.coffeeapp.MyApplication.start()V+21
v  ~StubRoutines::call_stub
j  sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
j  sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
j  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+57
j  com.codename1.impl.javase.Executor$1.run()V+188
j  com.codename1.ui.Display.processSerialCalls()V+114
j  com.codename1.ui.Display.mainEDTLoop()V+92
j  com.codename1.ui.RunnableWrapper.run()V+242
j  com.codename1.impl.CodenameOneThread.run()V+4
v  ~StubRoutines::call_stub

 

Shai Almog

unread,
May 16, 2014, 2:36:55 AM5/16/14
to codenameone...@googlegroups.com, wicky...@gmail.com
That seems like a VM crash. Do you have additional details there?

Wick S

unread,
May 16, 2014, 3:02:39 AM5/16/14
to Shai Almog, codenameone...@googlegroups.com

Thats what i found in a bug_report file. There r memory heaps data...i can send. Is there anywhere else to see¿ i will copy paste the EDT info as well.

Would appreciate a ton for helping to sort this crash out :-)

wicky...@gmail.com

unread,
May 16, 2014, 4:02:56 AM5/16/14
to codenameone...@googlegroups.com, wicky...@gmail.com
Hi i have attached the error report for u and also this is the EDT violation error.
Firstly, the first two error, i think is from downloading the image to cache from imagedownloadservice. It was there since ages, but does not crash the app until i added native map.

Secondly, i think the first two error is caused because the EDT doesn't really care or calculate the width height as this happened to me before where the width, height was set incorrectly, it shows in EDT but not device.

However, lets concentrate on the crash :)

Any more info u need just let me know :)


EDT violation detected
!
com
.codename1.impl.javase.JavaSEPort$EDTViolation: EDT Violation Stack!
    at com
.codename1.impl.javase.JavaSEPort.checkEDT(JavaSEPort.java:380)
EDT violation detected
!
    at com
.codename1.impl.javase.JavaSEPort.getImageWidth(JavaSEPort.java:3201)
    at com
.codename1.ui.Image.getWidth(Image.java:667)
    at com
.codename1.ui.EncodedImage.getWidth(EncodedImage.java:470)
    at com
.codename1.components.StorageImageAsync.<init>(StorageImageAsync.java:48)
    at com
.codename1.components.StorageImageAsync.create(StorageImageAsync.java:143)
    at com
.codename1.io.services.ImageDownloadService.cacheImage(ImageDownloadService.java:688)
    at com
.codename1.io.services.ImageDownloadService.createImageToStorage(ImageDownloadService.java:486)
    at com
.codename1.io.services.ImageDownloadService.access$100(ImageDownloadService.java:62)
    at com
.codename1.io.services.ImageDownloadService$2.run(ImageDownloadService.java:480)
    at com
.codename1.ui.Display$1.run(Display.java:741)
    at com
.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
com
.codename1.impl.javase.JavaSEPort$EDTViolation: EDT Violation Stack!
    at com
.codename1.impl.javase.JavaSEPort.checkEDT(JavaSEPort.java:380)
    at com
.codename1.impl.javase.JavaSEPort.getImageHeight(JavaSEPort.java:3212)
    at com
.codename1.ui.Image.getHeight(Image.java:681)
    at com
.codename1.ui.EncodedImage.getHeight(EncodedImage.java:481)
    at com
.codename1.components.StorageImageAsync.<init>(StorageImageAsync.java:48)
    at com
.codename1.components.StorageImageAsync.create(StorageImageAsync.java:143)
    at com
.codename1.io.services.ImageDownloadService.cacheImage(ImageDownloadService.java:688)
    at com
.codename1.io.services.ImageDownloadService.createImageToStorage(ImageDownloadService.java:486)
    at com
.codename1.io.services.ImageDownloadService.access$100(ImageDownloadService.java:62)
    at com
.codename1.io.services.ImageDownloadService$2.run(ImageDownloadService.java:480)
    at com
.codename1.ui.Display$1.run(Display.java:741)
    at com
.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
java
.lang.ClassNotFoundException: com.codename1.googlemaps.InternalNativeMapsImpl
    at java
.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java
.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java
.security.AccessController.doPrivileged(Native Method)
    at java
.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java
.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun
.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java
.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java
.lang.ClassLoader.findSystemClass(ClassLoader.java:1059)
    at com
.codename1.impl.javase.ClassPathLoader.findClass(ClassPathLoader.java:100)
    at com
.codename1.impl.javase.ClassPathLoader.loadClass(ClassPathLoader.java:50)
    at java
.lang.Class.forName0(Native Method)
    at java
.lang.Class.forName(Class.java:190)
    at com
.codename1.system.NativeLookup.create(NativeLookup.java:55)
    at com
.codename1.googlemaps.MapContainer.<init>(MapContainer.java:113)
    at com
.codename1.googlemaps.MapContainer.<init>(MapContainer.java:78)
    at com
.gismo.maps.GoogleMapNativeComponent.InitiateMap(GoogleMapNativeComponent.java:43)
    at com
.gismo.coffeeapp.StateMachine$4.actionPerformed(StateMachine.java:198)
    at com
.gismo.coffeeapp.CoffeeShopAccess$Listener.actionPerformed(CoffeeShopAccess.java:87)
    at com
.codename1.ui.util.EventDispatcher.fireActionSync(EventDispatcher.java:421)
    at com
.codename1.ui.util.EventDispatcher.access$400(EventDispatcher.java:41)
    at com
.codename1.ui.util.EventDispatcher$CallbackClass.run(EventDispatcher.java:101)
    at com
.codename1.ui.Display.processSerialCalls(Display.java:1075)
    at com
.codename1.ui.Display.edtLoopImpl(Display.java:1019)
    at com
.codename1.ui.Display.mainEDTLoop(Display.java:925)
    at com
.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
    at com
.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)

Regards,
Wick
hs_err_pid772.log

Shai Almog

unread,
May 16, 2014, 10:24:55 AM5/16/14
to codenameone...@googlegroups.com, wicky...@gmail.com
Hi,
the EDT issue isn't a problem.
The native maps error you are getting should be resolved with the latest plugin. Just go into project properties and click OK it should override the build.xml.

Wick S

unread,
May 16, 2014, 10:34:16 AM5/16/14
to Shai Almog, codenameone...@googlegroups.com

I m using the latest plugin. Was there an update today?
Everything runs fine on EDT but crashes in device. With the java exception in the first thread

Regards

Shai Almog

unread,
May 17, 2014, 3:26:41 AM5/17/14
to codenameone...@googlegroups.com, Shai Almog, wicky...@gmail.com
I was referring to the simulator not being able to find the native impl libs.
For the crash on the device did you send a debug build for Android and checked the exception stack?
It should be more detailed and unobfuscated.

Wick S

unread,
May 17, 2014, 3:30:25 AM5/17/14
to Shai Almog, codenameone...@googlegroups.com
I set the wrong flag yesterday, apologies.
I am setting  the property of the project in android tab to debug as we speak, sending it in,

where do i get the exception stack? when i run it on the device and do an "adb logcat" ??

regards,
wick

Shai Almog

unread,
May 17, 2014, 12:05:22 PM5/17/14
to codenameone...@googlegroups.com, Shai Almog, wicky...@gmail.com
It should be printed to logcat/ddms as usual.

Wick S

unread,
May 19, 2014, 3:43:55 AM5/19/14
to Shai Almog, codenameone...@googlegroups.com
Hi Shai,

I have done the debug, it is showing the same error

05-19 13:53:08.682  9308  9323 I System.out: Blocking to render view on bitmap
05-19 13:53:08.687  9308  9432 E AndroidRuntime: FATAL EXCEPTION: Thread-910
05-19 13:53:08.687  9308  9432 E AndroidRuntime: java.lang.IllegalArgumentException: width and height must be > 0
05-19 13:53:08.687  9308  9432 E AndroidRuntime:     at android.graphics.Bitmap.createBitmap(Bitmap.java:724)
05-19 13:53:08.687  9308  9432 E AndroidRuntime:     at android.graphics.Bitmap.createBitmap(Bitmap.java:703)
05-19 13:53:08.687  9308  9432 E AndroidRuntime:     at android.graphics.Bitmap.createBitmap(Bitmap.java:670)
05-19 13:53:08.687  9308  9432 E AndroidRuntime:     at lyj.a(Unknown Source)
05-19 13:53:08.687  9308  9432 E AndroidRuntime:     at mbp.run(Unknown Source)
05-19 13:53:08.687  9308  9432 E AndroidRuntime:     at java.lang.Thread.run(Thread.java:841)
05-19 13:53:08.707  2359  2858 I ActivityManager: Notify an ApplicationCrash

Is there anything i am doing wrong? should it show more? or this is sufficient?

I have marked the property of the project, under Android tab, "Generate Builds" to be Debug.

Please advise,
wick

Wick S

unread,
May 19, 2014, 3:50:12 AM5/19/14
to Shai Almog, codenameone...@googlegroups.com
Here is the log file,
with Fatal exception,

I deleted the parts before the fatal occurs, for size purpose. If u need more please let me know
please advise

wick
bugreport-1.txt

Wick S

unread,
May 19, 2014, 4:25:47 AM5/19/14
to Shai Almog, codenameone...@googlegroups.com
Hey,

I have come accross something fishy, in the debug console, there is a message saying

[unamed-14705-1] setDefaultBufferSize: dimension cannot be 0 (w=0,h=1003) (Tag : BufferQueue)

Then, when i click into another menu, which allows me to leave the Tabbed menu (in which one of the tab contains a map) it crashes with the exception in the previous thread.


regards,
wick

Shai Almog

unread,
May 20, 2014, 12:43:59 PM5/20/14
to codenameone...@googlegroups.com, Shai Almog, wicky...@gmail.com
Hi,
I think you sent a debug build but installed the release build. Usually the release version is mapped to the QR code. Make sure you install from the specific debug URL.
Debug builds are never obfuscated and should give proper stack traces.

Wick S

unread,
May 20, 2014, 2:48:27 PM5/20/14
to Shai Almog, codenameone...@googlegroups.com
I tried installing from the link,
same error msg, no more stack trace. Except some fatal signal.

I will capture the screen for you tomorrow. We plan to launch next week, but can't do until this is solved.
Would you like me to attach an apk to you?
i will try to capture all the screenshots of what i have in my settings tomorrow and to build in debug mode again.

regards,
wick

Shai Almog

unread,
May 21, 2014, 1:28:29 AM5/21/14
to codenameone...@googlegroups.com, Shai Almog, wicky...@gmail.com
If you can reproduce this in a standalone test case you can file an issue with sources in the issue tracker.
We don't accept APK's since this doesn't really help us debug anything.

I'm not sure how screenshots will help here.
If you are short in time I suggest redesigning the app to place the map within a form of its own rather than as part of tabs.
Message has been deleted
Message has been deleted

wicky...@gmail.com

unread,
May 21, 2014, 5:48:51 AM5/21/14
to codenameone...@googlegroups.com, Shai Almog, wicky...@gmail.com
I thought so, someone trying to sell something in the last message...

Well, Shai, i am sorry to disturb you again. I think i am setting something wrong with the build. As it should not obfuscate if it is a debug build. And i have set the properties to debug, am i missing something?
I will consider re-design, but that means we have to ditch the tab menu which is not nice for the app we are building.... :(

As i am fairly new to mobile world, whats the standalone test case? just my code? .. i don't mind sharing them in the issue tracker.

I think i am really close, sniffing it on my nose.

Regards,
Wick
Untitled1.png
Untitled2.png

wicky...@gmail.com

unread,
May 21, 2014, 7:02:37 AM5/21/14
to codenameone...@googlegroups.com, Shai Almog, wicky...@gmail.com
Hi i have found more leads.

The buffered error for the width=0 happens when i change the tab from map to home.

And the exception logging is giving this particular error 

"Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0"

May be thats why i am not getting the stack-trace.

regards,
wick

Shai Almog

unread,
May 21, 2014, 12:55:53 PM5/21/14
to codenameone...@googlegroups.com, Shai Almog, wicky...@gmail.com
Hi,
a test case would be a small standalone application that reproduces the problem in source form that you can submit to the issue tracker.

Wick S

unread,
May 23, 2014, 8:12:31 AM5/23/14
to Shai Almog, codenameone...@googlegroups.com
Hi now i tried to create a stand alone app...
it runs fine on emulator.

it is not building on the server,
it is giving this error

/tmp/build8293863453903251786xxx/MyApplication/src/com/codename1/googlemaps/InternalNativeMapsImpl.java:20: error: package com.google.android.gms.maps does not exist

I am attacching the standalone app here,
advise me if i need to go do it in the issue tracker as well..

regards,
wick

src.rar

Shai Almog

unread,
May 23, 2014, 10:00:48 AM5/23/14
to codenameone...@googlegroups.com, Shai Almog, wicky...@gmail.com
Hi,,
did you place the cn1lib in the right place?
Did you configure all the build arguments correctly?
You can just paste the content of your codenameone_settings.properties and I can have a look at that.

Wick S

unread,
May 23, 2014, 10:52:44 AM5/23/14
to Shai Almog, codenameone...@googlegroups.com
ah crap i forgot about the arguments, thankz.
anyways should i send the src to issue tracker?

Wick S

unread,
May 23, 2014, 11:13:22 AM5/23/14
to Shai Almog, codenameone...@googlegroups.com
Hey, i regret to inform myself that the bug wasn't being able to reproduce.
Means there is something wrong with the code, and i can't get the stack trace because of the permission error.

So more digging for me i suppose T_T

regards

Shai Almog

unread,
May 24, 2014, 3:51:24 AM5/24/14
to codenameone...@googlegroups.com, Shai Almog, wicky...@gmail.com
Try to narrow down your application to find the culprit, if it doesn't happen for the standalone test case then something in your app must be causing it.

Wick S

unread,
May 24, 2014, 7:28:22 AM5/24/14
to Shai Almog, codenameone...@googlegroups.com
Hi i have commented out everything in the project leaving only the map and a button to show a new form.
Same problem. Which leaves me only one place to consider, the theme.res file. Where inside, there are true type fonts, multi-images embeded.

any suggestion? before i tear them down?

Shai Almog

unread,
May 24, 2014, 12:38:55 PM5/24/14
to codenameone...@googlegroups.com, Shai Almog, wicky...@gmail.com
Hi,
I would check potential build argument differences first.

Wick S

unread,
May 24, 2014, 1:54:12 PM5/24/14
to Shai Almog, codenameone...@googlegroups.com

Ok will do tht first n also capture the screen n send it.

Wick S

unread,
May 28, 2014, 2:40:04 AM5/28/14
to Shai Almog, codenameone...@googlegroups.com
Hi Shai,

Turns out it is infact the theme.res that is causing the problem. Don't know why as yet, however i am working on a new theme.res file and its working fine.

One bug though, the Native map won't load the first time in androind version less than 2.3.6
It will load after minimizing and maximizing the app only.

will keep you posted with the exciting launch :)

regards,
wick

Shai Almog

unread,
May 28, 2014, 1:28:45 PM5/28/14
to codenameone...@googlegroups.com, Shai Almog, wicky...@gmail.com
Hi,
interesting. It might not be related to the Android 2.x version but rather to the version of Google Play Services on that device.

Wick S

unread,
May 28, 2014, 1:35:55 PM5/28/14
to Shai Almog, codenameone...@googlegroups.com
Hi,

that is indeed interesting, i will try to update google play version.
I am getting the crash again after working through the theme.res file ..... I am checking through it again.... deleting true type font styles and also rechecking if the Display.GetWidth() for thumb images in list renderer that is using Table Layout is causing the problem...

Hmmm........

Regards,
Wick

Wick S

unread,
May 28, 2014, 2:37:29 PM5/28/14
to Shai Almog, codenameone...@googlegroups.com
System.out: Blocking creation
05-29 00:42:39.780 26467 26467 I Google Maps Android API: Google Play services package version: 4452036
05-29 00:42:39.810 26467 26481 I System.out: Finished blocking creation
05-29 00:42:39.815 26467 26481 I System.out: Blocking to render view on bitmap

This is the bug report i am getting,
And Hurray, i finally figured out the crash problem.
when i added true type font into the style. It crashes the app with native map.
It was working before i implemented the native map, and i have tested this specifically. The millimeter factor does not crash
but the .ttf does crash it.

Would u be able to look into it? Else we have to use ugly system font for the release :)




Shai Almog

unread,
May 29, 2014, 1:47:09 AM5/29/14
to codenameone...@googlegroups.com, Shai Almog, wicky...@gmail.com
Does just the inclusion of the TTF crash the map?
Is it for any TTF? E.g. if you add another font with a different name would it crash?
Does it matter to which style you applied it?

Maybe the native map relies on this specific font and crashes because we replaced it?

Wick S

unread,
May 29, 2014, 1:52:57 AM5/29/14
to Shai Almog, codenameone...@googlegroups.com
I am not sure about the name of the fonts......and the native map relying on it.

However, for 2.3.4 version, once i remove it works, but it crashes constantly on S3 (android 4 upwards).
Replacing the theme doesn't help as well, uninstalling n re-installing also doesn't help.

Only porting to a new project works.

Anyway, to save time, i am moving the map into another form. This will save performance as well from what i see.

But it would be awesomely helpful if it can be pin-pointed out. I dont mind sending my codes as its basic.

But eventually what we want to achieve is having the map and list in the same page, somewhat like tripadvisor does with their app.

Any recommendations?

Regards,
Wick

wicky...@gmail.com

unread,
May 29, 2014, 3:45:08 AM5/29/14
to codenameone...@googlegroups.com, Shai Almog, wicky...@gmail.com
Well it does not happen anymore, but i have to make sure i quit the main tabbed form before i put in the map into the container.

Else it crashes with the same error , width height must be  > 0.

Although now the map does not appear until i drag the screen around .... is there any suggestion for that?

Shai Almog

unread,
May 29, 2014, 11:39:05 AM5/29/14
to codenameone...@googlegroups.com, Shai Almog, wicky...@gmail.com
Did you place the map in the center of a border layout form?
Did you define all the build arguments correctly?
Did you change form transitions in any way?

Wick S

unread,
May 29, 2014, 11:55:54 AM5/29/14
to Shai Almog, codenameone...@googlegroups.com

Yes
Yes and no.

I havrnt sent u the arguments. Will do tomorrow.
Now it works superply with map in another form instead of a tab container.

Reply all
Reply to author
Forward
0 new messages