Skip to content
This repository

Android + PG crashes when only one input on page #3208

Closed
chipqcl opened this Issue December 02, 2011 · 17 comments
chipqcl

In a JQM/PhoneGap app running on Android 2.2, when you type three characters into a form, the app crashes (I've tested it on a Samsung Captivate and on the Android emulator, with the same results). It works fine on Android 2.3.

PhoneGap Support tells me it's an "Android webview issue" and that I should submit an issue with JQM.

Here's a mini app built to demonstrate the bug (i.e. index.html):

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
     <title>Test JQM/PhoneGap App</title>
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <link rel="stylesheet" href="css/jquery.mobile-1.0.css" />
     <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
     <script type="text/javascript" src="js/jquery-1.6.4.js"></script>
     <script type="text/javascript" src="js/jquery.mobile-1.0.js"></script>
 </head>
 <body>

 <div data-role="page" id="pageone">
     <div data-role="content">
         <label for="testid">Type 3 characters to crash Android 2.2:</label>
         <form>
             <input type="text" name="testfield" id="testid" />
         </form>
     </div>
 </div>

 </body>
 </html>
Todd Parker
chipqcl

Done:

1) With label element inside the form (sorry, built this test case in a rush), still crashes.
2) With JQM removed, no longer crashes.

So it is related somehow to JQM.

Note that it also crashes with the Android 2.1 emulator.

chipqcl

Here is the logcat dump from a 2.2 emulator crash, in case it helps isolate where the problem is.

D/dalvikvm( 109): GC_EXTERNAL_ALLOC freed 10925 objects / 372368 bytes in 440ms

W/KeyCharacterMap( 109): No keyboard for id 0

W/KeyCharacterMap( 109): Using default keymap: /system/usr/keychars/qwerty.kcm.bin

W/KeyCharacterMap( 361): No keyboard for id 0

W/KeyCharacterMap( 361): Using default keymap: /system/usr/keychars/qwerty.kcm.bin

