google / sagetv

SageTV is a cross-platform networked DVR and media management system
http://forums.sagetv.com/
Apache License 2.0
267 stars 173 forks source link

Nagging Native Bits - ImageLoader #304

Open CraziFuzzy opened 7 years ago

CraziFuzzy commented 7 years ago

I have seen a few posts on the forum about sage crashing out unexpectedly - seemingly tied to image management in some way (screensaver seems to be the common cause). What is sage gaining from doing imageloading, and especially scaling, in native code? This seems to needlessly complicate the issue, and I think we'd end up quite a bit more stable if we could roll this stuff into java. I think I'd take a slight performance hit over a unrecovered crash - though I wonder if newer java api's have made the need to go native for this obsolete.

A forum search for "native imageloader" presents a list of 'random crash' events stretching back about a decade.

Narflex commented 7 years ago

Go into detailed setup, advanced and disable the optimized image loader, then I'm pretty sure it won't use native code. Using native code for it is a major optimization and it was also needed for the extenders (for the local UI, not extender mode).

Most of those crashes are in direct3d, which you have to use regardless of native vs. Java image loading. I'm not aware of any current crashes in the actual native image loader we use and haven't seen a report pointing to that in awhile.

Jeff Kardatzke Sent from my Android

On Jun 15, 2017 1:54 AM, "Christopher Piper" notifications@github.com wrote:

I have seen a few posts on the forum about sage crashing out unexpectedly

  • seemingly tied to image management in some way (screensaver seems to be the common cause). What is sage gaining from doing imageloading, and especially scaling, in native code? This seems to needlessly complicate the issue, and I think we'd end up quite a bit more stable if we could roll this stuff into java. I think I'd take a slight performance hit over a unrecovered crash - though I wonder if newer java api's have made the need to go native for this obsolete.

A forum search for "native imageloader" presents a list of 'random crash' events stretching back about a decade.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/google/sagetv/issues/304, or mute the thread https://github.com/notifications/unsubscribe-auth/ANEIDJOlQmTMvcwpxs5CHFArPRGjRooPks5sEPFfgaJpZM4N66rf .

wayner9 commented 7 years ago

I could consistently cause SageTV to crash when loading .tiff files that were from a scanner. The crash would happen if the image happened to come up in the ScreenSaver or if you browsed to the folder containing the image (which would cause a thumbnail to load) in the Photos options from the main menu. I was able to reproduce this and try it on several severs, although I don't know that I still have the problematic file(s). And this happened on V9 Linux, V9 Windows and V7 Windows. See this thread https://forums.sagetv.com/forums/showthread.php?t=64299

Narflex commented 7 years ago

I recall fixing some TIFF issue a little while back, but if there is still one in there I would just need an example of it to fix it. ☺️

Jeff Kardatzke Sent from my Android

On Jun 15, 2017 10:20 AM, "wayner9" notifications@github.com wrote:

I could consistently cause SageTV to crash when loading .tiff files that were from a scanner. The crash would happen if the image happened to come up in the ScreenSaver or if you browsed to the folder containing the image (which would cause a thumbnail to load) in the Photos options from the main menu. I was able to reproduce this and try it on several severs, although I don't know that I still have the problematic file(s). And this happened on V9 Linux, V9 Windows and V7 Windows. See this thread https://forums.sagetv.com/forums/showthread.php?t=64299

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/google/sagetv/issues/304#issuecomment-308810819, or mute the thread https://github.com/notifications/unsubscribe-auth/ANEIDHMspe3HBGMGHKEkcvvuceaQK760ks5sEWfCgaJpZM4N66rf .