Hi, i can't fogure out, why my Blackberry app crashes. There are 2 snippets of code that lead to crash of the app. (i tested it in an empty app just after creating new mobile project)
Application type: mobile
Titanium SDK: 3.5.0.GA
Platform & version: Blackberry 10
Device: BlackBerry Simulator 10 and BlackBerry 10
Host Operating System: Windows 7
Titanium Studio: build: 3.4.1.201410281727
a simple test case:
//the following function call leads to crash of the app.(callback can be an empty function, //it doesn't change anything) Ti.App.addEventListener("event", function(e){ alert("in listener"); } ); // this code also leads to crash. // deletion of "Function.prototype.derive = " solves the problem. but if i call the function later, // the app crashes anyway.. because there are other assignments to prototype in it. Function.prototype.derive = function( parentClassOrObject ){ if ( parentClassOrObject.constructor == Function ) { //Normal Inheritance this.prototype = new parentClassOrObject; this.prototype.constructor = this; this.prototype._super = parentClassOrObject.prototype; } else { //Pure Virtual Inheritance this.prototype = parentClassOrObject; this.prototype.constructor = this; this.prototype._super = parentClassOrObject; } return this; }Logs: app crashes with no error massages on blackberry, but works on iOS and Android.
As i detected, any assignment of any (f.i. empty one) function to prototype's attributes lead to a crash.
Any help will be appreciated. Thanks in advance!