Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to run on device #56

Closed
rschroll opened this issue Aug 13, 2014 · 18 comments
Closed

Failure to run on device #56

rschroll opened this issue Aug 13, 2014 · 18 comments

Comments

@rschroll
Copy link
Owner

Currently, Beru is running fine on the desktop, but not on emulators or devices. It will run on devices when launched from the console, but when launched from the GUI or Qt Creator, it starts and then exits rapidly. It looks like it may be a clean exit, not a seg fault. No useful output results from running under debug mode.

Commenting out large sections of BookPage.qml will get it to run occasionally. But this isn't reproducible.

@rschroll
Copy link
Owner Author

@randy-jr-olive: Does this sound like the same problem you're having?

@randy-jr-olive
Copy link
Contributor

this is absolutely the problem I've been running into, and I've also playing around with BookPage.qml to try and get it to work, no luck. I haven't gotten much output from the crashes, hard to find logs or debug info on the phone. I did get an error one time: WARNING: the use of the Ubuntu.Components.Extras.Browser namespace is deprecated, please consider updating your applications to import Ubuntu.Web instead

This is of course, vague, and just a warning, but it's the only output the device has ever given me.

@randy-jr-olive
Copy link
Contributor

more errors I've found:

libust[18510/18513]: Error: Error opening shm /lttng-ust-wait-5 (in get_wait_shm() at lttng-ust-comm.c:886)
Application started: 18510
[0813/162038:ERROR:icu_util.cc(149)] Couldn't mmap /usr/lib/arm-linux-gnueabihf/oxide-qt/icudtl.dat

look familiar at all?

@randy-jr-olive
Copy link
Contributor

go this one too, still trying to run on phone from qt creator

Application started: 23056
/usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene: invalid option -- 'I'

@rschroll
Copy link
Owner Author

I've found some consistency. If I comment out both the BookPage and the BrowserPage in main.qml, I get it to run. (Though somewhat pointlessly.)

If I comment out only the BookPage, it usually runs, but not always. (I can't make it fail at the moment, so I can't get the error message here.) When it runs, it gives warnings about the deprecation and experimental nature of QtWebKit.

If I comment out only the BrowserPage, I get these error messages

libust[10190/10193]: Error: Error opening shm /lttng-ust-wait-5-32011 (in get_wait_shm() at lttng-ust-comm.c:886)
libust[10190/10193]: Error: Error opening shm /lttng-ust-wait-5-32011 (in get_wait_shm() at lttng-ust-comm.c:886)
libust[10190/10192]: Error: Error opening shm /lttng-ust-wait-5 (in get_wait_shm() at lttng-ust-comm.c:886)
libust[10190/10192]: Error: Error opening shm /lttng-ust-wait-5 (in get_wait_shm() at lttng-ust-comm.c:886)
/usr/lib/i386-linux-gnu/qt5/bin/qmlscene: invalid option -- 'I'
/usr/lib/i386-linux-gnu/qt5/bin/qmlscene: unrecognized option '--appargs='
[0817/171713:ERROR:icu_util.cc(149)] Couldn't mmap /usr/lib/i386-linux-gnu/oxide-qt/icudtl.dat
[0817/171713:FATAL:content_main_runner.cc(715)] Check failed: base::i18n::InitializeICU(). 

The first two libust errors and the qmlscene complaints about options also appear when the (reduced) programs runs, so I don't think they're important. My guess is that it's the icu_util.cc that's the problem. It seems to be a part of Chromium/Oxide, though, so I don't know what to do about it.

@rschroll
Copy link
Owner Author

This problem is caused by apparmor. To fix it, add the "webview" policy group, boost the version to 1.1, and move to the 14.04 framework. This is all helpfully documented in the middle of this IRC log. And apparently nowhere else. Lovely....

So after that fix, now we get

file:///opt/click.ubuntu.com/com.ubuntu.developer.rschroll.beru/0.9.6/ui/main.qml:59 Type BrowserPage unavailable
file:///opt/click.ubuntu.com/com.ubuntu.developer.rschroll.beru/0.9.6/ui/BrowserPage.qml:51 Type UbuntuWebView unavailable
file:///usr/lib/i386-linux-gnu/qt5/qml/Ubuntu/Components/Extras/Browser/UbuntuWebView01.qml:20 plugin cannot be loaded for module "QtWebKit": Cannot load library /usr/lib/i386-linux-gnu/qt5/qml/QtWebKit/libqmlwebkitplugin.so: (dlopen: cannot load any more object with static TLS)

