maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   plugin load error message for desktop widget (https://talk.maemo.org/showthread.php?t=32324)

jaeezzy 2009-10-01 06:43

plugin load error message for desktop widget
 
Hi,
I'm learning to write a home(desktop) widget for fremantle. I've created .so file and the .desktop file, I tried the demo given in the tutorial which works fine but when I'm doing my own application I get this message while doing "af-sb-init.sh start":

Code:

[sbox-FREMANTLE_X86: /usr/share/applications/hildon-home] > hildon-input-method[7116]: GLIB WARNING ** default - Couldn't open /usr/lib/hildon-input-method/hildon-im-plugins.cache for reading. Forgot to run hildon-im-recache?
hildon-input-method[7116]: GLIB WARNING ** default - Failed loading the plugins.
hildon-input-method[7116]: GLIB WARNING ** default - No IM will show.
hildon-input-method[7116]: GLIB MESSAGE default - ui up and running
OIL: ERROR liboiltest.c 405: oil_test_check_impl(): function mas10_u8_mmx_2 in class mas10_u8_l15 failed check (8890 > 0) || (outside=0)

by the way everything works fine just my widget is not shown and if I manually go the the /usr/share/applications/hildon-home and resave my .desktop file it appears but doing this more than once make all other home widgets disappear so I'm really confused what's happening here. Thanks

EDIT: When all the widgets dissapear this message is displayed in the terminal:

[sbox-FREMANTLE_X86: /usr/share/applications/hildon-home] > maemo-launcher: child (pid=7317) terminated due to signal=11

Andre Klapper 2009-10-01 11:34

Re: plugin load error message for desktop widget
 
You're sure that you don't use any Diablo repositories?
What exactly does your Desktop widget do?

jaeezzy 2009-10-02 02:59

Re: plugin load error message for desktop widget
 
No, it shouldn't use diablo repositories. It just shows the slide show of the pictures in the directory you have chosen and when you click it it will open up the default image viewer with the current picture showing. I'm trying to make a desktop applet like in the windos vista. Btw, how would I used Diablo Repositories, as this is the first time I'm doing maemo sdk, I'm not sure but all I'm learning from is the "maemo 5 development guide". Thank you

jaeezzy 2009-10-02 13:27

Re: plugin load error message for desktop widget
 
Now the plugin wouldn't even load at all, when I fresh start "af-sb-init.sh start" (even after restarting the computer) Even other home widgets wouldn't load and gives this error message. Any suggestion on where I'm doing wrong:

[sbox-FREMANTLE_X86: /usr/share/applications/hildon-home] > hildon-home[4335]: GLIB WARNING ** sapwood - theme_pixbuf_render(clip_rect={x: 78,y: 108, width: 78, height: 63}: gdk_pixmap_new(width: 78, height: 63) failed
hildon-home[4335]: GLIB ERROR ** Gdk - The program 'hildon-home' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 923 error_code 8 request_code 70 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
aborting...
maemo-launcher: child (pid=4335) terminated due to signal=6


Thanks.

jaeezzy 2009-10-03 06:55

Re: plugin load error message for desktop widget
 
Now I've found other reason why the desktop widget is making the maemo launcher/hildon-desktop to crash. I think these are the bugs:

1) I just copied the example from libhildondesktop-2.1.28+0m5 and just changed the label to button and when clicking it make the maemo-launcher or the hildon-desktop to crash with the message like I've posted in my #4 post.

2) Using g_dir_open()/g_dir_close() causing it to crash. Here's the code and its called from within the example_label_home_applet_init(ExampleLabelHomeApp let *applet){} method:

Code:

static void populate_image_list(Data *data){
        GDir *dir;
        const gchar *directory = data->directory;
        const gchar *filename;
        g_print("Directory to get files from: %s\n", directory);
        g_dir_open(directory, 0, NULL);
        g_print("%s directory opened.\n", directory);
        for (; filename = g_dir_read_name(dir); ){
                if (g_str_has_suffix(filename, ".jpg") ||
                        g_str_has_suffix(filename, ".JPG") ||
                        g_str_has_suffix(filename, ".gif") ||
                        g_str_has_suffix(filename, ".GIF") ||
                        g_str_has_suffix(filename, ".png") ||
                        g_str_has_suffix(filename, ".PNG")){
                               
                        gchar *path = g_strconcat(directory, "/", filename, NULL);
                        g_print("%s\n", path);
                        data->list = g_list_prepend(data->list, path);
                        data->total_images++;
                }
        }
      g_dir_close(dir);
}

  • hildon-desktop displays no other widgets either and I get the following error message in the terminal:
[sbox-FREMANTLE_X86: ~/gtk_codes] > Directory to get files from: /scratchbox/users/jay/home/jay/photoapplet
/scratchbox/users/jay/home/jay/photoapplet directory opened.
maemo-launcher: child (pid=6062) terminated due to signal=11
hildon-desktop[6060]: GLIB WARNING ** default - mb_wm_client_window_sync_properties: X error 3
hildon-desktop[6060]: GLIB WARNING ** default - mb_wm_client_window_sync_properties: X error 3


I'm not sure what these problems are but I'm dead stuck with this so if anyone can give me any suggestion or anything I would be very grateful. Thanks

harriva 2009-10-03 10:23

Re: plugin load error message for desktop widget
 
You use dir without initializing it.
Change the line
g_dir_open(directory, 0, NULL);
to
dir = g_dir_open(directory, 0, NULL);

jaeezzy 2009-10-03 10:40

Re: plugin load error message for desktop widget
 
Thanks harriva that little thing made me do lot of big things :). btw, do you have any suggestion or have you/anyone tried the example from libhildondesktop? Thanks


All times are GMT. The time now is 19:28.

vBulletin® Version 3.8.8