Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20087] 5.1.X breaks ability to bind one collection to different views / reset collection

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-02-20T15:58:12.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.2.0, Release 5.1.2
ComponentsiOS
Labelsqe-5.2.0, regression
ReporterJason Kneen
AssigneePedro Enrique
Created2015-12-02T15:08:09.000+0000
Updated2016-02-21T19:41:31.000+0000

Description

The sample project here https://www.dropbox.com/s/q9lmvrx6nloyua5/wordtin.zip?dl=0 exhibits odd behaviour when trying to bind a manually created backbone collection to two different views. If you run the code in 5.0.x.GA you can see words displayed on the screen which you can scroll through. Clicking the settings button reveals the same words (same collection) in a table -- clicking the top right button will "reset" the words and change the collection. Run the project in 5.0.X and it works fine Run the project in 5.1.X and it crashes / hangs when attempting to render the second list (clicking settings) and also crashes trying to reset a collections contents. Run the project in 5.1.X with "execute in main thread" set to TRUE and it works as expected.

Attachments

FileDateSize
wordtin.zip2015-12-02T15:07:56.000+00003437972

Comments

  1. Jason Kneen 2015-12-02

    Note -- this got created under Appc Community -- but I am building with the Titanium CLI -- so ti build
  2. Pedro Enrique 2015-12-07

    PR: https://github.com/appcelerator/titanium_mobile/pull/7553/files
  3. Chee Kiat Ng 2015-12-08

    CR and FT passed. PR Merged.
  4. Chee Kiat Ng 2015-12-08

    Backport PR here: https://github.com/appcelerator/titanium_mobile/pull/7555
  5. Fokke Zandbergen 2015-12-08

    [~cng] would it be possible to merge this for 5.1.2.GA? Even though this ScrollView bug exists since 5.0.0.GA it wasn't showing because we mistakingly enabled main thread by default in 5.0.X which ironically counterbalanced it. But now we've fixed that in 5.1.0.GA this bug became effective and causing the described odd behaviour or even hanging the app on start.
  6. Eric Wieber 2016-01-04

    Verified fixed, using: MacOS 10.11.2 (15C50) Studio 4.4.0.201511241829 Ti SDK 5.1.2.v20151216190036 Appc NPM 4.2.2 Appc CLI 5.1.0 Xcode 7.2 (7C68) The manually created collection can be seen on the two bound views without hanging or crashing. Tested with the sample app provided on iPad Sims and device with runOnMainThread explicitly set to false, true, and not set at all.
  7. Nuno Costa 2016-02-19

    In 5.2RC issue back. Please check my notes, here https://github.com/appcelerator/titanium_mobile/pull/7627/files
  8. Eric Wieber 2016-02-19

    Confirmed this issue is reproducible again, with environment: MacOS 10.11.3 (15D21) Studio 4.5.0.201602170821 Ti SDK 5.2.0.v20160216202526 Appc NPM 4.2.3-2 Appc CLI 5.2.0-269 Alloy 1.7.33 Xcode 7.2 (7C68) App freezes with <run-on-main-thread> set to false, but works as expected when set to true. Tested with provided app (removed the leading '/' from the path on line 21 of index.js) on iPad sims, iOS 9.2 and iPad 2, iOS 8.4.1
  9. Angel Petkov 2016-02-19

    PR(Master): https://github.com/appcelerator/titanium_mobile/pull/7760 PR(5_2_X): https://github.com/appcelerator/titanium_mobile/pull/7759
  10. Nuno Costa 2016-02-19

    Next time I will do PR my self :)
  11. Angel Petkov 2016-02-19

    [~nunocostapt] Okay sounds good :), extra enthusiasm by the community is always good and welcomed! Sorry for the delay on the PR, there is 3 or tickets all related to the same issue, was not able to re-procude it on the other 2. It was only thanks to Eric that we succeeded in re-producing it.
  12. Nuno Costa 2016-02-19

    I tried linked all those ticked better as I could. Thanks!
  13. Chee Kiat Ng 2016-02-20

  14. Nuno Costa 2016-02-20

    CheeKiat Ng and Angel Petkov , I tested all those before come up with my notes and the fix, seams all good!
  15. Hans Knöchel 2016-02-20

    Regression fixed with the latest PR. Nevertheless, we need to focus the mentioned tickets to be double-checked when we support mainthread and autolayout by default.
  16. Eric Wieber 2016-02-21

    Verified fixed, using: MacOS 10.11.3 (15D21) Studio 4.5.0.201602170821 Ti SDK 5.2.0.v20160220080449 Appc NPM 4.2.3-2 Appc CLI 5.2.0-269 Alloy 1.7.33 Xcode 7.2 (7C68) App no longer freezes with <run-on-main-thread> set to false, true, or not set. Tested using provided sample app and tests provided in TIMOB-20138 and TIMOB-20196, on iOS 9.2 iPad sim and iOS 8.4.1 iPad 2

JSON Source