Skip to main content
Participant
October 7, 2014
Question

Scene crashing on interaction - multiple FLVPlayback instances; 2GB of RAM to blame?

  • October 7, 2014
  • 1 reply
  • 267 views

Hi there;

I'm currently working on a Kiosk interface for an in-house piece of hardware that we're manufacturing.  All the visuals are largely handled by imported MP4's.

Simple enough structure; with a menu containing five buttons; each of which stop the background video from playing; hide the buttons, as well as start the relevant video.  This works fine, on my authoring computer (very powerful); as well as the Kiosk itself. 


However, when I add another layer of complexity to the scene (by, for example - adding a submenu, with it's own buttons for video selection), the scene will intermittently crash to desktop; with no error message - only on the Kiosk PC.  This PC has much lower specs than my authoring PC; an i5 processor, integrated graphics - as well as only 2GB of ram. 

I've tried debugging it - and the only error message I've managed to pull out is "out of memory".  The crash to desktop always happens when a button is pressed; be it the menu-button (to return to the main menu), or a video button (to start a video) - as these are effectively doing very similar things.  This crash cannot be replicated on my authoring PC; no matter how long or how hard I press it. 

Upon lowering the bitrate of all the videos used by the scene - it appears the issue happens much less frequently; however it is not resolved entirely. 

This issue has presented itself on two separate versions of the file; both of which have been individually built up from the simple (and stable) version of the file, mentioned earlier.

Am I right to think that the memory limitation of the hardware is cause to blame here?


This topic has been closed for replies.

1 reply

sinious
Legend
October 8, 2014

If you can show one fullscreen video then you can show as many as you like. I believe this is a lot more about what you're doing than the RAM. Remember, we always have pageing to HD when RAM gets low. Chances are you have your pagefile set to auto-expand so if it really needed more memory, the video would start to studder pretty badly as HD would be used, acting like physical RAM (with poor performance).

I feel the issue is actually your onboard graphics (Intel HD3000/4000?). MP4 decoding is a part of even the cheapest graphics cards, including Intel HD onboard. I think you're hitting a snag by not removing an existing video completely before attempting to use the MP4 decoder for a different video.

Keep in mind, Intel HD graphics shares your systems memory as its own, reducing your actual available RAM. The OS might only take around ~1GB but the video card will need RAM for itself every time you play a video, so you need to release any in-memory videos to release that RAM.

My suggestion to you would be to make absolutely sure you get any previously loaded video dereferenced. If you're trying to keep the main attracter loop in RAM while displaying a different video, that could kill the application. Close any open netconnections, netstreams, video objects, dispose it all and null it out. You can't actually force garbage collection (but you can request it). You should do whatever you can to clean up before you start the next video however. As long as you're doing that, there's no reason why you can't play unlimited videos, properly disposing them as you go.

Lastly, are there certain videos you notice this happens on? Note their bitrate, codec and file size. If it always crashes trying to decode a 500MB MP4, well, then you know what the problem is.