teammates icon indicating copy to clipboard operation
teammates copied to clipboard

NPE in FeedbackContributionQuestionDetails.getTeamSubmissionArray

Open damithc opened this issue 5 years ago • 5 comments

v6.16.2

I've been getting this error from the live server. There was a handful of it, reported in two day so far.

Error Message: teammates.common.util.Logger severe: Unexpected exception caught by ControllerServlet : java.lang.NullPointerException at teammates.common.datatransfer.questions.FeedbackContributionQuestionDetails.getTeamSubmissionArray(FeedbackContributionQuestionDetails.java:517) at teammates.common.datatransfer.questions.FeedbackContributionQuestionDetails.getQuestionResultStatisticsCsv(FeedbackContributionQuestionDetails.java:342) at teammates.logic.core.FeedbackSessionsLogic.getFeedbackSessionResultsForQuestionInCsvFormat(FeedbackSessionsLogic.java:822) at teammates.logic.core.FeedbackSessionsLogic.getFeedbackSessionResultsSummaryInSectionAsCsv(FeedbackSessionsLogic.java:800) at teammates.logic.core.FeedbackSessionsLogic.getFeedbackSessionResultsSummaryAsCsv(FeedbackSessionsLogic.java:745) at teammates.logic.api.Logic.getFeedbackSessionResultSummaryAsCsv(Logic.java:1243) at teammates.ui.controller.InstructorFeedbackResultsDownloadAction.execute(InstructorFeedbackResultsDownloadAction.java:58) at teammates.ui.controller.Action.executeAndPostProcess(Action.java:478) at teammates.ui.controller.ControllerServlet.doPost(ControllerServlet.java:75) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

damithc avatar Mar 05 '19 04:03 damithc

actually, a user is unable to download results due to this problem. An urgent fix is needed.

damithc avatar Mar 05 '19 04:03 damithc

Note that the course in concern has some unusual team names:

5 and alive 5 and alive 5 and alive 5 and alive 99 Problems But Stats A'int One 99 Problems But Stats A'int One 99 Problems But Stats A'int One 99 Problems But Stats A'int One Above Average Above Average Above Average Above Average Algebros Algebros Algebros Algebros BleedBlue BleedBlue BleedBlue BleedBlue CamFam CamFam CamFam CamFam Coding Crazies Coding Crazies Coding Crazies Coding Crazies Confounding Variables Confounding Variables Confounding Variables Confounding Variables Correlation is Causation Correlation is Causation Correlation is Causation Correlation is Causation Dream Team Dream Team Dream Team Dream Team Duke Stat Kidz Duke Stat Kidz Duke Stat Kidz Duke Stat Kidz Exclusive Sheep Exclusive Sheep Exclusive Sheep FantasticFour FantasticFour FantasticFour FantasticFour Fantstic-4 Fantstic-4 Fantstic-4 Fantstic-4 Girls Who Code Girls Who Code Girls Who Code Girls Who Code Juniors Juniors Juniors Juniors MEAN Girls MEAN Girls MEAN Girls MEAN Girls MegaCalculator MegaCalculator MegaCalculator MegaCalculator Outliers Outliers Outliers Outliers R-mageddon R-mageddon R-mageddon R-mageddon Red Team Red Team Red Team Red Team Spaghetti Carbonara Spaghetti Carbonara Spaghetti Carbonara Spaghetti Carbonara Standard Deviants Standard Deviants Standard Deviants Standard Deviants Stat Seniors Stat Seniors Stat Seniors Stat Seniors aRmy aRmy aRmy aRmy Stat-tastic Stat-tastic Stat-tastic Stat-tastic Team Mean Team Mean Team Mean Team Mean Team Super Stat Team Super Stat Team Super Stat Team Super Stat Team dos Team dos Team dos Team dos TeamEnigma TeamEnigma TeamEnigma TeamEnigma The Outliers The Outliers The Outliers The Outliers The Whiskers The Whiskers The Whiskers The Whiskers TrueMean TrueMean TrueMean TrueMean Washed Up Washed Up Washed Up Washed Up We dont like 8:30's We dont like 8:30's We dont like 8:30's We dont like 8:30's Zoe 101 Zoe 101 Zoe 101 Zoe 101 Instructors Instructors Instructors

damithc avatar Mar 05 '19 04:03 damithc

Fixed the issue with @damithc by changing teamName Instructors to something else. The error can be reproduced by enrolling students with teamName Instructors.

Instructors is internally used in the application as a team for instructors. image

Ideally, teamName can be anything so disallowing Instructors is not a good choice. Need to investigate some other approaches.

xpdavid avatar Mar 05 '19 06:03 xpdavid

@damithc What about making teammates.common.util.Const#USER_TEAM_FOR_INSTRUCTOR more unique? Something like INSTRUCTORS_TEAMMATES_VAR

Ali96kz avatar May 01 '20 15:05 Ali96kz

It works but not the optimal. (e.g. what if a team is called INSTRUCTORS_TEAMMATES_VAR?). I think the issue is more challenging than you think as this requires data migration if we want to make changes. If you are new to teammates, please find some firstTimer task to tackle :P

xpdavid avatar May 01 '20 19:05 xpdavid