[AC-2144] iOS: App crashes when closing windows inside tabs (navgroups) with SDK 3.0
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2013-04-05T20:41:37.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | regression |
Reporter | Ygor Lemos |
Assignee | Shak Hossain |
Created | 2013-01-03T01:26:36.000+0000 |
Updated | 2016-03-08T07:41:07.000+0000 |
Description
In order to reproduce, you must create an app with a tab bar layout.
In this app I have 5 tabs.
Some of those tabs drills down to simple windows (all imported using require.js)
If you drill-down on one tab to let's say 3 or 4 levels deep, and them go to another tab and drill down to 3-4 levels deep. Now go back to the 1st tab and start closing windows (getting back on the drill down).
Once you reach the parent, the app crashes and closes completely.
Titanium doesn't generate any logs.
I did got a crash report though.
For closing the windows I've tried to use simple window.close() and also the close() method of the tabgroup. both generated the same result.
Can someone enlighten-me towards what is crashing here? I saw some references to redraw issues on the crash report coming from TiViewProxy.
The crash reports are attached. All derived from the same bug reproduction.
Also attached is a video file showing the behavior.
Attachments
I was recently moving away from tabgroup with a custom design on top, to a totally custom tabgroup (no native tabgroup below) and the app was doing exactly what is mentioned in the bug report: every time I drilled down the navgroup and get back to the root window, the app crashed. After experiencing this, I got back to native tabgroup. But I also got back to the issue i was having: using the native tabgroup, drilling down the navgroups a couple windows in the navgroups on the first 2 tabs (app has 2) and then switching to the 3rd tab is crashing the app. Curiously, it seems that the cause is exactly the same reported by Ygor. Since I was getting a EXC_BAD_ACCESS, I executed the app from Xcode with Zombie Objects enabled to track down the problem. And look at that, redraw problem coming from TiViewProxy.
Marco, When you got this bug, were you using something like the attached js for custom tabs? I'm using this as well on the project that is crashing for custom tabs. Maybe it helps the guys at engineering track down what is happening. (Moving this discussion from Titans List to here so everyone on JIRA can be up-to-date) Attached the ctb.js file (which I use for custom tabs on the crashing app)
This is what I use for custom tabs on Titanium. I know that can be optimized but It shouldn't be crashing TiViewProxy.
Hi Ygor, Thanks for attaching the code, would it be possible for you to provide a runnable sample that uses your custom tab bar module?
Davide, I can allow access to the code of the app on Github for an Appcelerator developer, does this helps? This is still happening on the latest versions of Titanium and I found more than one developer affected by the same bug. I gave Eric Merriman access to one of my Github repos a few weeks ago for sorting out another bug which turn to be fixed, I can do the same here. The reason I recommend it is that maybe the bug can't be reproduced on short test cases ( < 100 lines ). Thanks
Ygor, If this is still an issue, we would like to investigate it further. Sorry that we have not responded back in a while. We want to ensure this gets reviewed by engineering if we can reproduce it. Does Eric still have access to your github repo? I can get the source from him and get it reviewed. Please let me know your updates. Thanks, Shak