You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The quickest fix is to filter out nulls and map those to 0.
Steps to reproduce
Create a playlist that references a MediaFile with an invalid header/null Duration value
Version
11.1.4 (Stable)
Version Detail
No response
Operating System
Linux (Dockerized)
Java Version
17.0.13+11-alpine-r0
Database
PostgreSQL 14.x
DB Detail
No response
Configuration paramter
JAVA_OPTS=-Dserver.use-forward-headers=true
Proxy Server
No response
client detail
No response
language
None
Relevant log output
2025-01-14 06:46:55.867 WARN --- o.a.p.service.PlaylistService : Failed to auto-import playlist /playlists/Mine.m3ujava.lang.NullPointerException: null at java.base/java.util.stream.ReferencePipeline$6$1.accept(ReferencePipeline.java:248) ~[na:na] at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[na:na] at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[na:na] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[na:na] at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[na:na] at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:na] at java.base/java.util.stream.DoublePipeline.collect(DoublePipeline.java:541) ~[na:na] at java.base/java.util.stream.DoublePipeline.sum(DoublePipeline.java:450) ~[na:na] at org.airsonic.player.service.PlaylistService.setFilesInPlaylist(PlaylistService.java:175) ~[!/:11.1.4] at org.airsonic.player.service.PlaylistService.lambda$11(PlaylistService.java:162) ~[!/:11.1.4] at java.base/java.util.Optional.map(Optional.java:260) ~[na:na] at org.airsonic.player.service.PlaylistService.setFilesInPlaylist_aroundBody4(PlaylistService.java:161) ~[!/:11.1.4] at org.airsonic.player.service.PlaylistService$AjcClosure5.run(PlaylistService.java:1) ~[!/:11.1.4] at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:67) ~[spring-aspects-6.1.12.jar!/:6.1.12] at org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:73) ~[spring-aspects-6.1.12.jar!/:6.1.12] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:379) ~[spring-tx-6.1.12.jar!/:6.1.12] at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:71) ~[spring-aspects-6.1.12.jar!/:6.1.12]
The text was updated successfully, but these errors were encountered:
I just realized that this was because of the playlist pointing to an invalid mp3. I will leave it up for discussion if this case should be handled more gracefully or to keep the behavior as is.
What happened?
When auto-importing a playlist, I get a
NullPointerException
atPlaylistService.java:175
:The quickest fix is to filter out nulls and map those to 0.
Steps to reproduce
Version
11.1.4 (Stable)
Version Detail
No response
Operating System
Linux (Dockerized)
Java Version
17.0.13+11-alpine-r0
Database
PostgreSQL 14.x
DB Detail
No response
Configuration paramter
JAVA_OPTS=-Dserver.use-forward-headers=true
Proxy Server
No response
client detail
No response
language
None
Relevant log output
The text was updated successfully, but these errors were encountered: