question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adaptive Cards v1.2.0 throwing NullPointerException while rendering

See original GitHub issue

Platform

Android

Author or host

Host

Version of SDK

io.adaptivecards:adaptivecards-android:1.2.0

Issue

I just updated the adaptive cards version on my native app from v1.1.0 to v1.2.0. After making the necessary changes around AdaptiveCardRenderer.render and BaseCardElementRenderer.render, when I try to run the app, I get a NullPointerException in the AdaptiveCardRenderer.getInstance.render() method. It complains about AdaptiveCards::FeatureRegistration const & reference being null. Below is the snippet of the log:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dynamicsignal.adaptivecards/com.dynamicsignal.adaptivecards.AdaptiveCardActivity}: java.lang.NullPointerException: AdaptiveCards::FeatureRegistration const & reference is null at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2678) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2743) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1490) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6165) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:778) Caused by: java.lang.NullPointerException: AdaptiveCards::FeatureRegistration const & reference is null at io.adaptivecards.objectmodel.AdaptiveCardObjectModelJNI.BaseElement_MeetsRequirements(Native Method) at io.adaptivecards.objectmodel.BaseElement.MeetsRequirements(BaseElement.java:125) at io.adaptivecards.renderer.registration.CardRendererRegistration.render(CardRendererRegistration.java:280) at io.adaptivecards.renderer.AdaptiveCardRenderer.internalRender(AdaptiveCardRenderer.java:156) at io.adaptivecards.renderer.AdaptiveCardRenderer.render(AdaptiveCardRenderer.java:59)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
almedina-mscommented, Jun 7, 2019

It’s not a regression, it’s a new bug due to the inclusion of FeatureRegistration (and we may not be checking if the feature registration is empty). As a work around a dummy FeatureRegistration object can be created and registered so the card renders correctly; the exception is thrown when this function is called cardElement.MeetsRequirements(featureRegistration)

We may have to check if this doesn’t happen in other platforms too

0reactions
almedina-mscommented, Jul 12, 2019

@tnev , this is an android only issue which is going to be addressed in the version1.2.1 of AdaptiveCards to be released at the end of this month

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adaptive card in WPF throws error 'Value cannot be null ...
I am trying to render Adaptive card in one of our WPF application. As I am very new to WPF, I thought to...
Read more >
Pega Platform 8.3 Resolved Issues | Support Center
Ticket # Issue # Title SR‑C29160 SR‑C97889 419494 437541 Performance improvements made on bulk actions SR‑C39293 384291 Optimization added for Oracle queries SR‑C59769 SR‑C92826 399683 436919...
Read more >
Java SDK fixes, version 8.0
DOCALLBA CKS() TO THROW A MORE DESCRIPTIVE”NULL PASSWORD” LOGINEXCEPTION. 5, 15. IJ05408, 137689, Security, V1 STASH PROBLEM WHEN V2 STASH EXISTS, ...
Read more >
Release Notes - Java Bug System
[JDK-5066041] - ModalDialogTest fails to behave as per the instruction given in Cinnabar. [JDK-5066222] - Exception/Error messgs are getting thrown while ...
Read more >
Implementing a Renderer - Adaptive Cards
If a renderer encounters a version property in the AdaptiveCard that is higher than the supported version, it MUST return the fallbackText ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found