question

shipbuilder101 avatar image
shipbuilder101 asked

Adding multiple OverviewTiles pages crashes menu bar?

Hello,


I am adding multiple variants of the /opt/victronenergy/gui/qml/OverviewTiles.qml pages to my UI, and I am changing the main.qml accordingly with adding these pages to the OverviewModel, aka:


 ListModel {
                id: overviewModel
                ListElement {
                        pageSource: "OverviewTiles_Page1.qml"
                }
                ListElement {
                        pageSource: "OverviewTiles_Page2.qml"
                }


and so on. All these pages also get displayed, however, after a certain amount of swiping from page to page the menu-bar at the bottom does not appear anymore, even with repeated clicking on the screen which normally makes it appear again. The only solution is to restart the device or use the ESC-key to trigger that "carousel-overview" over all pages, just for that error to reappear again once you swiped over a few pages.


Any idea what I am doing wrong?


I would be extremely thankful!


Best regards!

Venus OS
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

2 Answers
Kevin Windrem avatar image
Kevin Windrem answered Ā·

What you have done looks correct. I'm assuming you have created multiple .qml files for each page.

How many pages have you created?

The swipe to change pages can be overridden by a any touch/swipe action WITHIN a page. I know the stock tiles overview allows you to swipe-scroll the bottom half of the page. Maybe this has been activated when it should not be.

I would also check the GUI log for errors:

tail -50 /data/log/gui/current | tai64nlocal


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

shipbuilder101 avatar image
shipbuilder101 answered Ā·

Hello @Kevin Windrem , thank you very much for your answer.


I have created 15 pages.

I do not use the stock-tiles and do not have vertical scrolling, the pages are static so to speak. The thing is that it seems somewhat nondeterministic. It appears after a random amount of swipes and usually not on the same pages. I even had it that I could swipe left-right between the same 3-4 pages but if I then swiped further the menu bar went away for good again.

Could it have something to do with the pageStack code in the main.qml?

Unfortunately

tail -50 /data/log/gui/current | tai64nloc

Did not reveal any info upon the error happening...

I hope you know more, I'm already very glad for your advice.


Best wishes!

5 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kevin Windrem avatar image Kevin Windrem commented Ā·
It might be you are running out of memory. Check that with 'top'. What is your GX device? CCGX memory is pretty limited. I would remove some of your pages and test to see if the problem still occurs.


You might need to add your overviews to 'overviewsLoaded'. I believe this check (done via a 2 second timer) insures all overview pages are valid before switching to the "pages" side of the GUI.

0 Likes 0 Ā·
shipbuilder101 avatar image shipbuilder101 Kevin Windrem commented Ā·

Hi @Kevin Windrem , thank you for answer.

I am using a BeagleBone Black, "top" reveals that memory is not a problem at all.


I'm not sure I understand what you mean with adding the overviews to "overviewsLoaded". It appears at two spots in the code of main.qml:


property bool overviewsLoaded: defaultOverview.valid && generatorOverview.valid && mobileOverview.valid && tanksOverview.valid && startWithMenu.valid

But that can't be it right, because it refers to dbus-values.. I assume you mean this then:

        // When all the related settings items are valid, show the overview page if was the last oppened page
        // before restarting
        Timer {
                interval: 2000
                running: completed && overviewsLoaded && startWithMenu.valid
                onTriggered: if (startWithMenu.value === 0) showOverview()
        }

But then how could I add my pages here? My pages are not registered with dbus settings anyway as they are always displayed and not dependent on a setting.

startWithMenu.value 

is also 0 for me, so according to the code above

showOverview()

should be triggered.


I hope you can still help me, thanks again so far!


Best wishes.

0 Likes 0 Ā·
Kevin Windrem avatar image Kevin Windrem shipbuilder101 commented Ā·
Sorry, yes you are correct about overviewsLoaded.

I'm out of ideas, but would still suggest you reduce the number of added tile overviews and see if it reduces the number of failures.

0 Likes 0 Ā·
shipbuilder101 avatar image shipbuilder101 Kevin Windrem commented Ā·

Hi @Kevin Windrem , reducing the number of pages actually fixed it! :) Once we have exactly over 10 pages the error occurs. Do you have any idea why? Sounds like a constant somewhere or so, perhaps a value we can increase?


Thanks again and best wishes!

0 Likes 0 Ā·
Kevin Windrem avatar image Kevin Windrem shipbuilder101 commented Ā·
Sorry no. I have no idea why.
0 Likes 0 Ā·

Related Resources