[AC-5218] 6.2.0.GA tabGroup.setActiveTab error "A view can only be associated with at most one view controller at a time"
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2017-10-20T21:25:33.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Anthony Chung |
Assignee | Shak Hossain |
Created | 2017-09-21T06:13:30.000+0000 |
Updated | 2017-10-30T23:02:53.000+0000 |
Description
Attachments
File | Date | Size |
---|---|---|
CI-Remote-iPhoneX-agents.png | 2017-10-11T07:06:50.000+0000 | 296363 |
CI-Remote-iPhoneX-pipelines.png | 2017-10-11T07:06:51.000+0000 | 174590 |
CI-Remote-iPhoneX-settings.png | 2017-10-11T07:07:44.000+0000 | 216568 |
Please provide a full test-case that is reproducible, the current one looks copied from your app which makes it harder to pinpoint for us. Thanks!
Hi! Same issue for me since I use TiSDK 6.2.2.GA. I have tabGroup with ListViews (Alloy project). I get randomly this error:
The PipelineList.js is the next screen after clicking on the first screen (Pipelines). I have joined my app with the two tabs with listView where I get a lot of crashes when the app starts or when I navigate to children screen with also listViews. !CI-Remote-iPhoneX-pipelines.png|thumbnail! !CI-Remote-iPhoneX-agents.png|thumbnail! !CI-Remote-iPhoneX-settings.png|thumbnail! I will try to reproduce this on a clean project but it seems like having these elements, is enough to crash the app: - tabGroup with a minimum of two tabs - listView on both tabs - activeTab() on any tabs at boot
Hello, Please provide a full test-case that is reproducible. We will be investigating the issue after we can reproduce the issue on our end. Thanks.
[~timoa] Following might help... Forcing the stages to be separated on the thread in consecutive order by wrapping it in a defer function and a timeout of zero. (It might be affected by run on main thread.)
[~timoa] It looks like while the animation and switch is occuring, during the process the view is associated with two instead of one. The defer method, makes it go one at a time, and looks to have fixed it for me.
Thanks, @threethirds, I think that my problem is different because it appends randomly after I opened different windows in the same tab, without using setActiveTab(). But, your research about the main thread helped me to fix my issue. I have added this line to my tiapp.xml (like the kitchen sink v2 app) to use the main thread only and it solved my errors. Doesn't look to have lower performance:
[~timoa] Great to hear you were able to get a win! I'm still trying to wrap my head around how run-on-main-thread and jscore changes the way we need to code in Titanium. Especially for larger code bases. At the moment I mainly infer what it breaks and work arounds for the moment :) These look like dependencies in hyperloop, so ironing out these issues will hopefully mean a stable base to try hyperloop. All the best!