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.
PR: https://github.com/appcelerator/titanium_mobile/pull/3223
backport PR: https://github.com/appcelerator/titanium_mobile/pull/3239
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