Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS][Rendering] Crash occurs when ColumnSet has height: stretch #4105

Closed
JohnnyKehr opened this issue Jun 3, 2020 · 5 comments · Fixed by #4196
Closed

[iOS][Rendering] Crash occurs when ColumnSet has height: stretch #4105

JohnnyKehr opened this issue Jun 3, 2020 · 5 comments · Fixed by #4196
Assignees
Labels
Bug Partner-CiscoWebEx Bugs impacting CiscoWebEx integration scenarios Platform-iOS
Milestone

Comments

@JohnnyKehr
Copy link

Platform

iOS

Author or host

Host on Webex Teams

Version of SDK

We have our own fork of AdaptiveCards@v1.2.6

Details

A crash occurs when a card is rendered that has a ColumnSet component with items that have the property height set to stretch (see json card example below. The offending code is linked here. Commenting out this block of code results in no crash happening.

Here's the actual crash with a few of the top frames: 



2020-06-03 11:02:18.812072-0700 Teams[68732:8015353] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Unable to activate constraint with anchors <NSLayoutDimension:0x600002426800 "ACRContentHoldingUIScrollView:0x7fd4969f1a00.height"> and <NSLayoutDimension:0x600002426840 "ACRContentHoldingUIView:0x7fd445e981f0.height"> because they have no common ancestor.  Does the constraint or its anchors reference items in different view hierarchies?  That's illegal.'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff23e39f0e __exceptionPreprocess + 350
	1   libobjc.A.dylib                     0x00007fff50ad79b2 objc_exception_throw + 48
	2   Foundation                          0x00007fff25aa87d2 -[NSLayoutConstraint setActive:] + 0
	3   AdaptiveCards                       0x000000010e43e47b +[ACRRenderer render:rootView:inputs:withCardElems:andHostConfig:] + 1899
	4   AdaptiveCards                       0x000000010e40ac71 -[ACRColumnRenderer render:rootView:inputs:baseCardElement:hostConfig:] + 1649
	5   AdaptiveCards                       0x000000010e438fe4 -[ACRColumnSetRenderer render:rootView:inputs:baseCardElement:hostConfig:] + 3204
	6   AdaptiveCards                       0x000000010e43e357 +[ACRRenderer render:rootView:inputs:withCardElems:andHostConfig:] + 1607
	7   AdaptiveCards                       0x000000010e43d03d +[ACRRenderer renderWithAdaptiveCards:inputs:context:containingView:hostconfig:] + 2109
	8   AdaptiveCards                       0x000000010e3a7990 -[ACRView render] + 560
	9   AdaptiveCards                       0x000000010e3a74c1 -[ACRView init:hostconfig:widthConstraint:delegate:] + 1473
	10  AdaptiveCards                       0x000000010e43c18d +[ACRRenderer render:config:widthConstraint:delegate:] + 237

An example of a card that causes the crash:


{
   "type":"AdaptiveCard",
   "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
   "version":"1.1",
   "body":[
      {
         "text":"Text Block",
         "type":"TextBlock"
      },
      {
         "type":"TextBlock",
         "text":"Available videos",
         "size":"Medium",
         "weight":"Bolder"
      },
      {
         "type":"TextBlock",
         "text":"Please choose the video to play",
         "wrap":true
      },
      {
         "type":"ColumnSet",
         "columns":[
            {
               "type":"Column",
               "items":[
                  {
                     "type":"TextBlock",
                     "text":"Video1",
                     "weight":"lighter",
                     "size":"small",
                     "isSubtle":true
                  },
                  {
                     "type":"Image",
                     "height":"stretch",
                     "altText":"Video1",
                     "url":"0"
                  },
                  {
                     "type":"ActionSet",
                     "height":"stretch",
                     "actions":[
                        {
                           "title":"Play",
                           "type":"Action.OpenUrl",
                           "url":"https://www.google.com"
                        }
                     ]
                  }
               ],
               "width":"stretch"
            },
            {
               "type":"Column",
               "items":[
                  {
                     "type":"TextBlock",
                     "text":"Video2",
                     "weight":"lighter",
                     "size":"small",
                     "isSubtle":true
                  },
                  {
                     "type":"Image",
                     "altText":"Borocillina",
                     "height":"stretch",
                     "url":"1"
                  },
                  {
                     "type":"ActionSet",
                     "height":"stretch",
                     "actions":[
                        {
                           "type":"Action.OpenUrl",
                           "title":"Play",
                           "url":"https://www.google.com"
                        }
                     ]
                  }
               ],
               "width":"stretch"
            },
            {
               "type":"Column",
               "items":[
                  {
                     "type":"TextBlock",
                     "text":"Video3",
                     "weight":"lighter",
                     "size":"small",
                     "isSubtle":true
                  },
                  {
                     "type":"Image",
                     "title":"Video3",
                     "height":"stretch",
                     "url":"2"
                  },
                  {
                     "type":"ActionSet",
                     "height":"stretch",
                     "actions":[
                        {
                           "type":"Action.OpenUrl",
                           "title":"Play",
                           "url":"https://www.google.com"
                        }
                     ]
                  }
               ],
               "width":"stretch"
            }
         ]
      }
   ]
}
@JohnnyKehr JohnnyKehr added the Bug label Jun 3, 2020
@ghost ghost added the Triage-Needed label Jun 3, 2020
@shalinijoshi19 shalinijoshi19 added the Partner-CiscoWebEx Bugs impacting CiscoWebEx integration scenarios label Jun 4, 2020
@ghost
Copy link

ghost commented Jun 4, 2020

Hi @JohnnyKehr; We triaged and approved your bug for fixing. Please stay tuned for updates around fix progress and/or release vehicle.

@ghost
Copy link

ghost commented Jun 4, 2020

Hi @JohnnyKehr. We have acknowledged this issue report. Please continue to follow this issue for updates/progress/questions. @matthidinger / @dclaux / @RebeccaAnne / @paulcam206 / @jwoo-msft / @almedina-ms FYI.

@shalinijoshi19
Copy link
Member

@jwoo-msft on your plate for quick investigation ahead of next week's sync with WebEx

@shalinijoshi19 shalinijoshi19 added this to the 20.06 milestone Jun 4, 2020
@shalinijoshi19
Copy link
Member

@golddove /@jwoo-msft are you able to repro this with the stock iOS renderer and our Visualizer app?

@ghost
Copy link

ghost commented Jul 8, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Partner-CiscoWebEx Bugs impacting CiscoWebEx integration scenarios Platform-iOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants