Reply
Thread Tools
omeriko9's Avatar
Posts: 385 | Thanked: 344 times | Joined on Jan 2010 @ Israel
#11
Originally Posted by qwerty12 View Post
No problem

http://www.freemoe.org/users/qwerty12/libcallnotify.so

Well, for me, I knew what it was trying to open didn't exist and the rest of your code looked legit so I could only assume that fopen had returned NULL

http://en.wikipedia.org/wiki/GNU_Libtool - I can't really explain it properly, but I guess it's a long and complicated script that makes libraries straight from C files. I have no idea how to invoke it on its own actually ; I use Autotools in my **** and the macros take care of that for me...

Oh, I tested on the device
Unfortunately it still crashes my settings menu.
I think i once saw a way to display to terminal these errors, but I can't seem to find it...

EDIT: it crashes in more devices, see this...

Last edited by omeriko9; 2010-06-02 at 11:40.
 
omeriko9's Avatar
Posts: 385 | Thanked: 344 times | Joined on Jan 2010 @ Israel
#12
http://wiki.maemo.org/PyMaemo/HildonDesktop

See "Debugging tips"

I wonder if there's an DEBUG_OUTPUT way for hildon-control-panel like there is for hildon-status-menu?...
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#13
Originally Posted by omeriko9 View Post
Unfortunately it still crashes my settings menu.
I think i once saw a way to display to terminal these errors, but I can't seem to find it...

EDIT: it crashes in more devices, see this...
Make "char *fileContent;" "char fileContent[64];" (64's probably a little too much I guess for a file with its contents being rather small, I guess, but it works)

Try it now: http://www.freemoe.org/users/qwerty12/libcallnotify.so

Last edited by qwerty12; 2010-06-02 at 15:51.
 
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#14
Full instructions with scripts to install the SDK are here http://wiki.maemo.org/Documentation/...l_Installation
Thanks to qwerty12 for bumping this thread, otherwise I wouldn't have seen your post (I would autosubscribe to all posts I reply to, but this forum has a lot of threads that turned into rants)

Last edited by MohammadAG; 2010-06-02 at 21:50.
 

The Following User Says Thank You to MohammadAG For This Useful Post:
Posts: 98 | Thanked: 15 times | Joined on Jan 2010
#15



Got a quick Screen shot of MY NOKIA..
__________________
The Devil that is an Angel ... WTF???
 
omeriko9's Avatar
Posts: 385 | Thanked: 344 times | Joined on Jan 2010 @ Israel
#16
Originally Posted by qwerty12 View Post
Make "char *fileContent;" "char fileContent[64];" (64's probably a little too much I guess for a file with its contents being rather small, I guess, but it works)

Try it now: http://www.freemoe.org/users/qwerty12/libcallnotify.so
Thank you very much, it's working! I took the liberty to add it to the CallNotify update if you don't mind.
Any idea what's wrong with char pointer?..
 
omeriko9's Avatar
Posts: 385 | Thanked: 344 times | Joined on Jan 2010 @ Israel
#17
Originally Posted by MohammadAG View Post
Full instructions with scripts to install the SDK are here http://wiki.maemo.org/N900_USB_networking
Thanks to qwerty12 for bumping this thread, otherwise I wouldn't have seen your post (I would autosubscribe to all posts I reply to, but this forum has a lot of threads that turned into rants)
Thanks to qwerty12 is an understatement!

Thank you too. Are you sure that the link you provided is for the SDK? Looks like a USB networking thingy...
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#18
Originally Posted by omeriko9 View Post
Thank you very much, it's working! I took the liberty to add it to the CallNotify update if you don't mind.
Any idea what's wrong with char pointer?..
Changing from a pointer to instead using allocated memory usually means that you tried to use the char * without allocating memory for it.

Hence the segmentation fault.
 

The Following User Says Thank You to Joorin For This Useful Post:
omeriko9's Avatar
Posts: 385 | Thanked: 344 times | Joined on Jan 2010 @ Israel
#19
Originally Posted by Joorin View Post
Changing from a pointer to instead using allocated memory usually means that you tried to use the char * without allocating memory for it.

Hence the segmentation fault.
I see... so this is a case where I should have used "malloc" & "free"... or use an allocated memory. Right?
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#20
Originally Posted by omeriko9 View Post
I see... so this is a case where I should have used "malloc" & "free"... or use an allocated memory. Right?
Most likely, yes. Depending on how you get the string, you get three distinct cases:

You allocate the memory yourself using malloc. You need to use free to release it when it's no longer needed or your application will have a memory leak.

You allocate the memory on the stack, as in the fix above, and the memory will be deallocated as soon as you leave that specific stack scope/frame.

You get a pointer to statically, or otherwise, allocated memory that you should not try to deallocate when you're done with it. This is, from time to time, the most tricky case since you need to either know what to do or read the documentation carefully.
 

The Following User Says Thank You to Joorin For This Useful Post:
Reply

Thread Tools

 
Forum Jump


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