Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7252] Android: Rhino apps print thousands of VFY logcat messages when backed-out of

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2013-08-01T21:00:15.000+0000
Affected Version/sn/a
Fix Version/sSprint 2012-03, Release 1.8.2
ComponentsAndroid
Labelsmodule_build, qe-ios11612, qe-nfc, qe-testadded
ReporterWilson Luu
AssigneeBill Dawson
Created2012-01-16T15:25:27.000+0000
Updated2017-03-20T20:32:02.000+0000

Description

Fail Case / Test Case

* Create any Titanium app (does not need to be based on a template). * Select Rhino as the runtime. * Enable debug logcat messages by adding <property type="bool" name="ti.android.debug">true</property> to tiapp.xml. * Launch the app to emulator or device, it does not matter. * Back out of the app. * Check the logcat. In the fail case, you'll see a ton (literally thousands?) of "VFY" related messages have scrolled by. When testing the fix, you should not see these, but you should see some "dispose()" messages (those messages only appear if ti.android.debug is set to true). --- ORIG DETAILS FOLLOW --- Details: After creating a tabbed template and installing to an Android device, unexpected messages appear in the logcat after exiting the app. Steps to reproduce: 1. Create a Tabbed Application using the project template wizard 2. Make sure runtime is set to Rhino 3. Install to an Android device 4. After app is launched, press the back button Actual: Unexpected Warning, Debug, and Error messages appear in the logcat. See attachment. Expected: Unexpected messages should not appear. Note: To repeatedly reproduce bug on the same device, Force Stop the app and relaunch.

Attachments

FileDateSize
log.txt2012-01-16T15:25:27.000+000068886

Comments

  1. Wilson Luu 2012-01-16

    This bug seems to occur for Single Window Template and Master/Detail Template as well.
  2. Kevin Whinnery 2012-01-17

    This will be a platform issue - the mobile SDK is looking for modules that should not be included in the build. All the usual suspects for "unneeded" modules are there - Contacts, Facebook, etc. - none of them are used in the templates. The fix for this will likely be in the logic which deals with these "optional" modules.
  3. Ingo Muschenetz 2012-01-17

    Neeraj...appears to be a Mobile platform issue. Assigning to you so you so you can decide how you'd like to proceed.
  4. Bill Dawson 2012-01-31

    Doesn't happen on OSX with Studio 1.0.8.201201262211 and production 1.8.1 mobile sdk. Trying Ubuntu ...
  5. Bill Dawson 2012-01-31

    Sorry, misspoke: I had forgotten to switch to Rhino. It *does* happen with production 1.8.1. Still investigating.
  6. Bill Dawson 2012-02-01

    Problem Description

    Our generated KrollGeneratedBindings.java keeps a hash of all proxy prototype classes in the Android Titanium Mobile SDK. When the runtime shuts down (i.e., backing out of the app), we run through all those prototype classes and call their static dispose methods. For many of those prototypes, the calling of the static dispose will be the first time the prototype class is used. For example, if you're _not_ using the Facebook module in your app, then when we call ti.modules.titanium.facebook.FacebookModulePrototype.dispose(), the FacebookModulePrototype will be loaded by the class loader for the very first time. And since you're not using Facebook in your app, the Facebook module itself is not even packaged in the application. Therefore once dispose() is called the class loader will show all these VFY errors because the FacebookModulePrototype class refers to the FacebookModule class, which doesn't exist.

    Solution Description

    The solution I came up with is to keep a Set of prototypes that are actually used (instantiated) during the lifetime of the application, then when it's time to dispose (when the runtime shuts down), just call dispose on those prototype classes.
  7. Bill Dawson 2012-02-01

    Pull request ready https://github.com/appcelerator/titanium_mobile/pull/1324
  8. Michael Pettiford 2012-02-06

    Closing issue: Tested with Ti Studio Build 1.0.8.201201262211 Ti Mobile SDK 1.9.0.v20120206101634 OSX Lion Android emulator 2.2, Droid 3 Expected behavior is shown
  9. Pragya Rastogi 2012-10-18

    VFY logcat messages appears for V8 and Rhino. OS: Mountain Lion OSX 10.8.2 Titanium Studio, build: 3.0.0.201210172118 Titanium SDK: 3.0.0.v20121017192538 10-18 16:32:16.316: W/dalvikvm(1032): VFY: unable to resolve new-instance 169 (Landroid/os/StrictMode$ThreadPolicy$Builder;) in Lorg/appcelerator/kroll/common/TiFastDev; 10-18 16:32:16.326: D/dalvikvm(1032): VFY: replacing opcode 0x22 at 0x0016 10-18 16:32:16.326: D/dalvikvm(1032): VFY: dead code 0x0018-0025 in Lorg/appcelerator/kroll/common/TiFastDev;. (Lorg/appcelerator/kroll/KrollApplication;)V 10-18 16:32:19.117: W/dalvikvm(1032): VFY: unable to resolve virtual method 5666: Lorg/appcelerator/titanium/TiBaseActivity;.getActionBar ()Landroid/app/ActionBar; 10-18 16:32:19.127: D/dalvikvm(1032): VFY: replacing opcode 0x6e at 0x0013 10-18 16:32:19.127: D/dalvikvm(1032): VFY: dead code 0x0016-001f in Lti/modules/titanium/ui/TabGroupProxy;.windowCreated (Lorg/appcelerator/titanium/TiBaseActivity;)V

JSON Source