Reply
Thread Tools
Posts: 37 | Thanked: 21 times | Joined on May 2010
#1
Hi,

I have just came across the following problem with webkit.

The following statement in N900 fails with SIGABRT

~ $ python
Python 2.5.4 (r254:67916, May 17 2010, 21:00:32)
[GCC 4.2.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import webkit
>>> webkit.WebView()
Aborted

The same in my desktop environment (not the SDK) and the application using webkit works fine, on N900 at the call to webkit.WebView() comes SIGABRT

Strace of the following ends with:
open("/etc/passwd", O_RDONLY) = 3
fcntl64(3, F_GETFD) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=1102, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40ffd000
read(3, "root:xxxxxxxxxxx:0:0:root:/roo"..., 4096) = 1102
close(3) = 0
munmap(0x40ffd000, 4096) = 0
getuid32() = 29999
uname({sys="Linux", node="Nokia-N900", ...}) = 0
access("/sbin/syslogd", R_OK|X_OK) = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(1949, 1949, SIGABRT) = 0
--- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT +++

The strace of the working desktop version looks similar up to the uname() call.

Any ideas how to get it to work on N900?

Paul
 
Posts: 324 | Thanked: 371 times | Joined on Dec 2009 @ Vancouver, BC
#2
Looks like you need to initialize threading support first. This works:
Code:
>>> import webkit,gobject
>>> gobject.threads_init()
>>> webkit.WebView()
<webkit.WebView object at 0x290968 (WebKitWebView at 0x2ff800)>
If you look at the source package http://maemo.org/packages/package_in...ebkit/1.0.2-4/ , there is a webbrowser.py in it as an example. Another program using it would be FeedingIt.
 

The Following User Says Thank You to Slocan For This Useful Post:
Posts: 37 | Thanked: 21 times | Joined on May 2010
#3
Thanks, I confirm, this works.

But why the desktop version did not need thread initialisation.... never mind...
 
Posts: 324 | Thanked: 371 times | Joined on Dec 2009 @ Vancouver, BC
#4
Originally Posted by Paul Ortyl View Post
But why the desktop version did not need thread initialisation.... never mind...
Actually, the desktop version on Ubuntu Lucid does crash for me as well, with a message that is a little more useful:
Code:
>>> import webkit
web>>> webkit.WebView()

GLib-ERROR **: The thread system is not yet initialized.
aborting...
Aborted
Googling a bit around seems to indicate some versions of webkit initialize the thread system itself, and some need it specified. Not sure why, really...
 
Posts: 5 | Thanked: 5 times | Joined on May 2010
#5
Hello,
where do I get the package? It is not in the repositories I have installed.
Thanks for an answer
Tim
 
Posts: 324 | Thanked: 371 times | Joined on Dec 2009 @ Vancouver, BC
#6
Originally Posted by Keeper View Post
Hello,
where do I get the package? It is not in the repositories I have installed.
Thanks for an answer
Tim
The python2.5-webkit package is in all of the Extras (aka Maemo.org), Extras-testing and Extras-devel repository, but since it's just a library, it would not show in the App Manager. If you have any of these enabled, then you can do, as root, on the X-term:
apt-get install python2.5-webkit
A GUI way to install it would be to install a package that depends on it (FeedingIt being the main example).
 
Reply


 
Forum Jump


All times are GMT. The time now is 13:01.