google / google/sagetv

Schedules Direct EPG data not updating because of null station instance in code

Open
#365 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
287
Forks
172
PR merge metrics
No merged PRs in 30d

Description

User wnjj on the SageTV forums suggested I list this problem here.

I have been using Sage for many years and updated to V9 last spring. I enabled the Schedules Direct EPG in June. It has worked fine until the last couple of weeks. I updated to version 9.1.7 yesterday. No change in behavior. The epg information from my sagetv_0.txt file shows:

Thu 10/5 11:30:11.347 [EPG@d13ca8] SDEPG got 103 channels
Thu 10/5 11:30:11.376 [EPG@d13ca8] SDEPG Exception thrown: null
Thu 10/5 11:30:11.376 [EPG@d13ca8] java.lang.NullPointerException
Thu 10/5 11:30:11.376 [EPG@d13ca8] at sage.epg.sd.SDRipper.extractGuide(SDRipper.java:1364)

My Sage System Information always shows the last epg update as the current time and next update time as 0.

User wnjj stated: "Looks like there's another bug in the SDEPG code where a null isn't being checked. I don't know why it's null.

The getStationID() function call is invalid because the station instance is null.

In SDRipper.java:

for (int i = 0; i < numChans; i++)
{
SDStation station = map.getStations()[i];

int stationID = station.getStationID();"

Any help resolving this would be greatly appreciated. I will run out of epg data next Thursday.

Steve

Contributor guide

Open the contributing guide

Research direction

Start in SDRipper.java at line 1364 and trace the SDEPG update path around the loop that reads stations from map.getStations(). Reproduce the Schedules Direct update using the reported log scenario and identify the null station case. Done means the update no longer throws NullPointerException and EPG data continues updating.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.