I/DEBUG ( 31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

I/DEBUG ( 31): Build fingerprint: 'generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys'

I/DEBUG ( 31): pid: 361, tid: 367 >>> com.quickcatchlabs.a1 <<<

I/DEBUG ( 31): signal 11 (SIGSEGV), fault addr 08e99804

I/DEBUG ( 31): r0 08e99804 r1 00000000 r2 08e99804 r3 00000001

I/DEBUG ( 31): r4 002cdd90 r5 00000001 r6 08e99800 r7 00000000

I/DEBUG ( 31): r8 46a52d80 r9 4184be3c 10 4184be24 fp 00130cd0

I/DEBUG ( 31): ip ab214468 sp 46a52c90 lr ab184584 pc af9046e4 cpsr 20000010

I/DEBUG ( 31): #00 pc 000046e4 /system/lib/libcutils.so

I/DEBUG ( 31): #1 pc 00084580 /system/lib/libskia.so

I/DEBUG ( 31): #2 pc 000846d4 /system/lib/libskia.so

I/DEBUG ( 31): #3 pc 00086b58 /system/lib/libskia.so

I/DEBUG ( 31): #4 pc 00086b98 /system/lib/libskia.so

I/DEBUG ( 31): #5 pc 0008417c /system/lib/libskia.so

I/DEBUG ( 31): #6 pc 000841c4 /system/lib/libskia.so

I/DEBUG ( 31): #7 pc 0000c7c6 /system/lib/libwebcore.so

I/DEBUG ( 31): #8 pc 00247570 /system/lib/libwebcore.so

I/DEBUG ( 31): #9 pc 00247646 /system/lib/libwebcore.so

I/DEBUG ( 31): #10 pc 001439d0 /system/lib/libwebcore.so

I/DEBUG ( 31): #11 pc 00143a20 /system/lib/libwebcore.so

I/DEBUG ( 31): #12 pc 00013974 /system/lib/libdvm.so

I/DEBUG ( 31): #13 pc 0003de3c /system/lib/libdvm.so

I/DEBUG ( 31): #14 pc 00037216 /system/lib/libdvm.so

I/DEBUG ( 31): #15 pc 00018714 /system/lib/libdvm.so

I/DEBUG ( 31): #16 pc 0001e8c4 /system/lib/libdvm.so

I/DEBUG ( 31): #17 pc 0001d790 /system/lib/libdvm.so

I/DEBUG ( 31): #18 pc 00053eec /system/lib/libdvm.so

I/DEBUG ( 31): #19 pc 00054102 /system/lib/libdvm.so

I/DEBUG ( 31): #20 pc 0004825a /system/lib/libdvm.so

I/DEBUG ( 31): #21 pc 0001103c /system/lib/libc.so

I/DEBUG ( 31): #22 pc 00010b20 /system/lib/libc.so

I/DEBUG ( 31):

I/DEBUG ( 31): code around pc:

I/DEBUG ( 31): af9046c4 e2801001 e243f03f 3afffff9 e2410001

I/DEBUG ( 31): af9046d4 e8bd4010 e12fff1e e92d4010 e1a02000

I/DEBUG ( 31): af9046e4 e5920000 e3e03a0f e28fe004 e2401001

I/DEBUG ( 31): af9046f4 e243f03f 3afffff9 e2810001 e8bd4010

I/DEBUG ( 31): af904704 e12fff1e e92d4010 e1a02001 e1a04000

I/DEBUG ( 31):

I/DEBUG ( 31): code around lr:

I/DEBUG ( 31): ab184564 e1a07001 da00000f e3a05000 e5940008

I/DEBUG ( 31): ab184574 e7906105 e2855001 e2860004 ebfe92b7

I/DEBUG ( 31): ab184584 e3500001 1a000004 e5860004 e5961000

I/DEBUG ( 31): ab184594 e1a00006 e1a0e00f e591f004 e5942004

I/DEBUG ( 31): ab1845a4 e1520005 cafffff0 e5940008 e3500000

I/DEBUG ( 31):

I/DEBUG ( 31): stack:

I/DEBUG ( 31): 46a52c50 000013fc

I/DEBUG ( 31): 46a52c54 000001b8

I/DEBUG ( 31): 46a52c58 46a52d80

I/DEBUG ( 31): 46a52c5c 4184be3c

I/DEBUG ( 31): 46a52c60 4184be24

I/DEBUG ( 31): 46a52c64 afd0be39 /system/lib/libc.so

I/DEBUG ( 31): 46a52c68 ab214410 /system/lib/libskia.so

I/DEBUG ( 31): 46a52c6c afd0cd81 /system/lib/libc.so

I/DEBUG ( 31): 46a52c70 0053a318 [heap]

I/DEBUG ( 31): 46a52c74 ab12de08 /system/lib/libskia.so

I/DEBUG ( 31): 46a52c78 00000000

I/DEBUG ( 31): 46a52c7c ab129e40 /system/lib/libskia.so

I/DEBUG ( 31): 46a52c80 00000002

I/DEBUG ( 31): 46a52c84 0000001d

I/DEBUG ( 31): 46a52c88 df002777

I/DEBUG ( 31): 46a52c8c e3a070ad

I/DEBUG ( 31): #00 46a52c90 002cdd90 [heap]

I/DEBUG ( 31): 46a52c94 ab184584 /system/lib/libskia.so

I/DEBUG ( 31): #1 46a52c98 002cdd90 [heap]

I/DEBUG ( 31): 46a52c9c 00000000

I/DEBUG ( 31): 46a52ca0 00000000

I/DEBUG ( 31): 46a52ca4 ab214410 /system/lib/libskia.so

I/DEBUG ( 31): 46a52ca8 46a52d80

I/DEBUG ( 31): 46a52cac ab1846d8 /system/lib/libskia.so

D/Zygote ( 33): Process 361 terminated by signal (11)

I/WindowManager( 59): WIN DEATH: Window{450026b0 com.quickcatchlabs.a1/com.quickcatchlabs.a1.TrooplaTest paused=false}

I/ActivityManager( 59): Process com.quickcatchlabs.a1 (pid 361) has died.

W/WindowManager( 59): No focus window, dropping: KeyEvent{action=1 code=32 repeat=0 meta=0 scancode=32 mFlags=8}

I/UsageStats( 59): Unexpected resume of com.android.launcher while already resumed in com.quickcatchlabs.a1

I/BootReceiver( 59): Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)

W/InputManagerService( 59): Got RemoteException sending setActive(false) notification to pid 361 uid 10037

D/dalvikvm( 59): GC_FOR_MALLOC freed 5659 objects / 635280 bytes in 154ms

D/dalvikvm( 59): GC_FOR_MALLOC freed 446 objects / 522320 bytes in 427ms

chipqcl

I've spent a bunch of time trying to isolate this, specifically by commenting out code in JQM. Most of the code related to text input or to form submission. None of it made a difference.

I did find a work-around that may help identify the problem. If you add a second text input field to the form, it no longer crashes. So it looks like it may be trying some kind of auto-submit after a few characters are typed when there is only one input field.

Also note that if the second input field is obscured (by using .hide() to an enclosing div, by setting that div style to display:none, or by moving that div off the page by using left-margin:-300), then it crashes. So whatever is triggering the auto-submit is very smart about what is on the visible page.

Todd Parker

The odd thing is there's no auto-submit logic. If you actually click on the submit button, we hijack the link to submit it by ajax, but the scripting on a normal text input is pretty much nil.

Jesse Vogt

Just ran into this as well but running under the jqtouch 1beta3 (sorry, legacy project, otherwise I use jqm) - all I need to cause the crash is to have the input element on the screen. App is single html document with many page divs. When transition to page containing input it crashes. Removing the input element no crash. On iPhone version, no crash.

2.1 emulator with PhoneGap 1.2. Not sure if this helps at all - may not be jqm issue since I am seeing it on jqtouch.

UPDATE:
My issue is only on the simulator and only occurs when the input type is specified. For now I am working around this by removing the input type attribute when I detect that I am running on the simulator (at the moment, I am detecting the simulator based on its default name - there may be a better way):

if (window.device.name === 'sdk') {
    $(".Calculator input").each(function (idx,elem) { elem.removeAttribute('type'); });
}
orotemo

+1 on https://github.com/chipqcl.
JQuery/zepto + backbone+underscore+phonegap 1.3 +android 2.1

Crash on single input form. no problem on more than one input forms.

Cause: the zepto or jquery, you can plug in any will make this happen.

Any solutions? anyone? I have two days on this, reading changing load order of JS, whatever, to no avail.

alex

I have the same problem on my application.

A form with just 1 input crashes on Android. I figured out that the problem is related to the time you click on the input.

If you open the page that contain the forms, no problem, when you clilck the first letter and wait a while.. it crashes.

If you click 1-2 letter and quickly submit the form, it works!!!

Hiding a second input doesnt works as well. More than 1 input works!!

Any other ideas???

orotemo
Jasper de Groot
Owner

I closed ticket #4103 as duplicate. It has useful information in the thread though.

I am also going to change the topic of this issue a little bit so it mentions the "only one input" aspect.

localhost1024

I think I have same issue. My project has a html document with a iframe(content),div(menubar) and jQM. Inside iframe, just jQuery not jQM.

