Not all items are shown on LG BP550

Description

Only 110 records are shown in the browser "by record".

Environment

None

Test file(s)

None

Activity

Show:
Fabrizio Giudici
February 15, 2017, 11:41 PM

There are two possible fixes in fix-for-BMT-129:

  • the former is a hack in DIDLAdapterSupport that makes an exception for Record and uses getTrackCount(). Simple, but ugly. Currently commented out.

  • the latter is in SupplierBasedFinder8 and MappingFinder; more elegant, but it misses a solid foundation for all cases.

All tests pass, indeed. The problem is that it wouldn't work for paginating queries, for instance. It probably needs a check for every suspect case, and fallback to the previous approach.

Fabrizio Giudici
February 15, 2017, 8:47 PM

done, but no improvements - the problem is the usual one, PathAwareEntityFinderDelegate wraps a MappingFinder and its count() computes all the results and count them.

21:41:05.954 [cling-8 ] WARN i.t.b.m.i.c.finder.RepositoryOptimizedTrackFinder - stack-trace
java.lang.RuntimeException: stack trace
at it.tidalwave.util.LoggingUtilities.dumpStack(LoggingUtilities.java:50) ~[it-tidalwave-bluemarine2-commons-1.0-ALPHA-20-SNAPSHOT.jar:3.1-ALPHA-2.6507223fb11e]
at it.tidalwave.bluemarine2.model.impl.catalog.finder.RepositoryFinderSupport.query(RepositoryFinderSupport.java:408) [it-tidalwave-bluemarine2-catalog-1.0-ALPHA-20-SNAPSHOT.jar:1.0-ALPHA-20-SNAPSHOT.32f373f52111]
at it.tidalwave.bluemarine2.model.impl.catalog.finder.RepositoryFinderSupport.computeNeededResults(RepositoryFinderSupport.java:252) [it-tidalwave-bluemarine2-catalog-1.0-ALPHA-20-SNAPSHOT.jar:1.0-ALPHA-20-SNAPSHOT.32f373f52111]
at it.tidalwave.util.spi.FinderSupport.results(FinderSupport.java:328) [it-tidalwave-util-3.1-ALPHA-2.jar:3.1-ALPHA-2.6507223fb11e]
at it.tidalwave.util.SupplierBasedFinder8.computeResults(SupplierBasedFinder8.java:70) ~[it-tidalwave-bluemarine2-commons-1.0-ALPHA-20-SNAPSHOT.jar:3.1-ALPHA-2.6507223fb11e]

****************************************
at it.tidalwave.util.MappingFinder.computeResults(MappingFinder.java:70) ~[it-tidalwave-bluemarine2-commons-1.0-ALPHA-20-SNAPSHOT.jar:3.1-ALPHA-2.6507223fb11e]
****************************************

at it.tidalwave.util.spi.FinderSupport.computeNeededResults(FinderSupport.java:366) [it-tidalwave-util-3.1-ALPHA-2.jar:3.1-ALPHA-2.6507223fb11e]
at it.tidalwave.util.spi.FinderSupport.count(FinderSupport.java:339) [it-tidalwave-util-3.1-ALPHA-2.jar:3.1-ALPHA-2.6507223fb11e]

****************************************
at it.tidalwave.bluemarine2.model.impl.PathAwareEntityFinderDelegate.count(PathAwareEntityFinderDelegate.java:170) ~[it-tidalwave-bluemarine2-model-1.0-ALPHA-20-SNAPSHOT.jar:1.0-ALPHA-20-SNAPSHOT.32f373f52111]
****************************************

