Re: [gtk-list] random crashes (my code)



A problem in malloc usually means you have a pointer problem.  You may be
passing an invalid or uninitialized pointer to a function.  A code snippet
where you are creating the pixmap would be helpful, since that is what
leads to the segfault.

--Jason

On Thu, 17 Sep 1998, Travis Loyd wrote:

> Problem signs:
>     My program will run longer sometimes than others, always dying at the
>     same place but there doesn't appear to be a reason why. At the point
>     where a pixmap is created. (which succeeds 0-20 times unpredictably)
> 
> Questions:
> 1) Sometimes when i move a certain window my program will crash when i let
>    go of the mouse... there a common theme amoung that type of problem?
> 
> 2) What does this message imply? I only get it some of the time, usually
>    shortly before the program crashes.
>    "** WARNING **: invalid cast from `(unknown)' to `GtkObject'"
> 
> gdb dump (may look familiar)
> ---------------------------------------------------------------------
> Program received signal SIGSEGV, Segmentation fault.
> 0x8076288 in malloc ()
> (gdb) where
> #0  0x8076288 in malloc ()
> #1  0x400d53f6 in g_malloc (size=300) at gmem.c:124
> #2  0x400c833f in gdk_pixmap_colormap_create_from_xpm_d (window=0x8111530,
> colormap=0x80edf98,
>     mask=0xbfffe2b4, transparent_color=0x80f879c, data=0x80cbcf4) at
> gdkpixmap.c:605
> #3  0x400c8748 in gdk_pixmap_create_from_xpm_d (window=0x8111530,
> mask=0xbfffe2b4,
>     transparent_color=0x80f879c, data=0x80cbcf4) at gdkpixmap.c:732
> #4  0x804c617 in showDeal (mother=0xbfffefa0, cards=0xbfffe710 "430") at
> parseTake.c:366
> ---------------------------------------------------------------------
> I'm not out of memory so I don't know why I'd be having a problem in
> malloc.
> 
> 
> Travis Loyd
> [email: lelandg@usa.net							]
> [other: s201635@mail.nwmissouri.edu					]
> [  pgp: send email with subject: sendmepgp				]
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> 

-------------------------------------------------------------------------------
Jason A. Pfeil, Computer Science Graduate Student      101 Carothers Hall
http://www.cs.fsu.edu/~pfeil			       C3527 University Center
pfeil@cs.fsu.edu				       (850)644-8014



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]