Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2510] _.isEmpty() causes crash

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2012-11-30T17:34:25.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsexternal-lib
ReporterIgor Santos
AssigneeMauro Parra-Miranda
Created2012-11-29T02:31:22.000+0000
Updated2016-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)

Comments

  1. Daniel Sefton 2012-11-29

    Is this iOS? Android? Which version? What TiSDK?
  2. Igor Santos 2012-11-29

    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
  3. Igor Santos 2012-11-30

    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.
  4. Daniel Sefton 2012-11-30

    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.

JSON Source