Skip to main content

NullPointerException during resumption of an inprogress-recording while stack reboot

5 replies [Last post]
prasobk
Offline
Joined: 2011-01-05
Points: 0

1. Create a recording request using a ServiceContextRecordingSpec.

2. Reboot the box before the end time of the recording request is reached

Here we can see that the recording will not automatically resume. If we analyze the logs we can see that RI actually tries to restore the recording but fails due to a NullPointerException

java.lang.NullPointerException
at org.cablelabs.impl.manager.recording.RecordingImpl.initiateRecordingProcess(RecordingImpl.java:1542)
at org.cablelabs.impl.manager.recording.RecordingImpl$IStatePending.handleStart(RecordingImpl.java:4248)
at org.cablelabs.impl.manager.recording.RecordingImpl.startInternal(RecordingImpl.java:3019)
at org.cablelabs.impl.manager.recording.Scheduler.timerWentOff(Scheduler.java:629)
at javax.tv.util.TVTimerSpec.notifyListeners(TVTimerSpec.java:304)
at org.cablelabs.impl.manager.timer.TimerMgrJava2$TVTimerImpl$1.run(TimerMgrJava2.java:434)
at java.util.TimerThread.mainLoop(Timer.java:498)
at java.util.TimerThread.run(Timer.java:428)
at java.lang.Thread.startup(Thread.java:785)
Is there any requirement to resume a recording (created using ServiceContextRecordingSpec) after a reboot? As per DVR-I06 Section 6.2.1.1.3
Recordings initiated with the invocation of the record method with a ServiceContextRecordingSpec as the
parameter SHALL be terminated if the service context is destroyed, or if an application selects another service on the service context.
Can we consider the power reboot similar to the case of destroyed service context?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cpratt
Offline
Joined: 2008-12-18
Points: 0

Sorry for the delayed response. I stopped getting forum notifications for some reason.
Those lines don't correspond with the RI trunk or 1.1.4 branch. Could you tell me what line of source you have at RecordingImpl.java:1542?

prasobk
Offline
Joined: 2011-01-05
Points: 0

Thanks for the response.

This is the line from where the NullPointerException is thrown,
"if (m_scheduledServiceContext.getService() == null)". This corresponds to the line 1577 in RecordingImpl.java (trunk ver: 16467)

cpratt
Offline
Joined: 2008-12-18
Points: 0

I've reproduced this issue and opened a bug: OCAP_RI-401 (Future-time ServiceContextRecordingSpec-based RecordingRequest causes NullPointerException during RecordingManager database initialization).
Thanks for the heads-up. We should be able to fix this in short order.

cpratt
Offline
Joined: 2008-12-18
Points: 0

The fix was pretty straight-forward so I've applied the fix to RI trunk with change 16515.

cpratt
Offline
Joined: 2008-12-18
Points: 0

Thanks - I think I have an idea of what this could be.
I will attempt to reproduce this today.