Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11410] Android: Runtime error is thrown for evalJS

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-10-15T21:52:39.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 21 Core, 2012 Sprint 21
ComponentsAndroid
Labelscore, qe-and100112, qe-testadded, regression
ReporterShyam Bhadauria
AssigneeAllen Yeung
Created2012-10-12T10:12:44.000+0000
Updated2013-10-07T10:05:39.000+0000

Description

This is a regression .It works fine with 2.1.3 GA. Steps to reproduce: 1. Use the code below in app.js
var win= Ti.UI.createWindow();
var test = require("com.arcaner.testModule2");
		test.evalJS("Ti.API.debug('Hello World'); 100+1");
		test.evalJSWithContext("Ti.API.debug('Hello from TiContext'); 1.1+100;");
		test.evalFileWithContext("test.js");
		
win.open();
2. Add below modules to the tiapp.xml of the project ti.harness ti.omniture com.arcaner.testModule2 3. Download the attached modules zip file, unzip it and add it to the project at root level. 4. Run the project. Expected result: No runtime error should be shown. The console should show the following: D/TiAPI ( 738): Hello World D/Testmodule2Module( 738): (KrollRuntimeThread) [2199,5043] Result = 101 D/TiAPI ( 738): Hello from TiContext D/Testmodule2Module( 738): (KrollRuntimeThread) [8,5152] TiContext Result = 101.1 D/TiAPI ( 738): Hello world from a file D/Testmodule2Module( 738): (KrollRuntimeThread) [11,5163] TiContext File Result = 102 Actual reult: Runtime error is thrown. Error log attached with bug.

Attachments

FileDateSize
modules.zip2012-10-12T10:12:44.000+0000127687
TIMOB-7233.rtf2012-10-12T10:12:44.000+00002656

Comments

  1. Allen Yeung 2012-10-13

    PR: https://github.com/appcelerator/titanium_mobile/pull/3223
  2. Ping Wang 2012-10-15

    backport PR: https://github.com/appcelerator/titanium_mobile/pull/3239
  3. Shyam Bhadauria 2012-10-25

    No error is thrown now.Environment used for verification - Titanium SDK: 3.1.0.v20121024131714 Titanium SDK:3.0.0.v20121024144610 Titanium  Studio:3.0.0.201210220122

JSON Source