Reply
Thread Tools
Posts: 60 | Thanked: 23 times | Joined on Jan 2010
#1
I have installed my .deb file to my N900 and when I try to run it from the icon or from the terminal command line I get "Segmentation fault".
When I log in to the N900 with MADDE terminal and start the app from the command line, it runs fine, no problems.

Anyone know why this can be?
The users are different.. but can that be it? How can I fix this?

EDIT: I found the source of the problem, I have not yet located the exact part of the code, but isolated a good chunk of it.

Last edited by tmsha; 2010-07-01 at 16:04.
 
Posts: 317 | Thanked: 787 times | Joined on Oct 2009 @ Krakow, Poland
#2
I experience the same issues. In my case further investigation always show that SDL or SDL_image function cause seg faults. I find strace to be useful for narrowing down where segfault occures. Anyway I'm using a workaround launcher script for my app to temporarily resolve this:
Code:
unsetenv *
/run/my/app
Also when I do on the device:
Code:
root
su - user
/run/my/app
the unstability issue does not exists.

Hope I've helped a little.
 
Posts: 317 | Thanked: 787 times | Joined on Oct 2009 @ Krakow, Poland
#3
Originally Posted by epitaph View Post
Nobody? Any idea?
I recommend using valgrind memcheck and correcting every issue it outputs that concerns your code. Valgrind does wonderful job stabilising C and C++ programs. Also the problem that I mentioned in previous post was solved using valgrind.

If you upload your app compiled for N900 I can test it for you.
 
Posts: 317 | Thanked: 787 times | Joined on Oct 2009 @ Krakow, Poland
#4
Originally Posted by epitaph View Post
Could you compile the aforementioned code yourself, please? Thank you in advance.
Yes, I will try it on my N900.
 
Posts: 317 | Thanked: 787 times | Joined on Oct 2009 @ Krakow, Poland
#5
I compiled this source and it works just fine for me from remote SSH session, local on N900 as root, and local as user. I used this command line to compile the source:

Code:
 g++ `pkg-config --libs --cflags hildonmm hildon-notify hildon-notifymm` notify_problem.c -o notify_problem
 
Posts: 317 | Thanked: 787 times | Joined on Oct 2009 @ Krakow, Poland
#6
Valgrind says that there is no problem with the code.
 
Posts: 317 | Thanked: 787 times | Joined on Oct 2009 @ Krakow, Poland
#7
I'm attaching my compiled ARM binary. If it works for you there might be something wrong with your compilation environment. If it does not work for you maybe there is something wrong on your N900.
Attached Files
File Type: zip notify_problem.zip (5.6 KB, 50 views)
 
Posts: 317 | Thanked: 787 times | Joined on Oct 2009 @ Krakow, Poland
#8
Backtrace looks very similar to the the one in this bug: https://bugs.maemo.org/show_bug.cgi?id=8417
 
Posts: 317 | Thanked: 787 times | Joined on Oct 2009 @ Krakow, Poland
#9
That bug report indicates that initialising D-Bus using GLib will fail with exactly the same seg fault when there is no valid session found. In your case this line:

Code:
Hildon::notify_init("Notification Example");
does exactly the same and thus the seg fault. It looks to me like GLib bug.

Could you post the output for:
Code:
env | grep DBUS_SESSION_BUS_ADDRESS
from your N900 and from remote?
 
Posts: 317 | Thanked: 787 times | Joined on Oct 2009 @ Krakow, Poland
#10
Does it work from local when you do (there should be no line break in the first with export command):
Code:
export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-N1vcl3PjS4,guid=4c7bf24e5e75f7352c7ff60b00000011

./notify
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 11:42.