<!-- 
RSS generated by JIRA (5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9) at Sat May 18 03:06:29 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.couchbase.com/issues/si/jira.issueviews:issue-xml/CBMI-72/CBMI-72.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Couchbase</title>
    <link>http://www.couchbase.com/issues</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.4</version>
        <build-number>845</build-number>
        <build-date>26-12-2012</build-date>
    </build-info>

<item>
            <title>[CBMI-72] CouchbaseMobile startup failure on iOS 5.1</title>
                <link>http://www.couchbase.com/issues/browse/CBMI-72</link>
                <project id="10044" key="CBMI">Couchbase Mobile iOS</project>
                        <description>Couchbase fails to start.&lt;br/&gt;
This issue can be replicated by checking-out the latest CouchbaseMobile demo on github:&lt;br/&gt;
&lt;a href=&quot;https://github.com/couchbaselabs/iOS-Couchbase-Demo&quot;&gt;https://github.com/couchbaselabs/iOS-Couchbase-Demo&lt;/a&gt;&lt;br/&gt;
&lt;br/&gt;
In order to reproduce this error, the device must not have been enabled for development through Xcode.&lt;br/&gt;
The moment you press &amp;quot;Use for Development&amp;quot; in Xcode, and then run the app, Couchbase successfully starts.&lt;br/&gt;
&lt;br/&gt;
The log messages seen when running the application are:&lt;br/&gt;
Mar 13 16:59:00 unknown GrocerySync[428] : ------ application:didFinishLaunchingWithOptions:&lt;br/&gt;
Mar 13 16:59:00 unknown kernel[0] : launchd[428] Builtin profile: container (sandbox)&lt;br/&gt;
Mar 13 16:59:00 unknown kernel[0] : launchd[428] Container: /private/var/mobile/Applications/F8D6B51E-8CED-42B0-907B-F94378E2403A [69] (sandbox)&lt;br/&gt;
Mar 13 16:59:30 unknown GrocerySync[428] : Couchbase: Error: No startup notification from server engine&lt;br/&gt;
&lt;br/&gt;
Even if debug logging is turned on via the default_ios.ini file, still no more detailed couch logs are shown.</description>
                <environment>iOS 5.1</environment>
            <key id="16294">CBMI-72</key>
            <summary>CouchbaseMobile startup failure on iOS 5.1</summary>
                <type id="1" iconUrl="http://www.couchbase.com/issues/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.couchbase.com/issues/images/icons/priorities/critical.png">Critical</priority>
                    <status id="1" iconUrl="http://www.couchbase.com/issues/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jchrisa">J Chris Anderson</assignee>
                                <reporter username="chaisedh">Chaise Hocking</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Mar 2012 01:44:18 -0500</created>
                <updated>Tue, 13 Mar 2012 20:37:32 -0500</updated>
                                    <version>2.0</version>
                                                <component>SDK</component>
                                <votes>4</votes>
                        <watches>4</watches>
                                                    <comments>
                    <comment id="24871" author="tachyonimpulse" created="Tue, 13 Mar 2012 05:32:37 -0500"  >I would like to escalate this to a blocker. </comment>
                    <comment id="24872" author="jens" created="Tue, 13 Mar 2012 11:53:01 -0500"  >&amp;gt; the device must not have been enabled for development through Xcode.&lt;br/&gt;
&lt;br/&gt;
Is that permanent? Is there a way to reproduce this with a device that&amp;#39;s already been development-enabled, short of wiping and re-installing the OS?</comment>
                    <comment id="24874" author="thmr" created="Tue, 13 Mar 2012 12:31:25 -0500"  >I have similar problem with an app that uses CouchBase on iOS 5.1. My app works when the device is connected to my development machine. All of the custom code was inspected and there are no memory leaks.&lt;br/&gt;
