{ "id": "61324", "key": "TIMOB-692", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11222", "name": "Release 1.2.0", "archived": true, "released": true, "releaseDate": "2010-04-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:53:56.000+0000", "created": "2011-04-15T02:34:35.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:53:56.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}
Phone => Camera => Camera Basic
\ncrashes on device
Very difficult to reproduce this crash. But the relevant stack\ntrace is:
\n\n0 CoreFoundation 0x32de1d1d __exceptionPreprocess + 52\n1 libobjc.A.dylib 0x3266be14 objc_exception_throw + 40\n2 CoreFoundation 0x32de2bfd -[NSObject doesNotRecognizeSelector:] + 112\n3 CoreFoundation 0x32d67b19 ___forwarding___ + 480\n4 CoreFoundation 0x32d5e840 _CF_forwarding_prep_0 + 48\n5 Titanium 0x0008fd55 -[TitaniumViewController loadView] + 376\n6 UIKit 0x30c59758 -[UIViewController view] + 52\n7 UIKit 0x30ce094c -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 1268\n8 UIKit 0x30cd7788 -[UIViewController dismissModalViewControllerWithTransition:] + 452\n9 UIKit 0x30cd75bc -[UIViewController dismissModalViewControllerAnimated:] + 36\n10 Titanium 0x000923dd -[TitaniumApp hideModalController:animated:] + 116\n11 Titanium 0x000c3091 -[MediaModule imagePickerController:didFinishPickingMediaWithInfo:] + 128
\n
Isolated the crash in -[TitaniumViewController\nloadView]
. Occurs in this loop:
\n for (TiWindowProxy * thisWindowProxy in windowViewControllers)\n {\n TiUIView * thisView = [thisWindowProxy view];\n [rootView addSubview:thisView];\n [thisWindowProxy reposition]; <---- BUG IS HERE\n }
\n
\nApparently, sometimes a TiWindowProxy is not really a\nTiWindowProxy. There's probably an initialization race condition\nsomewhere: This bug only seems to appear if you IMMEDIATELY tap\n'use' after the picture is processed.
\nIn this case, the thisWindowProxy
is really a\nTiWindowViewController
(the one for the tab\ngroup).
Aha.
\nwindowViewControllers used to be an array of proxies,\nbut I changed them into viewControllers. The fact that the\n[thisWindowProxy view] doesn't crash is due to viewControllers and\nproxies both having a method called that.
\nWith viewControllers wrapping proxies, that 'view' is a\nTiUIView. With viewControllers that aren't, like, say, the Camera,\nthey're standard UIViews, which would not have a reposition\nmethod.
Re: Blain's comment -
\nTurns out that this was fixed by Jeff as another bug (not sure\nwhich one). I'm marking it resolved - but if anyone can still\nreproduce it in the 1.2.0 freeze, here are instructions:
\nPhone -> Camera -> Camera Basic
\nTake a picture
\nAs soon as the 'use' button comes up, tap it IMMEDIATELY. The bug\nmay show up if you tap it at other times, but this seemed to be the\nmost reliable way to reproduce.
Of course, re-open the bug if it can be reproduced and I will\nfix.