[maemo-developers] Problem with Home plugin

2006-12-18 Thread Vladislav Vasiliev
Hello All,

Could you please help me with the issue I have with Maemo?

When I update my omweather home plugin package
https://garage.maemo.org/projects/omweather/ on Nokia 770 I have to reboot 
the device because plugin isn't unloaded from the memory. Switching plugin off 
doesn't help.
The same thing happens with any home plugin.

The lsof output clearly shows that plugin's stay in memory even when they're 
switched off. Here is example output of lsof when plugin iphome is switched off:
Nokia770-39:~# lsof|grep iphome

  maemo-lau  856   user  memREG   31,4   11692  40758
  /usr/lib/hildon-home/libiphome.so
  Nokia770-39:~#
   

In this tutorial 
http://maemo.org/platform/docs/howtos/maemo-plugin-tutorial.html#home-plugins
I found that hildon_home_applet_lib_deinitialize should do the job:

  /**
  * @hildon_home_applet_lib_deinitialize
  *
  * @param applet_data Applet data as returned by applet_initialize.
  *
  * Called when Home unloads the applet from memory.
  * Applet should deallocate all the resources needed.
  *   
  */
  
  void hildon_home_applet_lib_deinitialize(void *applet_data);
  
  This very function when switching off the plugin is not called. Is this
  a bug? May be I miss understand the problem?
  
   
However it seems that this function isn't called when switching off
plugins or just doesn't unload plugins from memory. Is this a bug or
have I missed something? How should it be done properly?

Thank you.

Vlad Vasiliev


___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] osso_socket doesn't work under scratchbox

2006-08-28 Thread Vladislav Vasiliev
Skip

 My environment: Maemo 2.0 i386 rootstrap, af-sb-init.sh started.
 I'm using /usr/share/doc/osso-ic-dev/examples/osso-socket.c example.
 Compile it:
 gcc osso-socket.c -o osso-socket `pkg-config --cflags --libs osso-ic
 glib-2.0`   -DDBUS_API_SUBJECT_TO_CHANGE
 and run:
 run-standalone.sh ./osso-socket 192.168.1.1 80
 So, this is the output I get:
 socket error: No route to host

 Some basic sanity check questions:

 Does connection to eg. localhost work?
