> On Aug 15, 2016, at 10:06 AM, Marco Martin <[email protected]> wrote:
>
> On Monday 15 August 2016, Dirk Hohndel wrote:
>>> On Aug 15, 2016, at 7:50 AM, Marco Martin <[email protected]> wrote:
>>>
>>> On Monday 15 August 2016, Dirk Hohndel wrote:
>>>> Line numbers in kirigamiplugin.cpp are slightly off since I have a few
>>>> lines of debug output in there; frame #9 is foreach (const QString
>>>> &style, m_stylesFallbackChain) {
>>>> frame #10 is
>>>>
>>>> qmlRegisterSingletonType(componentPath(QStringLiteral("Theme.qml")),
>>>> uri,
>>>>
>>>> 1, 0, "Theme");
>>>>
>>>> /D
>>>
>>> as that list ended up to always be 2 at most, i may try to simplify that,
>>> but if it's really a crash during a simple foreach of a string list,
>>> suggests there may be something else..
>>
>> Agreed. That's why I was saying it's an init issue.
>
> just to get an idea, can you try the attached patch? if it works i would
> still
> have no idea why, but interesting never the less to see tyhe result
As expected, this didn't fix the issue
* thread #1: tid = 0x2f77bb, 0x010c8768
Subsurface-mobile`QString::append(this=0x03393640, str=0x018d7ab8) + 120 at
qstring.cpp:2041, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x5)
* frame #0: 0x010c8768 Subsurface-mobile`QString::append(this=0x03393640,
str=0x018d7ab8) + 120 at qstring.cpp:2041
frame #1: 0x00aa1202 Subsurface-mobile`QString::operator+=(this=0x03393640,
s=0x018d7ab8) + 18 at qstring.h:447
frame #2: 0x004d0ba0 Subsurface-mobile`operator+(s1=0x0339363c,
s2=0x018d7ab8) + 40 at qstring.h:1273
frame #3: 0x001cb618
Subsurface-mobile`KirigamiPlugin::componentPath(this=0x018d7aac,
fileName=0x033939f8) const + 128 at kirigamiplugin.cpp:34
frame #4: 0x001cba3c
Subsurface-mobile`KirigamiPlugin::registerTypes(this=0x018d7aac,
uri="org.kde.kirigami") + 576 at kirigamiplugin.cpp:69
frame #5: 0x000fe45a Subsurface-mobile`KirigamiPlugin::registerTypes() + 22
at kirigamiplugin.h:51
frame #6: 0x000fd074 Subsurface-mobile`run_ui() + 168 at
subsurface-mobile-helper.cpp:40
This is very strange to me - by the time we call run_ui() things shouldn't be
crashing like this.
As I said in my last email, by hardcoding all the paths I can actually prevent
it from crashing,
but that still doesn't make things work because it then fails to load the
Kirigami .qml files.
That problem sounds like the one that might be easier to tackle:
QQmlApplicationEngine failed to load component
qrc:///qml/main.qml:350 Type DiveDetails unavailable
qrc:///qml/DiveDetails.qml:219 Type Kirigami.OverlaySheet unavailable
qrc:///OverlaySheet.qml:-1 File not found
Attached is the (obviously not desirable) patch that gets me to that point.
/D
diff --git a/src/kirigamiplugin.cpp b/src/kirigamiplugin.cpp
index fc530b3..3c71d29 100644
--- a/src/kirigamiplugin.cpp
+++ b/src/kirigamiplugin.cpp
@@ -67,28 +70,30 @@ void KirigamiPlugin::registerTypes(const char *uri)
qmlRegisterUncreatableType<ApplicationHeaderStyle>(uri, 1, 0,
"ApplicationHeaderStyle", "Cannot create objects of type
ApplicationHeaderStyle");
- qmlRegisterSingletonType(componentPath(QStringLiteral("Theme.qml")), uri,
1, 0, "Theme");
- qmlRegisterSingletonType(componentPath(QStringLiteral("Units.qml")), uri,
1, 0, "Units");
-
- qmlRegisterType(componentPath(QStringLiteral("Action.qml")), uri, 1, 0,
"Action");
-
qmlRegisterType(componentPath(QStringLiteral("AbstractApplicationHeader.qml")),
uri, 1, 0, "AbstractApplicationHeader");
-
qmlRegisterType(componentPath(QStringLiteral("AbstractApplicationWindow.qml")),
uri, 1, 0, "AbstractApplicationWindow");
- qmlRegisterType(componentPath(QStringLiteral("AbstractListItem.qml")),
uri, 1, 0, "AbstractListItem");
- qmlRegisterType(componentPath(QStringLiteral("ApplicationHeader.qml")),
uri, 1, 0, "ApplicationHeader");
-
qmlRegisterType(componentPath(QStringLiteral("ToolBarApplicationHeader.qml")),
uri, 1, 0, "ToolBarApplicationHeader");
- qmlRegisterType(componentPath(QStringLiteral("ApplicationWindow.qml")),
uri, 1, 0, "ApplicationWindow");
- qmlRegisterType(componentPath(QStringLiteral("BasicListItem.qml")), uri,
1, 0, "BasicListItem");
- qmlRegisterType(componentPath(QStringLiteral("OverlayDrawer.qml")), uri,
1, 0, "OverlayDrawer");
- qmlRegisterType(componentPath(QStringLiteral("ContextDrawer.qml")), uri,
1, 0, "ContextDrawer");
- qmlRegisterType(componentPath(QStringLiteral("GlobalDrawer.qml")), uri, 1,
0, "GlobalDrawer");
- qmlRegisterType(componentPath(QStringLiteral("Heading.qml")), uri, 1, 0,
"Heading");
- qmlRegisterType(componentPath(QStringLiteral("Icon.qml")), uri, 1, 0,
"Icon");
- qmlRegisterType(componentPath(QStringLiteral("Label.qml")), uri, 1, 0,
"Label");
- qmlRegisterType(componentPath(QStringLiteral("OverlaySheet.qml")), uri, 1,
0, "OverlaySheet");
- qmlRegisterType(componentPath(QStringLiteral("Page.qml")), uri, 1, 0,
"Page");
- qmlRegisterType(componentPath(QStringLiteral("ScrollablePage.qml")), uri,
1, 0, "ScrollablePage");
- qmlRegisterType(componentPath(QStringLiteral("SplitDrawer.qml")), uri, 1,
0, "SplitDrawer");
- qmlRegisterType(componentPath(QStringLiteral("SwipeListItem.qml")), uri,
1, 0, "SwipeListItem");
+ qmlRegisterSingletonType(QStringLiteral("qrc:///styles/Plasma/Theme.qml"),
uri, 1, 0, "Theme");
+ qmlRegisterSingletonType(QStringLiteral("qrc:///styles/Plasma/Units.qml"),
uri, 1, 0, "Units");
+ //qmlRegisterSingletonType(componentPath(QStringLiteral("Theme.qml")),
uri, 1, 0, "Theme");
+ //qmlRegisterSingletonType(componentPath(QStringLiteral("Units.qml")),
uri, 1, 0, "Units");
+
+ qmlRegisterType(QStringLiteral("qrc:///Action.qml"), uri, 1, 0, "Action");
+ qmlRegisterType(QStringLiteral("qrc:///AbstractApplicationHeader.qml"),
uri, 1, 0, "AbstractApplicationHeader");
+ qmlRegisterType(QStringLiteral("qrc:///AbstractApplicationWindow.qml"),
uri, 1, 0, "AbstractApplicationWindow");
+ qmlRegisterType(QStringLiteral("qrc:///AbstractListItem.qml"), uri, 1, 0,
"AbstractListItem");
+ qmlRegisterType(QStringLiteral("qrc:///ApplicationHeader.qml"), uri, 1, 0,
"ApplicationHeader");
+ qmlRegisterType(QStringLiteral("qrc:///ToolBarApplicationHeader.qml"),
uri, 1, 0, "ToolBarApplicationHeader");
+ qmlRegisterType(QStringLiteral("qrc:///ApplicationWindow.qml"), uri, 1, 0,
"ApplicationWindow");
+ qmlRegisterType(QStringLiteral("qrc:///BasicListItem.qml"), uri, 1, 0,
"BasicListItem");
+ qmlRegisterType(QStringLiteral("qrc:///OverlayDrawer.qml"), uri, 1, 0,
"OverlayDrawer");
+ qmlRegisterType(QStringLiteral("qrc:///ContextDrawer.qml"), uri, 1, 0,
"ContextDrawer");
+ qmlRegisterType(QStringLiteral("qrc:///GlobalDrawer.qml"), uri, 1, 0,
"GlobalDrawer");
+ qmlRegisterType(QStringLiteral("qrc:///Heading.qml"), uri, 1, 0,
"Heading");
+ qmlRegisterType(QStringLiteral("qrc:///Icon.qml"), uri, 1, 0, "Icon");
+ qmlRegisterType(QStringLiteral("qrc:///Label.qml"), uri, 1, 0, "Label");
+ qmlRegisterType(QStringLiteral("qrc:///OverlaySheet.qml"), uri, 1, 0,
"OverlaySheet");
+ qmlRegisterType(QStringLiteral("qrc:///Page.qml"), uri, 1, 0, "Page");
+ qmlRegisterType(QStringLiteral("qrc:///ScrollablePage.qml"), uri, 1, 0,
"ScrollablePage");
+ qmlRegisterType(QStringLiteral("qrc:///SplitDrawer.qml"), uri, 1, 0,
"SplitDrawer");
+ qmlRegisterType(QStringLiteral("qrc:///SwipeListItem.qml"), uri, 1, 0,
"SwipeListItem");
}
#include "moc_kirigamiplugin.cpp"
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface