Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26510] Windows: "Runtime Exception: Layout cycle detected." when launching kitchensink-v2

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-11-07T23:04:35.000+0000
Affected Version/sRelease 7.5.0
Fix Version/sRelease 7.5.0
ComponentsWindows
Labelsregression
ReporterEwan Harris
AssigneeKota Iguchi
Created2018-11-01T15:07:47.000+0000
Updated2018-11-07T23:10:15.000+0000

Description

Description

When launching ks-v2 I'm seeing "Runtime Exception: Layout cycle detected." when the app launches. Tracking the issue down it appears to be coming from the $.log.setText call [here](https://github.com/appcelerator/kitchensink-v2/blob/27e44b5635f6ca2abf83f9e76cc9f0044a56795f/app/controllers/console/index.js#L11). * Commenting out the setText call allows the app to open fine (/) * Placing the setText call in a setTimeout fixes the issue (/) * Replacing logger.history with 'astring' does not fix the issue (x) My best guess right now is that there's some issue around updating the label text while we're laying out the UI?

Steps to reproduce

1. Run kitchensink-v2

Actual

App will error out on launch

Expected

App should not error out on launch

Comments

  1. Ewan Harris 2018-11-01

    [~jlongton] and [~smohammed] can't repro this on their machines
  2. Kota Iguchi 2018-11-02

    [~eharris] I was not able to reproduce this but it sounds like something around latest changes on Label. Could you try built-artifact from https://github.com/appcelerator/titanium_mobile_windows/pull/1303 ? This reverts the latest changes on Label in [PR1295](https://github.com/appcelerator/titanium_mobile_windows/pull/1295) to see if it causes the issue. Also, could you try following? I have added a guard hoping to make the layout less often without reverting [PR1295](https://github.com/appcelerator/titanium_mobile_windows/pull/1295) https://github.com/appcelerator/titanium_mobile_windows/pull/1304
  3. Kota Iguchi 2018-11-02

    I have pushed different attempt to avoid layout cycle. Could you try following too? [~eharris] https://github.com/appcelerator/titanium_mobile_windows/pull/1305
  4. Kota Iguchi 2018-11-02

    After several tries I was able to reproduce ths and confirmed it is caused by latest Label changes. Unfortunately none of my guard works for it. I'm looking into it.
  5. Kota Iguchi 2018-11-02

    [~eharris] https://github.com/appcelerator/titanium_mobile_windows/pull/1306 works for me. Would you try it?
  6. Kota Iguchi 2018-11-02

    https://github.com/appcelerator/titanium_mobile_windows/pull/1306
  7. Kota Iguchi 2018-11-05

    7_5_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1309
  8. Kota Iguchi 2018-11-07

    [~eharris] [~rmitro] Would you try 7.5.0.v20181106111330? For me it runs kitchensink without crash or freeze.
       appc ti sdk install --branch 7_5_X 7.5.0.v20181106111330
       
  9. Ewan Harris 2018-11-07

    [~kiguchi] I ran kitchensink a few times and did not see the error. [~rmitro], you're probably running into TISTUD-8994, where Studio cant parse the ES6 code in ks-v2. I'm not sure on the SDK issue however
  10. Lokesh Choudhary 2018-11-07

    FR Passed. Ran KS V2 multiple times & did not see any "Runtime Exception: Layout cycle detected." exception. SDK : 7.5.0.v20181107142952 OS: Win 10 Pro 64-bit
  11. Lokesh Choudhary 2018-11-07

    Closing.

JSON Source