at it.tidalwave.bluemarine2.upnp.mediaserver.impl.didl.DIDLAdapterSupport.lambda$setCommonFields$2(DIDLAdapterSupport.java:73) ~[classes/:na]
at java.util.Optional.ifPresent(Optional.java:159) ~[na:1.8.0_92]
at it.tidalwave.bluemarine2.upnp.mediaserver.impl.didl.DIDLAdapterSupport.setCommonFields(DIDLAdapterSupport.java:73) ~[classes/:na]
at it.tidalwave.bluemarine2.upnp.mediaserver.impl.didl.MediaFolderDIDLAdapter.toObject(MediaFolderDIDLAdapter.java:67) ~[classes/:na]
at it.tidalwave.bluemarine2.upnp.mediaserver.impl.didl.CompositeDIDLAdapterSupport.lambda$toContent$0(CompositeDIDLAdapterSupport.java:94) ~[classes/:na]
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[na:1.8.0_92]
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[na:1.8.0_92]
at it.tidalwave.bluemarine2.upnp.mediaserver.impl.didl.CompositeDIDLAdapterSupport.toContent(CompositeDIDLAdapterSupport.java:90) ~[classes/:na]
at it.tidalwave.bluemarine2.upnp.mediaserver.impl.ContentDirectoryClingAdapter.findEntity(ContentDirectoryClingAdapter.java:162) ~[classes/:na]
at it.tidalwave.bluemarine2.upnp.mediaserver.impl.ContentDirectoryClingAdapter.lambda$browse$0(ContentDirectoryClingAdapter.java:127) ~[classes/:na]
at it.tidalwave.bluemarine2.model.impl.DefaultCacheManager$DefaultCache.computeObject(DefaultCacheManager.java:82) ~[it-tidalwave-bluemarine2-model-1.0-ALPHA-20-SNAPSHOT.jar:1.0-ALPHA-20-SNAPSHOT.32f373f52111]
at it.tidalwave.bluemarine2.model.impl.DefaultCacheManager$DefaultCache.lambda$getCachedObject$0(DefaultCacheManager.java:66) ~[it-tidalwave-bluemarine2-model-1.0-ALPHA-20-SNAPSHOT.jar:1.0-ALPHA-20-SNAPSHOT.32f373f52111]
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[na:1.8.0_92]
at it.tidalwave.bluemarine2.model.impl.DefaultCacheManager$DefaultCache.getCachedObject(DefaultCacheManager.java:66) ~[it-tidalwave-bluemarine2-model-1.0-ALPHA-20-SNAPSHOT.jar:1.0-ALPHA-20-SNAPSHOT.32f373f52111]
at it.tidalwave.bluemarine2.upnp.mediaserver.impl.ContentDirectoryClingAdapter.browse(ContentDirectoryClingAdapter.java:127) ~[classes/:na]
at org.fourthline.cling.support.contentdirectory.AbstractContentDirectoryService.browse(AbstractContentDirectoryService.java:200) ~[cling-support-2.1.1.jar:na]
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_92]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_92]
at org.seamless.util.Reflections.invoke(Reflections.java:41) ~[seamless-util-1.1.1.jar:na]
at org.fourthline.cling.model.action.MethodActionExecutor.execute(MethodActionExecutor.java:90) ~[cling-core-2.1.1.jar:na]
at org.fourthline.cling.model.action.AbstractActionExecutor$1.execute(AbstractActionExecutor.java:73) ~[cling-core-2.1.1.jar:na]
at org.fourthline.cling.model.DefaultServiceManager.execute(DefaultServiceManager.java:128) ~[cling-core-2.1.1.jar:na]
at org.fourthline.cling.model.action.AbstractActionExecutor.execute(AbstractActionExecutor.java:71) ~[cling-core-2.1.1.jar:na]
at org.fourthline.cling.protocol.sync.ReceivingAction.executeSync(ReceivingAction.java:104) ~[cling-core-2.1.1.jar:na]
at org.fourthline.cling.protocol.ReceivingSync.execute(ReceivingSync.java:63) ~[cling-core-2.1.1.jar:na]
at org.fourthline.cling.protocol.ReceivingAsync.run(ReceivingAsync.java:71) ~[cling-core-2.1.1.jar:na]
at org.fourthline.cling.transport.spi.UpnpStream.process(UpnpStream.java:82) ~[cling-core-2.1.1.jar:na]
at org.fourthline.cling.transport.impl.HttpExchangeUpnpStream.run(HttpExchangeUpnpStream.java:119) ~[cling-core-2.1.1.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_92]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_92]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_92]

Fabrizio Giudici
February 15, 2017, 12:27 AM

Fixing should bring great benefits for this issue.

Fabrizio Giudici
January 11, 2017, 12:24 AM

It's a problem of performance. The query takes too long and the device, unlike others that wait until the end, stops with the data collected at that point. Browsing elsewhere and re-browsing shows all the results, since data has been cached and the response is immediate.

Fabrizio Giudici
January 10, 2017, 11:50 AM

Looking at the logs, the device correctly queries - in paginated fashion - all the item and blueMarine correctly provides all the data. Nevertheless, they are truncated.

It's probably worth while prepare a browsing integration test before proceeding.

Assignee

Fabrizio Giudici

Reporter

Fabrizio Giudici

Labels

None

id

None

Operating system(s)

None

Specs URL

None

Progress in branch

fix-for-BMT-129

Components

Fix versions

Priority

Major