[AC-2510] _.isEmpty() causes crash
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-11-30T17:34:25.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | external-lib |
Reporter | Igor Santos |
Assignee | Mauro Parra-Miranda |
Created | 2012-11-29T02:31:22.000+0000 |
Updated | 2016-03-08T07:41:34.000+0000 |
Description
Sample code:
var testArray = []
_.isEmpty(testArray)
This causes the following line in the log, and [a lot of hex code](http://pastebin.com/ExiuqSx7) under it:
F/libc ( 586): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)
Is this iOS? Android? Which version? What TiSDK?
Sorry, I was quite sleepy when I posted this issue. It was on Android, trying both 2.3.3 and 4.0.3 versions, on SDK 3.0 v2012-11-13 17:02:03
Ok, I've just discovered what's happening. I hadn't declared the
_
variable (required the proper library file) in my code. The point is: Titanium should say "_ not declared" instead of throwing all that garbage in the console, shouldn't it? BTW: I have _ declared in many other files, including two modules that are included on the given file.Ah, well at least you found the problem. I'll close as fixed. I'm not sure if you're using it already, but Ti Studio 3.0 should give more accurate error messages (especially if used in conjunction with the new Code Processor), would be interesting to try it out for this.