Notices


Reply
Thread Tools
lostinmirkwood's Avatar
Posts: 128 | Thanked: 232 times | Joined on Sep 2009 @ New Jersey, USA
#1
I just finished an alpha version of my application and I figured I'd learn how to package and upload to the extras-devel repository.

It's a PyQt Application, and I packaged it with Py2Deb (following these directions, couldn't seem to get PyPackager to work). After a few tries I worked out my dependencies issues and it was available in Application Manager.

The Install went flawlessly, but when I run the application from the ".desktop shortcut" (if that's what it's called) It starts to load, changes the title bar, and after 4seconds it crashes without GUI Error.

Strangly, enough when I run, from the installed directory:
Code:
python /opt/anselA/anselA.py
Where anselA is my project name.

It works as expected, and throws no errors to xTerm.


My question is:

Is there a way to capture stderr from a desktop link?
Is there a way to print out past kernel/system errors?


I'm currently not using any post install scripts, I'm fairly sure that's not right, but since I can't capture an error log I don't know where to start.

Last edited by lostinmirkwood; 2010-03-12 at 21:06.
 
lostinmirkwood's Avatar
Posts: 128 | Thanked: 232 times | Joined on Sep 2009 @ New Jersey, USA
#2
FYI,
My .desktop file in
src/usr/share/applications/hildon/anselA.desktop
Code:
[Desktop Entry]
Version=1.0.0
Encoding=UTF-8
Name=Ansel A
Comment=Digital Darkroom for the N900
Exec=/opt/anselA/anselA.py
Icon=anselA
X-Icon-path=/usr/share/icons
X-Window-Icon=anselA
Type=Application
X-Osso-Service=com.nokia.ansela	
X-Osso-Type=application/x-executable
StartupWMClass=anselA
Name[en_US]=anselA.desktop
 
m2cm2c's Avatar
Posts: 100 | Thanked: 240 times | Joined on Feb 2010 @ The South Pole O.o
#3
Originally Posted by lostinmirkwood View Post
FYI,
My .desktop file in
src/usr/share/applications/hildon/anselA.desktop
Code:
[Desktop Entry]
Version=1.0.0
Encoding=UTF-8
Name=Ansel A
Comment=Digital Darkroom for the N900
Exec=/opt/anselA/anselA.py
Icon=anselA
X-Icon-path=/usr/share/icons
X-Window-Icon=anselA
Type=Application
X-Osso-Service=com.nokia.ansela	
X-Osso-Type=application/x-executable
StartupWMClass=anselA
Name[en_US]=anselA.desktop
try making the exec command
Exec=python /opt/anselA/anselA.py

or from the terminal make the file executable
chmod +x /opt/anselA/anselA.py
 

The Following User Says Thank You to m2cm2c For This Useful Post:
m2cm2c's Avatar
Posts: 100 | Thanked: 240 times | Joined on Feb 2010 @ The South Pole O.o
#4
also if you want to see the python errors, you can make it start in a terminal by making the exec as follows
Exec=osso-xterm "python /opt/anselA/anselA.py"
 

The Following User Says Thank You to m2cm2c For This Useful Post:
lostinmirkwood's Avatar
Posts: 128 | Thanked: 232 times | Joined on Sep 2009 @ New Jersey, USA
#5
or from the terminal make the file executable
chmod +x /opt/anselA/anselA.py
Should have mentioned that I did that, through x-term not through a post-install script.


um wow, Exec=osso-xterm "python /opt/anselA/anselA.py"
in the .desktop file crashed the device, I'm rebooting now.



ok, Both of those Launched the application correctly, but it still crashed and did not throw out an error anywhere

Not sure what the reboot was... I'm ignoring it since I was running quite a few things simultaneousness, and was editing everything through SSH.

Last edited by lostinmirkwood; 2010-03-12 at 21:03. Reason: Appending Info
 
m2cm2c's Avatar
Posts: 100 | Thanked: 240 times | Joined on Feb 2010 @ The South Pole O.o
#6
Originally Posted by lostinmirkwood View Post
Should have mentioned that I did that, through x-term not through a post-install script.


um wow, Exec=osso-xterm "python /opt/anselA/anselA.py"
in the .desktop file crashed the device, I'm rebooting now.



ok, Both of those Launched the application correctly, but it still crashed and did not throw out an error anywhere

Not sure what the reboot was... I'm ignoring it since I was running quite a few things simultaneousness, and was editing everything through SSH.

hmm,

try making your .desktop file as follows:

[Desktop Entry]
Encoding=UTF-8
Name=Ansel A
GenericName=Digital Darkroom for the N900
Exec=osso-xterm "python /opt/anselA/anselA.py"
Icon=anselA
X-Osso-Type=application/x-executable
X-HildonDesk-ShowInToolbar=false
Type=Application
StartupNotify=true
 
lostinmirkwood's Avatar
Posts: 128 | Thanked: 232 times | Joined on Sep 2009 @ New Jersey, USA
#7
copied and pasted that into nano, saved and ran.

It seems to crash (go out of memory and turn black momentarily) a bit faster now, ~1second instead of ~4secs.

m2cm2c, do you know if I can print kernel or python errors? so I can debug this?
 
m2cm2c's Avatar
Posts: 100 | Thanked: 240 times | Joined on Feb 2010 @ The South Pole O.o
#8
Originally Posted by lostinmirkwood View Post
copied and pasted that into nano, saved and ran.

It seems to crash (go out of memory and turn black momentarily) a bit faster now, ~1second instead of ~4secs.

m2cm2c, do you know if I can print kernel or python errors? so I can debug this?
what I do when I debug my scripts is either run them through the terminal or send the output to a text file as in:
Exec=python /opt/anselA/anselA.py > some_text_file

although in your case, I think running dmesg should give you a hint in whats happening to your app.

Last edited by m2cm2c; 2010-03-12 at 21:27.
 

The Following User Says Thank You to m2cm2c For This Useful Post:
lostinmirkwood's Avatar
Posts: 128 | Thanked: 232 times | Joined on Sep 2009 @ New Jersey, USA
#9
The dmesg was exactly what I was looking for, although when the application crashes, nothing gets dumped to dmesg unfortunately, the same thing with piping the output to a text file. it seems the application crashes before that. although, If I manually invoke it from the command line, everything works fine.

even invoking, ./opt/anselA/anselA.py runs perfectly.
 
lostinmirkwood's Avatar
Posts: 128 | Thanked: 232 times | Joined on Sep 2009 @ New Jersey, USA
#10
actually I found two things, on I was making a relative reference to a file...oops

secondly dmesg wasn't helpful. but the system tool strace seemed to be exactly what I needed. you can find it by enabling the tools repository, info is here, there's some very useful utils that I didn't think BusyBox had available.

I'm still having the problem with launching the application, but I'm getting closer to debugging the solution.
 
Reply


 
Forum Jump


All times are GMT. The time now is 15:32.