Memory problem - sbengine crashes

Questions and information about Crank Software's Storyboard Engine

Moderator: jamiev

Memory problem - sbengine crashes

Postby Ealo » Mon Oct 16, 2017 12:09 pm

Dear all,
I write to you because I have a problem that has caused a lot of sbengine crashes.
My Storyboard application has a large number of images, the larger ones are about 500kB.
After moving through the application screens which contains the bigger images the system crashes, and I can see on my output shell (my target device uses linux) the following messages:

Out of memory: Kill process 559 (avahi-daemon) score 0 or sacrifice child
Killed process 560 (avahi-daemon) total-vm:3180kB, anon-rss:172kB, file-rss:0kB
Out of memory: Kill process 559 (avahi-daemon) score 0 or sacrifice child
Killed process 559 (avahi-daemon) total-vm:3180kB, anon-rss:192kB, file-rss:0kB
Out of memory: Kill process 540 (rpcbind) score 0 or sacrifice child
Killed process 540 (rpcbind) total-vm:2384kB, anon-rss:180kB, file-rss:0kB
Out of memory: Kill process 536 (dbus-daemon) score 0 or sacrifice child
Killed process 536 (dbus-daemon) total-vm:2720kB, anon-rss:192kB, file-rss:268kB
Out of memory: Kill process 513 (gstreamer-backe) score 0 or sacrifice child
Killed process 513 (gstreamer-backe) total-vm:7640kB, anon-rss:1116kB, file-rss:0kB
Out of memory: Kill process 514 (sbengine) score 0 or sacrifice child
Killed process 514 (sbengine) total-vm:803512kB, anon-rss:21744kB, file-rss:0kB

Launching the "top" program just before the system crash I can see the following values on sbengine process:

%VSZ=80%

%CPU=5%

It seems that all images that I load on previuos screens remain loaded in memory also if they are not used by the current screen.
Is there a way to free / clean the resources that are not used on the current screen?

I already try to execute commands like this

os.execute("echo 3 > /proc/sys/vm/drop_caches")

when I change from a screen to another but it doesn't work.
My target device use an iMx6 Dual Lite processor with 1 GB of Ram.
Thank you very much for the support.

Best regards

Ealo
Ealo
 
Posts: 12
Joined: Sat Oct 22, 2016 12:10 pm

Re: Memory problem - sbengine crashes

Postby rdowdall » Mon Oct 16, 2017 12:34 pm

Hello Ealo

Please read the documentation that can be found here:

http://www.cranksoftware.com/cranksoftw ... 25s08.html

For information and controlling the sizes of the caches, look at the options that are found here:

http://www.cranksoftware.com/cranksoftw ... ml#d0e8827

and look at the resource manager options. If that still doesn't have an impact on getting the memory down, then please let us know.

Thanks,
Rodney
rdowdall
 
Posts: 104
Joined: Mon Nov 02, 2009 9:46 pm

Re: Memory problem - sbengine crashes

Postby Ealo » Tue Oct 17, 2017 8:37 am

Hello,
thank you very much for the support.
First of all I tried to remove all the plugins not used in the project. Anyway I received again the out of memory error. Then I changed the S99-Start.sh adding the following command:

sbengine PROGRAM_NAME.gapp –resource_mgr, image = 100000 –report, channel=cluster_frontend &

The idea was to set the maximum size of the cache memory for the image to 100 MB, because the bigger screen of the program has about 60 MB of pictures. Then I run the program and a lot of pictures in all the screen were not shown on the screen and the shell shown the following error:
ERROR [11.197]: Impossible to lock the tex ref
I launched the program “top” and I obtained: % VSZ = 14%
Then I increased the maximum limit to 700MB, but the result was the same. There was the same error and the “top” program shown % VSZ = 14%
At the end I tested also the solution shown on the Crank website:

sbengine THEAL_THERAPY_3.gapp -resource_mgr, image = 4 -ogreio, channel = cluster_frontend &

The result was another time the same. I had the same shell error when the screen is loaded and the “top” program shown % VSZ = 14%.
Then I also noted that the program is a little bit slower and the reaction after a pression of the button was slower.

How can I resolve this problem?

Thank you very much for the support.

Best regards

Ealo
Ealo
 
Posts: 12
Joined: Sat Oct 22, 2016 12:10 pm

Re: Memory problem - sbengine crashes

Postby rdowdall » Tue Oct 17, 2017 10:49 am

Hello Ealo

When specifying the options to the command line, we typically do it like so:

-oresource_mgr,image=100000

Is what is listed in your post reflective of what is in your script?

What version of Storyboard are you running and on which target?

Thanks,
Rodney
rdowdall
 
Posts: 104
Joined: Mon Nov 02, 2009 9:46 pm

Re: Memory problem - sbengine crashes

Postby Ealo » Wed Oct 18, 2017 1:22 am

Hello Rodney,
thank you very much for the answer.
It was a typing error in the post, I used the option in the command line in the right way:

-oresource_mgr,image=100000

We use StoryBoard 5.0 on an iMx6 Dual Lite board with 1 GB of RAM.
Let me know!

Best regards

Ealo
Ealo
 
Posts: 12
Joined: Sat Oct 22, 2016 12:10 pm

Re: Memory problem - sbengine crashes

Postby rdowdall » Thu Oct 19, 2017 3:20 pm

Hello Ealo

I will attempt to reproduce the error here on an iMX6 Dual Lite. Could you let me know the specific runtime you are using (fbdev, opengles_2.0)?

If I can't reproduce the problem, would it be possible for you to contact Crank support with your Storyboard application?

Thanks,
Rodney
rdowdall
 
Posts: 104
Joined: Mon Nov 02, 2009 9:46 pm

Re: Memory problem - sbengine crashes

Postby Ealo » Sat Oct 21, 2017 1:09 pm

Hello Rodney,
thank you very much for the feedback. We had this problem on both StroyBoard 5.0 and 5.1, while we did not have this problem with StoryBoard 4.2.
Regarding runtime we are using OpenGLES 2.0.
Let me know!

Best regards

Ealo
Ealo
 
Posts: 12
Joined: Sat Oct 22, 2016 12:10 pm

Re: Memory problem - sbengine crashes

Postby jamiev » Mon Oct 23, 2017 9:44 am

Hello Ealo,

We are currently discussing this exact issue with your colleagues through the support channel (support@cranksoftware.com). We have been able to reproduce this issue internally and have created a PR to resolve. Feel free to contact your colleagues to join the existing support thread.

I will also post the resolution for others that may be experiencing the same issue.

Best Regards,

-Jamie
User avatar
jamiev
 
Posts: 57
Joined: Wed Nov 04, 2009 2:14 pm


Return to Storyboard Engine

Who is online

Users browsing this forum: No registered users and 1 guest

cron