WSDOT / wsdot-kotlin-app

Source Code for the WSDOT Android Application
GNU General Public License v3.0
1 stars 3 forks source link

App crashing on startup because of null values in alert #203

Closed waynedyck closed 4 months ago

waynedyck commented 5 months ago

App is crashing on startup because of eventId 588559.

In the RealTimeAlerts.js file it appears as,

{
eventCategoryDescription: null,
longitude: null,
eventCategoryTypeDescription: "Police activity",
eventPriorityID: 1,
roadName: null,
eventEndDate: null,
latitude: null,
stateRouteId: null,
displayOrder: 600,
regionId: 0,
endLatitude: null,
endLongitude: null,
eventPriorityDescription: "HIGHEST IMPACT",
eventId: 588559,
endMilepost: null,
travelCenterPriorityId: 2,
sourceSystemId: 0,
eventCategoryID: 99,
geometryType: null,
eventCategoryType: "Region",
headlineMessage: "This is an activation of the Washington statewide Endangered Missing Persons Alert Plan. WSP and the Federal Way Police Department is asking for the public's help in locating the following vehicle: a white 2018 Nissan Versa. WA LIC #DP77965. If seen, please call 911. ",
lastModifiedDate: "2024-03-25T15:17:18.677Z",
startMilepost: null,
iconName: "31.gif",
eventStartDate: null,
extendedMessage: "",
roadDirection: null,
locationName: "Northwest",
criticalEventIndicator: 0
},

and in the HighwayAlerts.js file it appears as,

{
AlertID: 588559,
TravelCenterPriorityId: 2,
LocationName: "Northwest",
Priority: "Highest",
ExtendedDescription: "",
IconName: "31.gif",
EventPriorityID: 1,
GeometryType: null,
CriticalEventIndicator: 0,
LastUpdatedTime: "/Date(1711379838677)/",
EndRoadwayLocation: {
Longitude: null,
RoadName: null,
MilePost: null,
Direction: null,
Latitude: null
},
EndTime: null,
StateRouteId: null,
StartRoadwayLocation: {
Longitude: null,
RoadName: null,
MilePost: null,
Direction: null,
Latitude: null
},
SourceSystemId: 0,
EventCategoryTypeDescription: "Police activity",
HeadlineDescription: "This is an activation of the Washington statewide Endangered Missing Persons Alert Plan. WSP and the Federal Way Police Department is asking for the public's help in locating the following vehicle: a white 2018 Nissan Versa. WA LIC #DP77965. If seen, please call 911. ",
EventCategoryType: "Region",
EventCategory: null,
EventCategoryID: 99,
StartTime: null,
Region: "",
EventCategoryDescription: null,
DisplayOrder: 600
}
waynedyck commented 5 months ago

I temporarily fixed the issue by not having eventId 588559 added to the HighwayAlerts.js data file.