The app crashes at start up only after I reboot the ios5.1 device and when the device is not connected to development machine.&lt;br/&gt;
The app works just fine on ios5.0.0.1 and 4.3.&lt;br/&gt;
&lt;br/&gt;
-----------------------------------&lt;br/&gt;
Some details from the crash log:&lt;br/&gt;
-----------------------------------&lt;br/&gt;
&lt;br/&gt;
Incident Identifier: 0E3400D5-802F-4508-AD73-414E3CA608AB&lt;br/&gt;
CrashReporter Key: c35154e21347780a3a93befed1dbd11b41b5a150&lt;br/&gt;
Hardware Model: iPad2,1&lt;br/&gt;
Process: halfteam [78]&lt;br/&gt;
Path: /var/mobile/Applications/0F8E0ACA-D374-4673-AC46-B0811B6974D8/halfteam.app/halfteam&lt;br/&gt;
Identifier: halfteam&lt;br/&gt;
Version: ??? (???)&lt;br/&gt;
Code Type: ARM (Native)&lt;br/&gt;
Parent Process: launchd [1]&lt;br/&gt;
&lt;br/&gt;
Date/Time: 2012-03-13 11:24:39.012 -0400&lt;br/&gt;
OS Version: iPhone OS 5.1 (9B176)&lt;br/&gt;
Report Version: 104&lt;br/&gt;
&lt;br/&gt;
Exception Type: EXC_CRASH (SIGABRT)&lt;br/&gt;
Exception Codes: 0x00000000, 0x00000000&lt;br/&gt;
Crashed Thread: 0&lt;br/&gt;
&lt;br/&gt;
Last Exception Backtrace:&lt;br/&gt;
0 CoreFoundation 0x33eb388f __exceptionPreprocess + 163&lt;br/&gt;
1 libobjc.A.dylib 0x329a5259 objc_exception_throw + 33&lt;br/&gt;
2 CoreFoundation 0x33eb3789 +[NSException raise:format:] + 1&lt;br/&gt;
3 Foundation 0x32df93a3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 91&lt;br/&gt;
4 halfteam 0x000a4425 -[AppDelegate couchbaseMobile:failedToStart:] (AppDelegate.m:62)&lt;br/&gt;
5 halfteam 0x000cf2f9 -[CouchbaseMobile startupTimeout] + 89&lt;br/&gt;
6 Foundation 0x32e2b933 __NSFireDelayedPerform + 415&lt;br/&gt;
7 CoreFoundation 0x33e87a33 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 15&lt;br/&gt;
8 CoreFoundation 0x33e87699 __CFRunLoopDoTimer + 365&lt;br/&gt;
9 CoreFoundation 0x33e8626f __CFRunLoopRun + 1207&lt;br/&gt;
10 CoreFoundation 0x33e094a5 CFRunLoopRunSpecific + 301&lt;br/&gt;
11 CoreFoundation 0x33e0936d CFRunLoopRunInMode + 105&lt;br/&gt;
12 GraphicsServices 0x33387439 GSEventRunModal + 137&lt;br/&gt;
13 UIKit 0x35afee7d UIApplicationMain + 1081&lt;br/&gt;
14 halfteam 0x000a405f main (main.m:14)&lt;br/&gt;
15 halfteam 0x000a4018 start + 40&lt;br/&gt;
.....&lt;br/&gt;
</comment>
                    <comment id="24875" author="patbarry" created="Tue, 13 Mar 2012 14:22:49 -0500"  >This appears to be happening to us as well ... and it&amp;#39;s a *showstopper* for our app, obviously.&lt;br/&gt;
&lt;br/&gt;
CouchbaseMobile sometimes does not start up on launch when running on 5.1 ... same &amp;quot;Couchbase: Error: No startup notification from server engine&amp;quot; message ... our testing supports the idea that it works okay when connected to Xcode and the phone is enabled for development, and it seems to not work when not connected to Xcode.  It doesn&amp;#39;t seem to matter whether the debugger is running, though, because I&amp;#39;ve launched it *manually* while connected to Xcode (not by hitting the Run button in Xcode, so no debugger running) and Couchbase still failed to start.&lt;br/&gt;
&lt;br/&gt;
We were just about to submit to Apple for review!  So, good thing we found this before the app was in the wild .. but it would obviously be good to get this fixed asap.&lt;br/&gt;
&lt;br/&gt;
Let me know if you need any other information to help debug it.&lt;br/&gt;
&lt;br/&gt;
Thanks!</comment>
                    <comment id="24876" author="patbarry" created="Tue, 13 Mar 2012 14:25:23 -0500"  >Oops .. let me edit one sentence in my last comment:&lt;br/&gt;
