i got this error in sdk3.x too, however when running in sdk4 it now crashed the app
could appcelerator stuff please give me some hint, as to why this could happen, or how i can avoid this when coding?
for os4 did you try this?
And for your error, try adding the code below in your app.js :
var view = Titanium.UI.createView();