Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5085] Tooling: Disabling Spotlight causes iOS builder.py to hang on OSX Lion

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-09-09T12:26:53.000+0000
Affected Version/sRelease 1.8.0
Fix Version/sSprint 2011-35, Release 1.8.0
ComponentsTooling
Labelsn/a
ReporterMarshall Culpepper
AssigneeMarshall Culpepper
Created2011-08-23T10:51:37.000+0000
Updated2017-03-08T00:03:39.000+0000

Description

If you have the Spotlight indexer disabled, the iPhone builder.py will hang when it tries to use mdfind to search for log files. Snippet of the builder.py output:
--- snip copying stuff ---

[DEBUG] executing command: /usr/bin/killall iPhone Simulator
[DEBUG] No matching processes belonging to you were found
[DEBUG] finding old log files
[DEBUG] executing command: mdfind -onlyin /Users/marshall/Library/Application Support/iPhone Simulator/4.3 -name .log
(HANG HERE)
To reproduce this, simply disable the Spotlight indexer, and try running any iPhone project:
$ sudo mdutil -a -i off
$ titanium run --platform=iphone
We can easily workaround this by checking the status of the Spotlight indexer with mdutil, and falling back to Python's os.walkdir or, simply use find:
$ mdutil -a -s
/:
	Indexing disabled.

Comments

  1. Marshall Culpepper 2011-08-26

    To test this fix, just disable spotlight indexing as listed above. Without the patch builder.py will hang for a _very_ long time. With the patch, builder.py will fall back to using recursive file search. Also try adding this property to a Titanium app:
       <property name="ti.ios.enablemdfind" type="bool">false</property>
       
    Build the app, and you should just notice that it no longer uses mdfind in the debugging output.
  2. Marshall Culpepper 2011-09-09

    this has been merged
  3. Lee Morris 2017-03-08

    Closing ticket due to time passed.

JSON Source