&lt;br/&gt;
&amp;quot;...because I&amp;#39;ve launched it *manually* while connected to Xcode (not by hitting the Run button in Xcode, so no debugger running) and Couchbase STARTED NORMALLY.&amp;quot;</comment>
                    <comment id="24879" author="ewan" created="Tue, 13 Mar 2012 17:03:59 -0500"  >I can report a similar problem using couchbase mobile 2.0.1 on iOS 5.1&lt;br/&gt;
&lt;br/&gt;
iPhone attached to development computer and run from Xcode, app runs as expected&lt;br/&gt;
&lt;br/&gt;
Mar 13 21:51:48 unknown miituu[90] &amp;lt;Warning&amp;gt;: Couchbase: Found db files in ~/Documents, so using that as rootDirectory&lt;br/&gt;
Mar 13 21:51:48 unknown miituu[90] &amp;lt;Warning&amp;gt;: -[MiituuAppDelegate application:didFinishLaunchingWithOptions:] [Line 85] Documents Directory : /var/mobile/Applications/AE80CECD-22D3-42FD-8511-B885C028AC17/Documents&lt;br/&gt;
Mar 13 21:51:48 unknown miituu[90] &amp;lt;Warning&amp;gt;: ------ applicationDidBecomeActive&lt;br/&gt;
&lt;br/&gt;
iPhone restarted and couchbase fails to start.&lt;br/&gt;
&lt;br/&gt;
Mar 13 21:52:18 unknown miituu[90] &amp;lt;Warning&amp;gt;: Couchbase: Error: No startup notification from server engine&lt;br/&gt;
Mar 13 21:52:18 unknown miituu[90] &amp;lt;Warning&amp;gt;: -[MiituuAppDelegate couchbaseMobile:failedToStart:] [Line 264] OMG: Couchbase couldn&amp;#39;t start! Exiting!&lt;br/&gt;
Mar 13 21:52:18 unknown miituu[90] &amp;lt;Warning&amp;gt;: -[MiituuAppDelegate couchbaseMobile:failedToStart:] [Line 265] The operation couldn&#8217;t be completed. (Couchbase error 2.) : (null)&lt;br/&gt;
Mar 13 21:52:18 unknown miituu[90] &amp;lt;Warning&amp;gt;: -[MiituuAppDelegate couchbaseMobile:failedToStart:] [Line 266] The operation couldn&#8217;t be completed. (Couchbase error 2.) : (null)&lt;br/&gt;
</comment>
                    <comment id="24880" author="patbarry" created="Tue, 13 Mar 2012 17:11:18 -0500"  >Hi Jens.  Could you give us a status on this bug when you have a chance?  Just wondering if you all are working on it yet, and if you have any sense yet of whether it&amp;#39;s going to be a relatively quick fix.  We&amp;#39;re under some pressure to launch asap (investors and such), so it would be good to have some sort of estimate of how long it might be, if at all possible.&lt;br/&gt;
&lt;br/&gt;
Thanks again!</comment>
                    <comment id="24882" author="chaisedh" created="Tue, 13 Mar 2012 17:24:45 -0500"  >&amp;gt;Is that permanent? Is there a way to reproduce this with a device that&amp;#39;s already been development-enabled, short of wiping and re-installing the OS?&lt;br/&gt;
&lt;br/&gt;
Hi Jens,&lt;br/&gt;
Yes it is permanent.&lt;br/&gt;
Though it is relatively fast to reset the device without needing to re-install the os. If you use:&lt;br/&gt;
&amp;gt;Settings &amp;gt;Reset &amp;gt;Erase All Content and Settings&lt;br/&gt;
&lt;br/&gt;
This will cause couchbase to consistently and repeatedly fail.&lt;br/&gt;
So far I have not been able to reproduce the issue the issue once the device has been &amp;quot;enabled for development&amp;quot;.&lt;br/&gt;
Using &amp;quot;Use For Development&amp;quot; will enable a previous install of the same app to begin working.</comment>
                    <comment id="24883" author="jens" created="Tue, 13 Mar 2012 17:29:29 -0500"  >The problem appears to stem from Erlang calling printf. As far as I can tell, this is hanging &#8212; maybe because stdout isn&amp;#39;t attached to anything and locks up when its buffer fills up? All I know is that, if I use freopen to redirect stdout to a file, it makes the problem go away.&lt;br/&gt;
I&amp;#39;m asking on Apple&amp;#39;s mailing lists to see if anyone knows anything about this issue. But the good news is that I can check in a two-line patch that makes it go away (even if I don&amp;#39;t know exactly why.)&lt;br/&gt;
&lt;br/&gt;
&amp;gt; Yes it is permanent. &lt;br/&gt;
&lt;br/&gt;
Really? I was able to reproduce it simply by shutting down and restarting the device. After that, the app will lock up, until the next time the device is tethered to Xcode.</comment>
                    <comment id="24885" author="patbarry" created="Tue, 13 Mar 2012 17:38:52 -0500"  >That&amp;#39;s great news Jens!  Looking forward to trying out the fix.  &lt;br/&gt;
&lt;br/&gt;
Are you going to post a new binary of couchbase mobile as well as checking in the patch?  Compiling CBM from source was a bit tricky, as I recall.</comment>
                    <comment id="24888" author="jens" created="Tue, 13 Mar 2012 17:50:25 -0500"  >Out for review:&lt;br/&gt;
&lt;a href=&quot;http://review.couchbase.org/#change,13924&quot;&gt;http://review.couchbase.org/#change,13924&lt;/a&gt;</comment>
                    <comment id="24890" author="jens" created="Tue, 13 Mar 2012 17:51:27 -0500"  >Patrick: Yes, we will post a new build. Hopefully later today or tomorrow.</comment>
                    <comment id="24892" author="patbarry" created="Tue, 13 Mar 2012 18:17:36 -0500"  >Thank you so much Jens!  You&amp;#39;re like Superman flying in and saving the day! :-)&lt;br/&gt;
&lt;br/&gt;
So will the new binary be on the CBM wiki page?  Is there a way to be notified when it&amp;#39;s available?</comment>
                    <comment id="24897" author="chaisedh" created="Tue, 13 Mar 2012 19:37:40 -0500"  >For anyone who cannot wait for a new Couchbase mobile build, there is no reason why you can&amp;#39;t put Jens&amp;#39;s fix in your own application code.&lt;br/&gt;
&lt;br/&gt;
	NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);&lt;br/&gt;
	NSString *logDirectory = [[paths objectAtIndex:0] stringByAppendingPathComponent:@&amp;quot;Logs&amp;quot;];&lt;br/&gt;
	&lt;br/&gt;
	if(![[NSFileManager defaultManager] fileExistsAtPath:logDirectory isDirectory:NULL])&lt;br/&gt;
		[[NSFileManager defaultManager] createDirectoryAtPath:logDirectory withIntermediateDirectories:YES attributes:nil error:NULL];&lt;br/&gt;
	&lt;br/&gt;
	freopen([[logDirectory stringByAppendingPathComponent:@&amp;quot;stdout.log&amp;quot;] UTF8String], &amp;quot;w+&amp;quot;, stdout);</comment>
                    <comment id="24898" author="jens" created="Tue, 13 Mar 2012 20:13:41 -0500"  >Actually you could do an even simpler fix if you don&amp;#39;t care about stdout at all:&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;freopen(&amp;quot;/dev/null&amp;quot;, &amp;quot;w&amp;quot;, stdout);&lt;br/&gt;
&lt;br/&gt;
I&amp;#39;m finding that some other developers are running into this issue too, although I haven&amp;#39;t found anyone who knows exactly what&amp;#39;s going on:&lt;br/&gt;
&lt;a href=&quot;http://bugs.freepascal.org/view.php?id=21440&quot;&gt;http://bugs.freepascal.org/view.php?id=21440&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://blog.xamarin.com/2012/03/11/monotouch-and-ios-5-1/&quot;&gt;http://blog.xamarin.com/2012/03/11/monotouch-and-ios-5-1/&lt;/a&gt;&lt;br/&gt;
</comment>
                    <comment id="24899" author="thmr" created="Tue, 13 Mar 2012 20:37:32 -0500"  >Thanks, Chaise -- &lt;br/&gt;
The proposed solution worked for me. Our app was approved a week ago and we are about to go live so this was a truly urgent issue... &lt;br/&gt;
&lt;br/&gt;
Highly appreciated! </comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                                                                                                                                                    <customfield id="customfield_10081" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Rank</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>9491</customfieldvalue>
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>
</channel>
</rss>