Now the error messages are ungrammatical and confusing. (Can it not load more objects with static TLS, or can it no longer load objects with static TLS? And more importantly, why?) Progress!

rschroll added a commit that referenced this issue Aug 17, 2014
Otherwise it crashes with obscure error messages.  Refs #56.
@rschroll
Copy link
Owner Author

@randy-jr-olive: Can you see if you have this recent issue on the device? Some Googling suggests that it may be an i386 issue.

For my own records, here's the Stack Overflow question that I've been working off of. Sometimes it runs, sometimes it doesn't. I've tried adding -ftls-model=global-dynamic to the flags, but it doesn't seem to alter things much.

@randy-jr-olive
Copy link
Contributor

I was working I this from the webview/oxide problem, but app armor seems just as likely, I've been following this thread locally, I'll play around some more to see what comes up.

@randy-jr-olive
Copy link
Contributor

I still get the following error, even after including your chagnes in my local branch:

Installed com.ubuntu.developer.rschroll.beru-0.9.6.armhf (installed:click,removable=1,app_name=beru)
Application installed, executing
Registering hooks
Start Application
libust[19627/19630]: Error: Error opening shm /lttng-ust-wait-5-32011 (in get_wait_shm() at lttng-ust-comm.c:886)
Application started: 19627
Received a failed event
The Application exited, cleaning up

@rschroll
Copy link
Owner Author

I've noticed that the output pane in Qt Creator often misses some error
messages. Look at the log in ~/.cache/upstart and see if there's any
other errors. (Note that the log file will have the output from many
invocations, so just look at the end.) I've seen the libust errors
many times, and they don't seem to be fatal.

@randy-jr-olive
Copy link
Contributor

I get this error on the deivce (from logs), which you've seen before:

libust[26145/26149]: Error: Error opening shm /lttng-ust-wait-5-32011 (in get_wait_shm() at lttng-ust-comm.c:886)
libust[26145/26149]: Error: Error opening shm /lttng-ust-wait-5-32011 (in get_wait_shm() at lttng-ust-comm.c:886)
/usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene: invalid option -- 'I'
/usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene: unrecognized option '--appargs='

[0817/223916:ERROR:icu_util.cc(149)] Couldn't mmap /usr/lib/arm-linux-gnueabihf/oxide-qt/icudtl.dat
[0817/223916:FATAL:content_main_runner.cc(715)] Check failed: base::i18n::InitializeICU().

What I do find weird is that I also run into problems with qmlscene saying that -I and --appargs are invalid, I wonder if that's related at all.

@randy-jr-olive
Copy link
Contributor

This is the line of code from icu_util.cc that is giving me trouble (line 149):

if (!mapped_file.Initialize(data_path)) {
LOG(ERROR) << "Couldn't mmap " << data_path.AsUTF8Unsafe();
return false;
}

Could it still be a file permission thing? Maybe file permissions are still preventing the browser from loading.

@rschroll
Copy link
Owner Author

That's the error that indicates apparmor problems. I'd check that your
click packages are actually building with the updated manifest and
apparmor files.

@rschroll
Copy link
Owner Author

I've been able to run Beru several times on an armhf emulator without running into a TLS issue. I pretty sure that this is just an i386 issue and we can ignore it for now. But I'd like to get a confirmation from someone with a physical device.

@randy-jr-olive
Copy link
Contributor

I've been messing around with oxide for the browserPage, but getting no-where (and probably unrelated anyways), I'll see if I can't just get it to run as is and give you some feedback from the device. I'll start with a nexus 4.

@randy-jr-olive
Copy link
Contributor

It does run for me on the nexus 4 and 7, I get the following errors in the SDK output:
qml: Error 1: Could not find a script context to deliver the message too
qml: WindowSizeChanged
qml: Error 1: Could not find a script context to deliver the message too
qml: WindowSizeChanged

also, the bottom toolbar is useable on the desktop, but neither of my devices could open the toolbar while reading an ebook, bug I think, maybe not a whole "issue".

It is nice to see Beru running on the device, it's coming along nicely.

@randy-jr-olive
Copy link
Contributor

@rschroll
Copy link
Owner Author

I'm going to close this bug. The TLS issues have been moved into #59, but I don't really care about them right now. I've noticed the toolbar issue on the emulator, but I was hoping that that was just emulator brokenness. No such luck, apparently, so it's bug #60.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants