Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime exception when streams ends #4

Open
kodjobaah opened this issue Mar 27, 2014 · 1 comment
Open

Runtime exception when streams ends #4

kodjobaah opened this issue Mar 27, 2014 · 1 comment

Comments

@kodjobaah
Copy link

After starting a stream and when the stream ends the following exception is thrown..

[ERROR] [SegmentExecutor-1] org.springframework.scheduling.support.TaskUtils$LoggingErrorHandler - Unexpected error occurred in scheduled task.
java.lang.RuntimeException: error Interrupted system call, failed close IContainer com.xuggle.xuggler.IContainer@1647898992[url:null;type:READ;format:com.xuggle.xuggler.IContainerFormat@888047872[];] for redfivempegts:b5c4742a-ab09-42d8-8cf5-0bd27639d015--211a064e-cced-4205-88a6-2cc9b0653413
at org.red5.xuggler.writer.HLSStreamWriter.close(HLSStreamWriter.java:651) ~[hls-plugin-1.1.jar:na]
at org.red5.service.httpstream.SegmentFacade$QueueWorker.run(SegmentFacade.java:625) ~[hls-plugin-1.1.jar:na]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) ~[spring-context-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_25]
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) ~[na:1.7.0_25]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) ~[na:1.7.0_25]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) ~[na:1.7.0_25]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[na:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]

@kodjobaah
Copy link
Author

According to the Icontainer.close java docs..

If an error occurs after calling close all resources will be closed anyway..so instead of throwing a runtimeexception under this scenario may just logging the error would be more appropriate.

// if we're supposed to, close the container
if ((rv = container.close()) < 0) {
throw new RuntimeException("error " + IError.make(rv) + ", failed close IContainer " + container + " for " + outputUrl);
}

change to:

// if we're supposed to, close the container
if ((rv = container.close()) < 0) {
log.error("error " + IError.make(rv) + ", failed close IContainer " + container + " for " + outputUrl);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant