Re: (gtk_pixmap_new): assertion `val != NULL' failed
- From: Ignacio Nodal <inodal teleline es>
- Cc: GTK-List <gtk-list gnome org>
- Subject: Re: (gtk_pixmap_new): assertion `val != NULL' failed
- Date: Thu, 07 Jun 2001 13:52:56 +0200
Helmethead wrote:
>Sigh :)
hehehe, be patient with me :)))
>
> Have you ever tried doing this when you were learning C:
> void foo (int i)
> {
> i = 10;
> printf ("%d\n", i);
> } int main ()
> {
> int a = 5; printf ("%d\n", a);
> foo (a);
> printf ("%d\n", a);
> return 0;
>}
> the output will be:
> 5
> 10
> 5
> and not:
> 5
> 10
> 10
> That's the same reason why ronald's proposal won't work.
> Mine will tho unless I've made some silly screw up too :)
> By the way I didn't make much sense when I was talking about
> the cause of the segfault, I was confusing myself. Are you
> sure it was on the line you said it was? Did you actually try
> out the g_prints to see if they print?
Yeah, but.. gboolean ParameterKernel::ReadPixmap(gchar **pixstring,
GdkPixmap *pix) is more like void foo(int* i), or not? Well, I suppose
not, since then my program would be working fine :)))
The program crahsed on the line I said, because it printed "The program
arrives this point\n" and then returned me the segmentation fault, not
printing "Segmentation fault is in the line above\n".
[...]
g_print("The program arrives this point\n");
pix = *pixmap;
g_print("Segmentation fault is in the line above\n");
[...]
When I use Ronald's proposal it doesn't return me any segmentation fault
(both g_prints are shown) but then, when using gtk_pixmap_new() out from
the ReadPixmap() function I get the "assertion `val != NULL' failed"
error mentioned in my previous mail...
Is there anyway to use my GdkPixmap* _pixmap as a parameter for
gtk_pixmap_new(), outside from the function where I create it using
gdk_pixmap_colormap_create_from_xpm_d()??? really, anyway...
Thanks again...
And sorry if my bad programming skills turn you nervous, just some more
sighs and I hope it will work :))))
Ignacio Nodal
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]