Hi, Community
In a tracker program; when I want to open the follow-up form of a TEI using the Android version, I receive an error message which I share with you. This error message is displayed after creating a program stage event. I checked this stage parogram; I found no anomaly…
Can someone help me understand and fix this problem.
Thanks
Here is the text of the message:
"java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dhis2/org.dhis2.usescases.teiDashboard.TeiDashboardMobileActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3654)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3806)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2267)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8167)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
Caused by: java.lang.NullPointerException
at org.hisp.dhis.android.core.program.programindicatorengine.internal.dataitem.ProgramItemStageElement.evaluate(ProgramItemStageElement.kt:65)
at org.hisp.dhis.android.core.parser.internal.expression.ParserUtils$$ExternalSyntheticLambda1.apply(Unknown Source:0)
at org.hisp.dhis.android.core.parser.internal.expression.CommonExpressionVisitor.visitExpr(CommonExpressionVisitor.java:169)
at org.hisp.dhis.parser.expression.antlr.ExpressionParser$ExprContext.accept(ExpressionParser.java:400)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.hisp.dhis.android.core.parser.internal.expression.CommonExpressionVisitor.visitExpr(CommonExpressionVisitor.java:174)
at org.hisp.dhis.parser.expression.antlr.ExpressionParser$ExprContext.accept(ExpressionParser.java:400)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.hisp.dhis.antlr.operator.AntlrComputeFunction.evaluate(AntlrComputeFunction.java:57)
at org.hisp.dhis.android.core.parser.internal.expression.ExpressionItem$-CC.$default$evaluate(ExpressionItem.java:122)
at org.hisp.dhis.android.core.parser.internal.expression.operator.OperatorCompareEqual.evaluate(Unknown Source:0)
at org.hisp.dhis.android.core.parser.internal.expression.ParserUtils$$ExternalSyntheticLambda1.apply(Unknown Source:0)
at org.hisp.dhis.android.core.parser.internal.expression.CommonExpressionVisitor.visitExpr(CommonExpressionVisitor.java:169)
at org.hisp.dhis.parser.expression.antlr.ExpressionParser$ExprContext.accept(ExpressionParser.java:400)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.hisp.dhis.antlr.AntlrExpressionVisitor.castBooleanVisit(AntlrExpressionVisitor.java:154)
at org.hisp.dhis.antlr.operator.AntlrOperatorLogicalAnd.evaluate(AntlrOperatorLogicalAnd.java:65)
at org.hisp.dhis.android.core.parser.internal.expression.ExpressionItem$-CC.$default$evaluate(ExpressionItem.java:122)
at org.hisp.dhis.android.core.parser.internal.expression.operator.OperatorLogicalAnd.evaluate(Unknown Source:0)
at org.hisp.dhis.android.core.parser.internal.expression.ParserUtils$$ExternalSyntheticLambda1.apply(Unknown Source:0)
at org.hisp.dhis.android.core.parser.internal.expression.CommonExpressionVisitor.visitExpr(CommonExpressionVisitor.java:169)
at org.hisp.dhis.parser.expression.antlr.ExpressionParser$ExprContext.accept(ExpressionParser.java:400)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.hisp.dhis.antlr.AntlrExpressionVisitor.visitExpression(AntlrExpressionVisitor.java:69)
at org.hisp.dhis.parser.expression.antlr.ExpressionParser$ExpressionContext.accept(ExpressionParser.java:203)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.hisp.dhis.antlr.Parser.visit(Parser.java:100)
at org.hisp.dhis.android.core.parser.internal.expression.CommonParser.visit(CommonParser.java:47)
at org.hisp.dhis.android.core.program.programindicatorengine.internal.ProgramIndicatorExecutor.getFilterValue(ProgramIndicatorExecutor.kt:85)
at org.hisp.dhis.android.core.program.programindicatorengine.internal.ProgramIndicatorExecutor.getProgramIndicatorValue(ProgramIndicatorExecutor.kt:52)
at org.hisp.dhis.android.core.program.programindicatorengine.internal.ProgramIndicatorEngineImpl.evaluateProgramIndicatorContext(ProgramIndicatorEngineImpl.kt:121)
at org.hisp.dhis.android.core.program.programindicatorengine.internal.ProgramIndicatorEngineImpl.getEventProgramIndicatorValue(ProgramIndicatorEngineImpl.kt:109)
at org.hisp.dhis.android.core.analytics.linelist.EventLineListServiceImpl.evaluateEvents(EventLineListServiceImpl.kt:116)
at org.hisp.dhis.android.core.analytics.linelist.EventLineListServiceImpl.evaluate(EventLineListServiceImpl.kt:64)
at org.hisp.dhis.android.core.analytics.linelist.EventLineListRepositoryImpl.blockingEvaluate(EventLineListRepositoryImpl.kt:102)
at dhis2.org.analytics.charts.providers.ChartCoordinatesProviderImpl.indicatorCoordinates(ChartCoordinatesProviderImpl.kt:94)
at dhis2.org.analytics.charts.mappers.ProgramIndicatorToGraph.map(ProgramIndicatorToGraph.kt:23)
at dhis2.org.analytics.charts.ChartsRepositoryImpl.getDefaultAnalytics(ChartsRepositoryImpl.kt:283)
at dhis2.org.analytics.charts.ChartsRepositoryImpl.getAnalyticsForEnrollment(ChartsRepositoryImpl.kt:41)
at dhis2.org.analytics.charts.DhisAnalyticCharts.geEnrollmentCharts(DhisAnalyticCharts.kt:23)
at org.dhis2.usescases.teiDashboard.DashboardRepositoryImpl.programHasAnalytics(DashboardRepositoryImpl.java:519)
at org.dhis2.usescases.teiDashboard.TeiDashboardPageConfigurator.displayAnalytics(TeiDashboardPageConfigurator.kt:15)
at org.dhis2.utils.customviews.navigationbar.NavigationPageConfigurator$DefaultImpls.pageVisibility(NavigationPageConfigurator.kt:10)
at org.dhis2.usescases.teiDashboard.TeiDashboardPageConfigurator.pageVisibility(TeiDashboardPageConfigurator.kt:5)
at org.dhis2.utils.customviews.navigationbar.NavigationBottomBar.pageConfiguration(NavigationBottomBar.kt:207)
at org.dhis2.usescases.teiDashboard.TeiDashboardMobileActivity.onCreate(TeiDashboardMobileActivity.java:147)
at android.app.Activity.performCreate(Activity.java:7963)
at android.app.Activity.performCreate(Activity.java:7952)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3629)
… 11 more
"