I can create 3 pages with no crash, on the 4th I get:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
It works in Live Mode, but crashes if I hit run debug, or just run it.
Note that I had this issue before, but thought it was due to C++ integration, turns out to be how many pages I have, and the size matters, it crashes on 3 pages if I put content into them, and you might not get a crash unless you add more, 4 just happens to crash for me, I have 16 GB RAM and twice as much VM, so the amount of Memory calculates into the crash threshold for how many pages you need to load to get this to crash, so if you do not get it to crash with 4, keep adding till it crashes, or add more content to each page, as it is, it crashes with no content in them.
I create main page like this:
import Felgo 3.0
import QtQuick 2.0
/* ****************************************************************************
* Navigation Main Page
*/
App {
id: appID
// You get free licenseKeys from https://felgo.com/licenseKey
// With a licenseKey you can:
// * Publish your games & apps for the app stores
// * Remove the Felgo Splash Screen or set a custom one (available with the Pro Licenses)
// * Add plugins to monetize, analyze & improve your apps (available with the Pro Licenses)
//licenseKey: "<generate one from https://felgo.com/licenseKey>"
/* ******************************************************
* Naviagation view
*/
Navigation {
id: navigation
/* **************************************************
* First tab
*/
NavigationItem {
id: nav1
title: qsTr("Page 1")
icon: IconType.list
// NavigationStack
NavigationStack {
initialPage: Page1 { }
} // end NavigationStack
} // end NavigationItem
/* **************************************************
* Second tab
*/
NavigationItem {
id: nav2
title: qsTr("Page 2")
icon: IconType.anchor
// NavigationStack
NavigationStack {
initialPage: Page2 { }
} // end NavigationStack
} // end NavigationItem
/* **************************************************
* Third tab
*/
NavigationItem {
id: nav3
title: qsTr("Page 3")
icon: IconType.asterisk
// NavigationStack
NavigationStack {
initialPage: Page3 { }
} // end NavigationStack
} // end NavigationItem
/* **************************************************
* Forth tab
*/
NavigationItem {
id: nav4
title: qsTr("Page 4")
icon: IconType.bell
// NavigationStack
NavigationStack {
initialPage: Page4 { }
} // end NavigationStack
} // end NavigationItem
} // end Navigation
} // end App
The Pages are:
import Felgo 3.0
import QtQuick 2.0
Page {
title: "Page X"
}