[maemo-developers] Assertion failed unexpectedly OR BUG in maemo 3.x?
From: Jakov dkymail at gmail.comDate: Tue Feb 26 05:49:47 EET 2008
- Previous message: handling channels in telepathy
- Next message: Announcement for maemo Eclipse Integration version 0.9 (Beta)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Yes, that's so. The number of param passing depends on detailed signal which is invoked. For instance, "clicked" is a signal that invokes void user_function (GtkButton *button, gpointer user_data) : Run First / Action so my func should be void callback_do_test (GtkButton *button, gpointer data ) instead of void callback_do_test (GtkWidget* widget, GtkAction * action, gpointer data ) Type-casting is no problem but redundant param will lead to application accessing arbitrary data as you said. That's the reason why the app ran so unstably. Hey, don't know why it ran well on Maemo 3.x. Is it a BUG? Don't know if 3.xis open now. Thanks a lot one more time, Markku Vire! Have a nice day! On Mon, Feb 25, 2008 at 6:31 PM, Jakov <dkymail at gmail.com> wrote: > > Oh my God! I didn't realize that for a long time! This morning after such > a stupid prob, I removed maemo 4.0 and installed Maemo 3.2. Not tested > yet, but I think it should have the same params counts as you say. I'll tell > you the result soon. Just a quick msg now to say thank you! Thanks so much, > Markku Vire! > > > > > On Mon, Feb 25, 2008 at 6:00 PM, Markku Vire <markku.vire at movial.fi> > wrote: > > > > > Hi, > > > > The problem behind "changing parameters" is that you are attaching wrong > > type of singal handler to signal (i.e. the number/type of parameters > > don't match). > > > > I didn't actually try your code, but at least you cannot connect > > "callback_do_test" (3 parameters) to "clicked" signal (2 parameters). > > This will lead to you application accessing arbitrary data. > > > > Hope this helps, > > > > -Markku- > > > > Jakov wrote: > > > Hi, > > > > > > I have a very simple app running on Maemo 4.0 with a textbox and a > > button. > > > As I click on the button, a callback function is invoked to show the > > content > > > of the textbox. I don't know why the data pointer which is passed to > > > callback function is sometimes NULL: > > > - if I click on the textbox (a virtual keyboard shown below) and then > > click > > > on the button, the callback function failed due to assertion of data > > pointer > > > - if I just click the button (don't focus on the textbox), the data > > pointer > > > is not NULL, but the child of it is NULL. > > > > > > I'm so confused. It didn't happen on Maemo 3.2 before. > > > > > > Here's the code of 4 files (interface.*, callbacks.*) in my project > > /src/ui, > > > I follow the structure of maemopad-2.1 > > > http://paste.org/index.php?id=2098 > > > > > > If you're interested in solving this problem, please help me out. > > Thanks > > > very much! > > > > > > Best regards, > > > Jakov > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > _______________________________________________ > > > maemo-developers mailing list > > > maemo-developers at maemo.org > > > https://lists.maemo.org/mailman/listinfo/maemo-developers > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20080226/a790bbf3/attachment.htm
- Previous message: handling channels in telepathy
- Next message: Announcement for maemo Eclipse Integration version 0.9 (Beta)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]