No.  :(

./osso-socket 127.0.0.1 80
socket error: No route to host
Tracking osso_socket(2=PF_INET, 1=SOCK_STREAM, 6=tcp) = 3

 Does wget or any other network utility work under scratchbox for you?
Yes. Work fine.

wget 127.0.0.1
--17:26:43--  http://127.0.0.1/
   = `index.html'
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,456 [text/html]

0K . 100%  
13.89 MB/s

17:26:43 (13.89 MB/s) - `index.html' saved [1456/1456]

 Have you synced the resolv.conf from /etc outside scratchbox to
 inside it?
Yes.
 /etc/resolv.conf and
/scratchbox/users/vlad/targets/SDK_PC/etc/resolv.conf is synced.


Vlad Vasiliev

___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


[maemo-developers] osso_socket doesn't work under scratchbox

2006-08-27 Thread Vladislav Vasiliev
I already posted message about this issue some time ago:
http://maemo.org/pipermail/maemo-developers/2006-July/004752.html
Unfortunately I didn't get any answers on that post.
This time I'm trying to provide more details:

My environment: Maemo 2.0 i386 rootstrap, af-sb-init.sh started.
I'm using /usr/share/doc/osso-ic-dev/examples/osso-socket.c example.
Compile it:
gcc osso-socket.c -o osso-socket `pkg-config --cflags --libs osso-ic
glib-2.0`   -DDBUS_API_SUBJECT_TO_CHANGE
and run:
run-standalone.sh ./osso-socket 192.168.1.1 80
So, this is the output I get:
socket error: No route to host
Tracking osso_socket(2=PF_INET, 1=SOCK_STREAM, 6=tcp) = 3

And it fails. Here is the strace output:
...
socket(PF_FILE, SOCK_STREAM, 0) = 4
connect(4, {sa_family=AF_FILE, path=/var/run/dbus/system_bus_socket},
33) = 0
fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0
fcntl64(4, F_GETFD) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
getuid32() = 1005
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
poll([{fd=4, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
write(4, \0, 1) = 1
write(4, AUTH EXTERNAL 31303035\r\n, 24) = 24
poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, -1) = 1
read(4, OK 0c04cf4489534661909bda102f106..., 2048) = 37
poll([{fd=4, events=POLLOUT, revents=POLLOUT}], 1, -1) = 1
write(4, BEGIN\r\n, 7) = 7
poll([{fd=4, events=POLLIN|POLLOUT, revents=POLLOUT}], 1, -1) = 1
writev(4, [{l\1\0\1\0\0\0\0\1\0\0\0n\0\0\0\1\1o\0\25\0\0\0/org/fre...,
128}, {, 0}], 2) = 128
gettimeofday({1154418264, 195942}, NULL) = 0
poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, 25000) = 1
read(4, l\2\1\1\t\0\0\0\1\0\0\0=\0\0\0\6\1s\0\4\0\0\0:1.6\0\0\0...,
2048) = 258
read(4, 0x804ef40, 2048) = -1 EAGAIN (Resource temporarily unavailable)
writev(4, [{l\1\1\1B\0\0\0\2\0\0\0\177\0\0\0\1\1o\0\25\0\0\0/org/f...,
144}, {=\0\0\0type=\'signal\',interface=\'com..., 66}], 2) = 210
writev(4, [{l\1\0\1\24\0\0\0\3\0\0\0a\0\0\0\1\1o\0\16\0\0\0/com/no...,
120}, {\5\0\0\0[ANY]\0\0\0\0\0\0\0u2\0\0, 20}], 2) = 140
gettimeofday({1154418264, 196731}, NULL) = 0
poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, 18) = 1
read(4, l\2\1\1\0\0\0\0\3\0\0\0005\0\0\0\6\1s\0\4\0\0\0:1.6\0\0...,
2048) = 72
read(4, 0x804ef40, 2048) = -1 EAGAIN (Resource temporarily unavailable)
gettimeofday({1154418264, 196990}, NULL) = 0
poll([{fd=4, events=POLLIN, revents=POLLIN}], 1, 18) = 1
read(4, l\3\1\1B\0\0\0\4\0\0\0u\0\0\0\6\1s\0\4\0\0\0:1.6\0\0\0...,
2048) = 202
read(4, 0x804ef40, 2048) = -1 EAGAIN (Resource temporarily unavailable)
close(3) = 0
dup(2) = 3
fcntl64(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb7c9d000
_llseek(3, 0, 0xbfa91408, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(3, socket error: No route to host\n, 31socket error: No route to
host
) = 31
close(3) = 0
munmap(0xb7c9d000, 4096) = 0
munmap(0xb7c9e000, 4096) = 0
exit_group(1) = ?

But it works without any problem on the device.

Does anybody experience similar issues?

I'm just wondering if it's possible at all to run/debug connectivity
applications under scratchbox.
If it isn't it should be mentioned somewhere in the maemo documentation,
I believe.

Vlad Vasiliev
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


[maemo-developers] osso-connectivity and PC_SDK

2006-07-18 Thread Vladislav Vasiliev
Hello All.

I tried to use function osso_socket on PC_SDK and have received a problem.
I  take standard example for osso-ic-dev in
/usr/share/doc/osso-ic-dev/examples
Compile it:
gcc osso-socket.c -o osso-socket `pkg-config --cflags --libs osso-ic
glib-2.0`   -DDBUS_API_SUBJECT_TO_CHANGE
and run:
run-standalone.sh ./osso-socket 192.168.1.1 80
So, this is the output I get:/
/
socket error: No route to host
Tracking osso_socket(2=PF_INET, 1=SOCK_STREAM, 6=tcp) = 3

What interesting. I load PC_ARMEL environment and I see other output:

socket error: No route to host
Tracking osso_socket(2=PF_INET, 1=SOCK_STREAM, 6=tcp) = 4

Command wget http://192.168.1.1 works perfectly.  

Vlad Vasiliev.

___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers