![]() |
|
selecting 'Hide Contents' may crash MinimServer - Printable Version +- MinimServer Forum (https://forum.minimserver.com) +-- Forum: MinimServer (/forumdisplay.php?fid=1) +--- Forum: Support (/forumdisplay.php?fid=4) +--- Thread: selecting 'Hide Contents' may crash MinimServer (/showthread.php?tid=121) |
selecting 'Hide Contents' may crash MinimServer - winxi - 08-08-2012 21:25 Hi Simon, i use BubbleUPnP as control point. I figured out that the following procedure crashes MinimServer: 1) select [folder view] from the top level 2) select any folder 'dummy' 3) select '>> Tag View' Now, there is '>> Hide Contents' and 'dummy' available 4) select 'dummy' cirtical: BubbleUPnP (and i guess other control points do this, too) cashes the contents of 'dummy' 5) go one step back and select '>> Hide Contents' 6) go one step back, '>> Hide Contents' and 'dummy' will appear again 7) select 'dummy' -> the cashed content will appear in the control point 8) select 'x items' Now, MinimServer crashes with the following exception: Code: MinimServer: exception while processing action request: java.lang.NullPointerExceptionInstead of choosing 'x items' in step 8, choosing e.g. 'Artist', the log will show Code: MinimServer: 0$folders$0$tagview$tags.0$Artist isn't a valid containerwhich is expected behaviour i guess. @bubbleguuum: if you read this -> maybe it would be a good idea to entirely hide the '>> Hide Contents' folders in the browsing trees of your control points. cheers, winxi RE: selecting 'Hide Contents' may crash MinimServer - simoncn - 08-08-2012 23:42 (08-08-2012 21:25)winxi Wrote: @bubbleguuum: if you read this -> maybe it would be a good idea to entirely hide the '>> Hide Contents' folders in the browsing trees of your control points. @bubbleguuum: if you read this -> please don't make any change until I've had a chance to investigate this problem and respond. @winxi: I'll look at this and respond as soon as possible, probably tomorrow evening. Simon RE: selecting 'Hide Contents' may crash MinimServer - simoncn - 09-08-2012 18:43 I have reproduced this problem using BubbleDS. I think the fix needed in MinimServer is to make the selection of the 'dummy' tag contents disable the effect of 'Hide Contents' until the control point next refreshes the top-level 'dummy' container under '[folder view]'. To put this another way, after displaying the top-level 'dummy' container under '[folder view]', you only get one chance to hide the tag contents of 'dummy'. When the unhidden tag contents are displayed, the chance to hide them is gone. This hidden/unhidden state is reset when the control point next refreshes the top-level 'dummy' container under '[folder view]'. The above is the simple version of the explanation. The full explanation is that MinimServer maintains a series of generations of the contents of the top-level 'dummy' container under '[folder view]', with each generation having its own hidden/unhidden status flag. When the control point browses the top-level 'dummy' container under '[folder view]', it gets the current generation of the contents. Previous generations are still available for use by control points that have cached references to them. When the hidden/unhidden status flag of the current generation is set, this triggers the creation of a new generation. At present this generational status flag only holds the hidden state. The fix will extend it to hold either the hidden or unhidden state. From the user's perspective, this approach maintains the intended purpose of 'Hide Contents' to prevent duplicates in the playlist when the control point adds a complete subtree to the playlist. RE: selecting 'Hide Contents' may crash MinimServer - winxi - 09-08-2012 19:05 Many thanks for the detailed explanation! It wasn't intended purpose of 'Hide Contents', i rather came across this playing around and exploring the smart browsing abilities of MinimServer. From my understanding, 'Hide Contents' is just necessary to prevent duplicate playlist entries when adding a folder together with subfolders. That's why i suggested to hide this at the control point side without omitting its functionality. RE: selecting 'Hide Contents' may crash MinimServer - simoncn - 09-08-2012 20:25 (09-08-2012 19:05)winxi Wrote: Many thanks for the detailed explanation! It wasn't intended purpose of 'Hide Contents', i rather came across this playing around and exploring the smart browsing abilities of MinimServer. I think there are two points here: 1) MinimServer needs to hande this as well as possible for all control points that have different strategies for caching, etc. This means that MinimServer should never throw a NullPointerException and shouldn't produce "xxxx isn't a valid container" errors. 2) In this situation, MinimServer is trying to work around limitations in the UPnP specifications. A control point such as BubbleDS could work around the MinimServer workarounds, as you're suggesting. It would be even better for server authors and control point authors to collaborate on adopting agreed extensions to the UPnP specifications so that these workarounds aren't needed. RE: selecting 'Hide Contents' may crash MinimServer - winxi - 10-08-2012 07:42 simoncn Wrote:1) MinimServer needs to hande this as well as possible for all control points that have different strategies for caching, etc. This means that MinimServer should never throw a NullPointerException and shouldn't produce "xxxx isn't a valid container" errors. That's the reason I reported this - to help you making MinmServer even more stable. I personally will avoid selecting 'Hide Contents' in the future. simoncn Wrote:2) In this situation, MinimServer is trying to work around limitations in the UPnP specifications. A control point such as BubbleDS could work around the MinimServer workarounds, as you're suggesting. It would be even better for server authors and control point authors to collaborate on adopting agreed extensions to the UPnP specifications so that these workarounds aren't needed. I totally agree and I understand that it may be challenging to be bound to the UPnP specification when designing such a great application. cheers, winxi RE: selecting 'Hide Contents' may crash MinimServer - bubbleguuum - 10-08-2012 10:16 I've been trying "Hide Contents", but I could not understand what it does (I read the paragraph on it carefully more than once in the docs) and the problem it addresses. Simon can you explain what you want to achieve with this folder ? RE: selecting 'Hide Contents' may crash MinimServer - winxi - 10-08-2012 10:22 Maybe this post makes it a bit clearer. RE: selecting 'Hide Contents' may crash MinimServer - simoncn - 10-08-2012 11:42 (10-08-2012 07:42)winxi Wrote: That's the reason I reported this - to help you making MinmServer even more stable. I personally will avoid selecting 'Hide Contents' in the future. Thanks, I appreciate the problem report and I'll definitely fix it. The 'Hide Contents' selection is not intended for users. It's only there for recursive Browse requests from control points. The MinimServer user guide doesn't make this clear, so I'll reword the relevant sections to clarify this. However, I'm glad you tried this out, because in the process you found a bug that needs to be fixed. Quote:I totally agree and I understand that it may be challenging to be bound to the UPnP specification when designing such a great application. It's like walking a tightrope and keeping a delicate balance between providing improved user functionality (one one hand) and staying compatible with the UPnP specification and existing control points (on the other hand). There are inevitably a few corner cases that don't work, and the UI isn't as clean as I would like. You could think of it as a working prototype for some advanced features that will hopefully become standard in the next generation of servers and control points. RE: selecting 'Hide Contents' may crash MinimServer - bubbleguuum - 10-08-2012 12:52 Now I understand. "Hide Content" is a hint for minimserver to not generate duplicates when being recursively browsed. (10-08-2012 11:42)simoncn Wrote: It's like walking a tightrope and keeping a delicate balance between providing improved user functionality (one one hand) and staying compatible with the UPnP specification and existing control points (on the other hand). There are inevitably a few corner cases that don't work, and the UI isn't as clean as I would like. You could think of it as a working prototype for some advanced features that will hopefully become standard in the next generation of servers and control points. Any specific feature(s) you have in mind that are difficult to achieve with th current standard ? Some Control Points have gone the route of building their own database from an UPnP Media Server to overcome some limitations, with the rmedia server being only there for initially crawling content, get updates and serve content. Notably, WMP, J River Media Center and Songbook (iOS) do this. I'm ambivalent on this solution. I can see the advantages (custom navigation, global search) but it duplicates Media Server functionality and creates new problems on the CP side (syncing). |