Re: [maemo-developers] Problem with Home plugin

2007-03-12 Thread Vlad Vasiliev
Eero Tamminen wrote:
 skip
 I've just encountered a problem with omweather where it made some
 of the statusbar plugins not to work properly.  Disabling omweather
 didn't help in this problem and re-enabling it crashed desktop.

 The problem wasn't reproducable, but are you doing something funny
 with D-BUS in omweather?


 - Eero

OMWeather does not use D-BUS.

Vlad.

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


Re: [maemo-developers] Problem with Home plugin

2007-03-08 Thread Johan Bilien
On Thu, Mar 08, 2007, Markku Vire wrote:
 I wonder if the Home is already using GTypePlugin interface and dynamic 
 types to handle the types registered by the plugins. That would be the 
 right (tm) way to handle this in the scope of GObject... In the case of 
 register_static one can newer unload the modules.

Yes that's what we do in the new hildon-desktop code (see
https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-desktop/).

Unfortunately it doesn't solve all the problems. Say plugin foo links
against gtkhtml, then the types for gtkhtml get registered statically,
then registered again when the applet is reloaded.

-- 
Johan Bilien
[EMAIL PROTECTED]
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] Problem with Home plugin

2007-03-07 Thread Eero Tamminen

Hi,

ext Vladislav Vasiliev wrote:

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.


I've just encountered a problem with omweather where it made some
of the statusbar plugins not to work properly.  Disabling omweather
didn't help in this problem and re-enabling it crashed desktop.

The problem wasn't reproducable, but are you doing something funny
with D-BUS in omweather?


- Eero

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



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


Re: [maemo-developers] Problem with Home plugin

2007-03-07 Thread Johan Bilien
On Mon, Dec 18, 2006, Vladislav Vasiliev wrote:
 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?

Hi,

sorry for the very late answer,

home is not dlclosing the plugins, because many plugins (including the
shipped ones) register GType. dlclosing the re-opening them results in
them trying to re-register the types, even though glib already knows
about them.

The same handle from dlopen is reused if the applet is reopened.

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


Re: [maemo-developers] Problem with Home plugin

2007-03-07 Thread Eero Tamminen

Hi,

ext Eero Tamminen wrote:

ext Vladislav Vasiliev wrote:

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.


I've just encountered a problem with omweather where it made some
of the statusbar plugins not to work properly.  Disabling omweather
didn't help in this problem and re-enabling it crashed desktop.

The problem wasn't reproducable, but are you doing something funny
with D-BUS in omweather?


Another problem with the omweather applet seems to be that it leaks *40*
MB of RAM during the night while it's idling (and as a result
applications will get OOM-killed by the kernel).


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


Re: [maemo-developers] Problem with Home plugin

2007-03-07 Thread Markku Vire

Hi,

I wonder if the Home is already using GTypePlugin interface and dynamic 
types to handle the types registered by the plugins. That would be the 
right (tm) way to handle this in the scope of GObject... In the case of 
register_static one can newer unload the modules.


-Markku-

Johan Bilien wrote:

On Mon, Dec 18, 2006, Vladislav Vasiliev wrote:


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?



Hi,

sorry for the very late answer,

home is not dlclosing the plugins, because many plugins (including the
shipped ones) register GType. dlclosing the re-opening them results in
them trying to re-register the types, even though glib already knows
about them.

The same handle from dlopen is reused if the applet is reopened.



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