Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2905] Android: App crashes when calling Titanium.App.fireEvent from WebView

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2013-03-19T21:11:47.000+0000
Affected Version/sRelease 1.6.2
Fix Version/s2013 Sprint 06 Core, 2013 Sprint 06
ComponentsAndroid
Labelsandroid, crash, triage, webview
Reportergregmuellegger
AssigneeAllen Yeung
Created2011-04-15T03:32:33.000+0000
Updated2017-03-22T18:09:35.000+0000

Description

Hi the following is my HTML code that is in a separate file in news.html

<!DOCTYPE html>
<html>
<head>
    <title>Test</title>
</head>
<body>

    <h1>Test</h1>
    <a onclick="Titanium.App.fireEvent('myEvent', {value: 2});">Fire event.</a>

</body>
</html>

The WebView is created here:

var webview = Titanium.UI.createWebView({
    url: 'news.html',
});

So nothing special. I even have no EventListener registered, but the application crashes without any message and restarts if I click the link in the HTML.

I'm using Titanium Developer 1.2.2, Android SDK with "APIs 2.3" and Titanium SDK 1.5.1 on Linux (Ubuntu 10.10).

here is the ouput of [TRACE] in the simulator after I clicked the link:

[TRACE] E/TiUIView( 941): (main) [9097,962204] TAP, TAP, TAP on [Ti.UI.WebView]
[TRACE] W/dalvikvm( 941): JNI WARNING: jarray 0x406156d8 points to non-array object (Ljava/lang/String;)
[TRACE] I/dalvikvm( 941): "WebViewCoreThread" prio=5 tid=13 NATIVE
[TRACE] I/dalvikvm( 941): | group="main" sCount=0 dsCount=0 obj=0x40527d30 self=0x2de508
[TRACE] I/dalvikvm( 941): | sysTid=959 nice=0 sched=0/0 cgrp=default handle=2816864
[TRACE] I/dalvikvm( 941): | schedstat=( 821385490 468162602 110 )
[TRACE] I/dalvikvm( 941): at android.webkit.WebViewCore.nativeTouchUp(Native Method)
[TRACE] I/dalvikvm( 941): at android.webkit.WebViewCore.nativeTouchUp(Native Method)
[TRACE] I/dalvikvm( 941): at android.webkit.WebViewCore.access$3300(WebViewCore.java:53)
[TRACE] I/dalvikvm( 941): at android.webkit.WebViewCore$EventHub$1.handleMessage(WebViewCore.java:1158)
[TRACE] I/dalvikvm( 941): at android.os.Handler.dispatchMessage(Handler.java:99)
[TRACE] I/dalvikvm( 941): at android.os.Looper.loop(Looper.java:123)
[TRACE] I/dalvikvm( 941): at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:629)
[TRACE] I/dalvikvm( 941): at java.lang.Thread.run(Thread.java:1019)
[TRACE] I/dalvikvm( 941):
[TRACE] E/dalvikvm( 941): VM aborting
[TRACE] I/DEBUG ( 653): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[TRACE] I/DEBUG ( 653): Build fingerprint: 'generic/google_sdk/generic:2.3/GRH55/79397:eng/test-keys'
[TRACE] I/DEBUG ( 653): pid: 941, tid: 959 >>> com.maworks.modelagency <<<
[TRACE] I/DEBUG ( 653): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00d
[TRACE] I/DEBUG ( 653): r0 fffffebc r1 deadd00d r2 00000026 r3 00000000
[TRACE] I/DEBUG ( 653): r4 81da45c8 r5 406156d8 r6 81d8592c r7 002f6228
[TRACE] I/DEBUG ( 653): r8 4469bb54 r9 44289e4c 10 44289e34 fp 41edd82c
[TRACE] I/DEBUG ( 653): ip 81da4728 sp 4469b348 lr afd19375 pc 81d45a02 cpsr 20000030
[TRACE] I/DEBUG ( 653): #00 pc 00045a02 /system/lib/libdvm.so
[TRACE] I/DEBUG ( 653): #01 pc 000376fc /system/lib/libdvm.so
[TRACE] I/DEBUG ( 653): #02 pc 000399c4 /system/lib/libdvm.so
[TRACE] I/DEBUG ( 653): #03 pc 0003a4a0 /system/lib/libdvm.so
[TRACE] I/DEBUG ( 653): #04 pc 0032c006 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #05 pc 002a56d4 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #06 pc 001a6a76 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #07 pc 002a61a0 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #08 pc 0035a766 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #09 pc 0035dabe /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #10 pc 0036b9a8 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #11 pc 003630dc /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #12 pc 002a0454 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #13 pc 00233fb6 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #14 pc 0023a544 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #15 pc 00238324 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #16 pc 0023846a /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #17 pc 0023b6f2 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #18 pc 0023b886 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #19 pc 000f8a08 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #20 pc 000f95ae /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #21 pc 001b8b3a /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #22 pc 001b8c32 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #23 pc 001b8c58 /system/lib/libwebcore.so
[TRACE] I/DEBUG ( 653): #24 pc 00017d34 /system/lib/libdvm.so
[TRACE] I/DEBUG ( 653):
[TRACE] I/DEBUG ( 653): code around pc:
[TRACE] I/DEBUG ( 653): 81d459e0 447a4479 ed0cf7d1 20004c09 ee34f7d1
[TRACE] I/DEBUG ( 653): 81d459f0 447c4808 6bdb5823 d0002b00 49064798
[TRACE] I/DEBUG ( 653): 81d45a00 700a2226 eea0f7d1 0004355f 0004511d
[TRACE] I/DEBUG ( 653): 81d45a10 0005ebd2 fffffebc deadd00d b510b40e
[TRACE] I/DEBUG ( 653): 81d45a20 4c0a4b09 447bb083 aa05591b 6b5bca02
[TRACE] I/DEBUG ( 653):
[TRACE] I/DEBUG ( 653): code around lr:
[TRACE] I/DEBUG ( 653): afd19354 b0834a0d 589c447b 26009001 686768a5
[TRACE] I/DEBUG ( 653): afd19364 220ce008 2b005eab 1c28d003 47889901
[TRACE] I/DEBUG ( 653): afd19374 35544306 d5f43f01 2c006824 b003d1ee
[TRACE] I/DEBUG ( 653): afd19384 bdf01c30 000281a8 ffffff88 1c0fb5f0
[TRACE] I/DEBUG ( 653): afd19394 43551c3d a904b087 1c16ac01 604d9004
[TRACE] I/DEBUG ( 653):
[TRACE] I/DEBUG ( 653): stack:
[TRACE] I/DEBUG ( 653): 4469b308 00000015
[TRACE] I/DEBUG ( 653): 4469b30c afd18407 /system/lib/libc.so
[TRACE] I/DEBUG ( 653): 4469b310 afd4270c /system/lib/libc.so
[TRACE] I/DEBUG ( 653): 4469b314 afd426b8 /system/lib/libc.so
[TRACE] I/DEBUG ( 653): 4469b318 00000000
[TRACE] I/DEBUG ( 653): 4469b31c afd19375 /system/lib/libc.so
[TRACE] I/DEBUG ( 653): 4469b320 002de508 [heap]
[TRACE] I/DEBUG ( 653): 4469b324 afd183d9 /system/lib/libc.so
[TRACE] I/DEBUG ( 653): 4469b328 002f6228 [heap]
[TRACE] I/DEBUG ( 653): 4469b32c 0005ebd2 [heap]
[TRACE] I/DEBUG ( 653): 4469b330 406156d8 /dev/ashmem/dalvik-heap (deleted)
[TRACE] I/DEBUG ( 653): 4469b334 81d8592c /system/lib/libdvm.so
[TRACE] I/DEBUG ( 653): 4469b338 002f6228 [heap]
[TRACE] I/DEBUG ( 653): 4469b33c afd18437 /system/lib/libc.so
[TRACE] I/DEBUG ( 653): 4469b340 df002777
[TRACE] I/DEBUG ( 653): 4469b344 e3a070ad
[TRACE] I/DEBUG ( 653): #00 4469b348 00000001
[TRACE] I/DEBUG ( 653): 4469b34c 81d37701 /system/lib/libdvm.so
[TRACE] I/DEBUG ( 653): #01 4469b350 00000001
[TRACE] I/DEBUG ( 653): 4469b354 81d399c9 /system/lib/libdvm.so
[TRACE] I/BootReceiver( 62): Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)
[TRACE] D/Zygote ( 33): Process 941 terminated by signal (11)
[TRACE] I/ActivityManager( 62): Process com.maworks.modelagency (pid 941) has died.
[TRACE] E/InputDispatcher( 62): channel '407fe670 com.maworks.modelagency/com.maworks.modelagency.ModelagencyActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8
[TRACE] E/InputDispatcher( 62): channel '407fe670 com.maworks.modelagency/com.maworks.modelagency.ModelagencyActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
[TRACE] D/dalvikvm( 62): GC_CONCURRENT freed 1121K, 53% free 4447K/9287K, external 3800K/4746K, paused 6ms+7ms
[TRACE] D/dalvikvm( 62): GC_FOR_MALLOC freed 801K, 54% free 4355K/9287K, external 3800K/4746K, paused 57ms
[TRACE] I/WindowManager( 62): WIN DEATH: Window{407fe670 com.maworks.modelagency/com.maworks.modelagency.ModelagencyActivity paused=false}
[TRACE] I/WindowManager( 62): WIN DEATH: Window{407eaaf0 com.maworks.modelagency/org.appcelerator.titanium.TiActivity paused=false}
[TRACE] I/WindowManager( 62): WIN DEATH: Window{40810298 com.maworks.modelagency/org.appcelerator.titanium.TiActivity paused=false}
[TRACE] I/ActivityManager( 62): Start proc com.maworks.modelagency for activity com.maworks.modelagency/org.appcelerator.titanium.TiActivity: pid=962 uid=10033 gids={1015, 3003}
[TRACE] E/InputDispatcher( 62): Received spurious receive callback for unknown input channel. fd=162, events=0x8
[TRACE] E/InputDispatcher( 62): Received spurious receive callback for unknown input channel. fd=156, events=0x8
[TRACE] I/Log ( 962): (main) [0,0] checkpoint, app created.
[TRACE] I/TiApplication( 962): (main) [344,344] Titanium 1.5.1 (2010/12/16 16:25 6bbb92)
[TRACE] D/TiApplication( 962): (main) [2,346] Application onCreate
[TRACE] D/TiBaseActivity( 962): (main) [69,415] Activity onCreate
[TRACE] W/OrientationEventListener( 962): Cannot detect sensors. Not enabled
[TRACE] D/TiBaseActivity( 962): (main) [80,495] Activity onStart
[TRACE] D/TiBaseActivity( 962): (main) [4,499] Activity onResume
[TRACE] E/TiBaseActivity( 962): (main) [19,518] Unable to message creator. finishing.
[TRACE] D/TiBaseActivity( 962): (main) [108,626] Activity onPause
[TRACE] D/dalvikvm( 62): GC_EXTERNAL_ALLOC freed 555K, 55% free 4219K/9287K, external 3725K/3903K, paused 71ms
[TRACE] I/Log ( 962): (main) [0,0] checkpoint, on root activity create, savedInstanceState: Bundle[{android:viewHierarchyState=Bundle[mParcelledData.dataSize=124]}]
[TRACE] E/TiRootActivity( 962): (main) [1,1] Instance Count: 0
[TRACE] I/ActivityManager( 62): Displayed com.maworks.modelagency/org.appcelerator.titanium.TiActivity: +2s327ms
[TRACE] D/TiApplication( 962): (main) [852,853] Analytics Event: type=ti.start
[TRACE] D/TiApplication( 962): event=ti.start
[TRACE] D/TiApplication( 962): timestamp=2011-01-21T11:10:58.168+0000
[TRACE] D/TiApplication( 962): mid=9da432425e2d3300
[TRACE] D/TiApplication( 962): sid=4ab89c40-3dd8-4190-b6c5-68df0b738f6c
[TRACE] D/TiApplication( 962): aguid=3b8b981a-3d7c-40b3-8d19-8a607797635f
[TRACE] D/TiApplication( 962): isJSON=true
[TRACE] D/TiApplication( 962): payload={"os":"google_sdk","tz":0,"nettype":"MOBILE","deploytype":"development","app_version":"1.0","osver":"2.3","un":"android-build","version":"1.5.1"}
[TRACE] E/TiApplication( 962): (main) [164,1017] APP PROXY: [Ti.App]
[TRACE] D/dalvikvm( 962): GC_EXTERNAL_ALLOC freed 454K, 52% free 2923K/6023K, external 1626K/2137K, paused 58ms
[TRACE] E/ROOT ( 962): (main) [205,1222] Leaving TiRootActivity.onCreate
[TRACE] I/Log ( 962): (main) [0,0] checkpoint, on root activity resume. context = org.appcelerator.titanium.TiContext@4059c2f0
[TRACE] I/TiRootActivity( 962): (Thread-11) [25,25] eval app.js
[TRACE] D/KrollContext( 962): (kroll$1) [12,37] Running evaluated script: app://app.js
[TRACE] W/TiAnalyticsSvc( 962): (Thread-12) [72,109] Analytics Service Started
[TRACE] W/InputManagerService( 62): Got RemoteException sending setActive(false) notification to pid 941 uid 10033
[TRACE] I/ActivityManager( 62): Displayed com.maworks.modelagency/.ModelagencyActivity: +2s143ms
[TRACE] I/ActivityManager( 62): Starting: Intent { cmp=com.maworks.modelagency/org.appcelerator.titanium.TiActivity (has extras) } from pid 962
[TRACE] D/TiRootActivity( 962): (main) [952,1061] root activity onPause, context = org.appcelerator.titanium.TiContext@4059c2f0
[TRACE] D/TiBaseActivity( 962): (main) [41,1102] Activity onCreate
[TRACE] W/OrientationEventListener( 962): Cannot detect sensors. Not enabled
[TRACE] D/TiBaseActivity( 962): (main) [44,1146] Activity onStart
[TRACE] D/TiBaseActivity( 962): (main) [1,1147] Activity onResume
[TRACE] D/TiBaseActivity( 962): (main) [8,1155] Notifying Window, activity is created
[TRACE] D/KrollContext( 962): (kroll$2) [599,1754] Running evaluated script: app://home.js
[TRACE] I/ActivityManager( 62): Displayed com.maworks.modelagency/org.appcelerator.titanium.TiActivity: +756ms
[TRACE] D/TiBaseActivity( 962): (main) [374,2128] Activity onStop
[TRACE] W/OrientationEventListener( 962): Cannot detect sensors. Invalid disable
[TRACE] E/TiBaseActivity( 962): (main) [2,2130] Layout cleanup.
[TRACE] I/TiAnalyticsSvc( 962): (Thread-12) [758,2888] Sending 1 analytics events.
[TRACE] D/dalvikvm( 962): GC_CONCURRENT freed 833K, 53% free 3218K/6727K, external 2474K/2780K, paused 5ms+4ms
[TRACE] W/TiAnalyticsSvc( 962): (Thread-12) [2837,5725] Stopping Analytics Service

Attachments

FileDateSize
FireEventCrash.rtf2011-04-28T12:14:10.000+00008026

Comments

  1. Stephen Tramer 2011-04-15

    Assigning to Don for triage.

  2. Dawson Toth 2011-04-28

    Reproduced

    I have been able to reproduce this as well, and have created a Gist with a reproduction. I have also attached my crash log ("FireEventCrash.rtf"). https://gist.github.com/3184238751130aa0206b

    Tested On

    I used Titanium SDK version: 1.6.1 (03/09/11 10:58 6d9b0f3...) Customer reproduced same results with 1.6.2 WORKS in Android Emulator 2.2 WORKS on Android Device Samsung Epic 4G running Android 2.2 BROKEN on Android Emulator 2.3.1

    Associated Helpdesk Ticket

    A HD customer has also noticed this. http://appc.me/c/APP-185541
  3. Junaid Younus 2012-08-29

    Tested on a Samsung Galaxy S2 (running 2.3) using TiSDK 2.2.0v20120828153312, unable to reproduce the issue. Ticket marked as resolved.
  4. Daniel Neckel 2013-02-24

    For me the issue still very much exists. I am running TI SDK 3.0.2.v20130129171611 currently all Android Versions from 2.3.3 to 4.2.2 crash with this error for me
  5. Neeraj Gupta 2013-02-25

    @Daniel - Please provide a test case that reproduces this issue for you and we would reopen the ticket.
  6. Imran Rasool 2013-03-18

    For me the issue still very much exists. I am running TI SDK 3.0.2.v20130129171611 currently all Android Versions from 2.3.3 to 4.2.2 crash with this error for me
  7. Neeraj Gupta 2013-03-18

    Reopening the ticket based on latest comment that this issue can be reproduced with 3.0.2 release.
  8. Allen Yeung 2013-03-19

  9. Lee Morris 2017-03-22

    Closing ticket as the issue will not fix and with reference to the above comments.

JSON Source