# compose

Dieter Holz

10/02/2020, 8:38 AM
The critical code seems to be
Copy code
        text = { Text(homeScreenTab.title) },
        selected = currentTab == homeScreenTab,
        onClick = { currentTab = homeScreenTab }
When I click on the tab, the exception occurs (but only if the content of the tab contains a TextField)


10/02/2020, 9:11 AM
Hi, does it work when you use just string literal in Text?

Anastasia [G]

10/02/2020, 9:49 AM
I understand that we’ve got the issue fixed now
will be available in alpha05

Chuck Jazdzewski [G]

10/02/2020, 4:01 PM
As explained in the bug the issue is due to a bug in the snapshot system when taking nested snapshots. There is no easy way to work around this issue once you encounter it as the steps involved to trigger it are not easily controlled. Any use, directly or indirectly, of sub-composition (which uses nested snapshots) can potentially trigger this or related issues. It is more likely to be encountered when using focusable components in a component's content which is produced using sub-composition. If you are running into this issue, the current recommendation is to either go back to alpha03 or wait until alpha05. The fix landed too late to make it into alpha04.
👍 2

Guy Bieber

10/14/2020, 7:38 PM
@Chuck Jazdzewski [G] Is this fixed in alpha05?
Looks like these might have been the fixes? 1. c70f9a5 Merge "Fix applying nested snapshots" into androidx-master-dev by Treehugger Robot · 2 weeks ago 2. 2d08e4a Fix applying nested snapshots by Chuck Jazdzewski · 2 weeks ago

Chuck Jazdzewski [G]

10/20/2020, 3:51 PM
Yes. The fix for this is in 2d08e4a Fix applying nested snapshots Sorry for the delayed response, I was on vacation last week.
😁 1