08-01 11:53:28.300: I/DEBUG(25939): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr c37c0018
08-01 11:53:28.300: I/DEBUG(25939):  r0 be9750f8  r1 c37c0018  r2 be9750b0  r3 be9750a8
08-01 11:53:28.300: I/DEBUG(25939):  r4 be9751f0  r5 0052ffc0  r6 c37c00e0  r7 be9750d8
08-01 11:53:28.305: I/DEBUG(25939):  r8 00677380  r9 00000121  10 0000020d  fp be975370
08-01 11:53:28.305: I/DEBUG(25939):  ip 0000005a  sp be9750c8  lr a848c1f7  pc a8537e5c  cpsr 80000030
08-01 11:53:28.315: I/DEBUG(25939):  d0  4234000000000028  d1  4e7ffffd0000002d
08-01 11:53:28.315: I/DEBUG(25939):  d2  c3fe0000c3fdc000  d3  c3460000c3458000
08-01 11:53:28.315: I/DEBUG(25939):  d4  8000000043460000  d5  c3fe00003f800000
08-01 11:53:28.315: I/DEBUG(25939):  d6  c3460000c3fe0000  d7  422000004e7ffff8
08-01 11:53:28.315: I/DEBUG(25939):  d8  0000000044480000  d9  0000000000000000
08-01 11:53:28.315: I/DEBUG(25939):  d10 0000000000000000  d11 0000000000000000
08-01 11:53:28.315: I/DEBUG(25939):  d12 0000000000000000  d13 0000000000000000
08-01 11:53:28.315: I/DEBUG(25939):  d14 0000000000000000  d15 0000000000000000
08-01 11:53:28.315: I/DEBUG(25939):  d16 407fc00000000000  d17 407fc00000000000
08-01 11:53:28.315: I/DEBUG(25939):  d18 c068c00000000000  d19 0000000000000000
08-01 11:53:28.315: I/DEBUG(25939):  d20 3ff0000000000000  d21 8000000000000000
08-01 11:53:28.315: I/DEBUG(25939):  d22 4068c00000000000  d23 0000000000000000
08-01 11:53:28.315: I/DEBUG(25939):  d24 0000000000000000  d25 3ff0000000000000
08-01 11:53:28.315: I/DEBUG(25939):  d26 406ac00000000000  d27 3ff36db6e0000000
08-01 11:53:28.315: I/DEBUG(25939):  d28 0002aaa80002aaa8  d29 3ff0000000000000
08-01 11:53:28.315: I/DEBUG(25939):  d30 0000000000000000  d31 3ff0000000000000
08-01 11:53:28.325: I/DEBUG(25939):  scr 20000018
08-01 11:53:28.445: D/PowerManagerService(2998): onSensorChanged: light value: 1000
08-01 11:53:28.465: I/DEBUG(25939):          #00  pc 00237e5c  /system/lib/libwebcore.so
08-01 11:53:28.465: I/DEBUG(25939):          #01  lr a848c1f7  /system/lib/libwebcore.so
08-01 11:53:28.465: I/DEBUG(25939): code around pc:
08-01 11:53:28.465: I/DEBUG(25939): a8537e3c 2001e000 bdf0b005 0035f894 63212100 
08-01 11:53:28.465: I/DEBUG(25939): a8537e4c d0e12800 bf00e7f5 0023ba1c fffff244 
08-01 11:53:28.465: I/DEBUG(25939): a8537e5c 0a00ed91 0a00ed80 7a01edd1 7a01edc0 
08-01 11:53:28.465: I/DEBUG(25939): a8537e6c bf004770 ed2db570 23008b02 8a10eddf 
08-01 11:53:28.465: I/DEBUG(25939): a8537e7c 60034604 ed916043 ee188a00 460d0a10 
08-01 11:53:28.465: I/DEBUG(25939): code around lr:
08-01 11:53:28.465: I/DEBUG(25939): a848c1d4 46414620 f6de2210 e045e96a 4641af04 
08-01 11:53:28.465: I/DEBUG(25939): a848c1e4 f7554638 f106f8bf a80c0118 f0ab36e0 
08-01 11:53:28.465: I/DEBUG(25939): a848c1f4 edddfe33 ed9d4a04 ed9d3a05 eddd4a0c 
08-01 11:53:28.465: I/DEBUG(25939): a848c204 ee742a0d f10d3a84 ee330c28 edcd2a22 
08-01 11:53:28.465: I/DEBUG(25939): a848c214 ed8d3a04 e8962a05 466e0003 0003e88c 
08-01 11:53:28.465: I/DEBUG(25939): stack:
08-01 11:53:28.465: I/DEBUG(25939):     be975088  00000000  
08-01 11:53:28.465: I/DEBUG(25939):     be97508c  00000000  
08-01 11:53:28.465: I/DEBUG(25939):     be975090  000001e8  
08-01 11:53:28.465: I/DEBUG(25939):     be975094  0000007a  
08-01 11:53:28.465: I/DEBUG(25939):     be975098  00000032  
08-01 11:53:28.465: I/DEBUG(25939):     be97509c  00040006  
08-01 11:53:28.465: I/DEBUG(25939):     be9750a0  44293300  
08-01 11:53:28.465: I/DEBUG(25939):     be9750a4  0000ce40  
08-01 11:53:28.465: I/DEBUG(25939):     be9750a8  0000002d  
08-01 11:53:28.465: I/DEBUG(25939):     be9750ac  00000028  
08-01 11:53:28.465: I/DEBUG(25939):     be9750b0  00000106  
08-01 11:53:28.465: I/DEBUG(25939):     be9750b4  000001ed  
08-01 11:53:28.465: I/DEBUG(25939):     be9750b8  00000000  
08-01 11:53:28.465: I/DEBUG(25939):     be9750bc  be9751f0  
08-01 11:53:28.465: I/DEBUG(25939):     be9750c0  df002777  
08-01 11:53:28.465: I/DEBUG(25939):     be9750c4  e3a070ad  
08-01 11:53:28.465: I/DEBUG(25939): #00 be9750c8  000000c6  
08-01 11:53:28.470: I/DEBUG(25939):     be9750cc  000001fc  
08-01 11:53:28.470: I/DEBUG(25939):     be9750d0  0000007a  
08-01 11:53:28.470: I/DEBUG(25939):     be9750d4  00000019  
08-01 11:53:28.470: I/DEBUG(25939):     be9750d8  43830000  
08-01 11:53:28.470: I/DEBUG(25939):     be9750dc  43f68000  
08-01 11:53:28.470: I/DEBUG(25939):     be9750e0  42340000  
08-01 11:53:28.470: I/DEBUG(25939):     be9750e4  42200000  
08-01 11:53:28.470: I/DEBUG(25939):     be9750e8  000000d6  
08-01 11:53:28.470: I/DEBUG(25939):     be9750ec  0000020c  
08-01 11:53:28.470: I/DEBUG(25939):     be9750f0  0000005a  
08-01 11:53:28.470: I/DEBUG(25939):     be9750f4  00000022  
08-01 11:53:28.470: I/DEBUG(25939):     be9750f8  000000d6  
08-01 11:53:28.470: I/DEBUG(25939):     be9750fc  0000020c  
08-01 11:53:28.470: I/DEBUG(25939):     be975100  be9751f0  
08-01 11:53:28.470: I/DEBUG(25939):     be975104  0063e918  
08-01 11:53:28.470: I/DEBUG(25939):     be975108  00677380  
08-01 11:53:28.470: I/DEBUG(25939):     be97510c  00000022  

1st line signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr c37c0018 has another signal like 7, but almost 11.

sanielfishawy

I have run into this problem as well. It is 8 months old and seems to be a rather repeatable bug. Is there a fix?

jntd11

No solutions yet!! One year on!!! I am facing same problem on android 2.2

Alex Yaroshevich

JFYI

Android 2.2 x86 emulator, pceee. Crashing when transition starts (or idk when). Some times first page loaded fine but when i trying to go to the next inner page - It crashes browser.

There is an oppinion that animate (or css3 transition) makes it broken.
And one more is that tags for mobile apps loaded with ajax crashes browser too.

I don't really know what of these trigger memory leaks or whatever that kills browser.

Jasper de Groot
Owner

@gseguin

I closed #4016 as duplicate of this issue. Important difference is that it is about the Android browser on 2.2 and not about WebView / PhoneGap. The browser crashes when entering Japanese (multibyte) characters, but only if there is only one input.

Rasmus Christiansen

Is this two year old high priority issue still relevant?

Alexander Schmitz arschmitz closed this April 17, 2014
Alexander Schmitz
Collaborator

Im going to close this as being stale i'm going to guess its been fixed since there are no further reports in several years we can reopen if any one is still having this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.