Marc R.J. Brevoort wrote: > Hello all, > > In my FLTK application, I'm getting a segfault.
[... output snipped ...] > So it appears that the segfault occurs in the line > > this->catalogbuffer->append(cat->c_str()); > > With all of these defined as they should, > I'm at a loss. The typical case of such bugs is that the real bug is much earlier and difficult to find. > Yesterday when I tried tracing with > gdb, the backtrace indicated a problem in XLoadQueryFont > (called through fl_font -> fl_xxfont if I recall > correctly) > > I tried updating my 1.1.7 FLTK to 1.1.9 and still get > the same segfault, however when I try to run the program > through gdb now, I'm getting a segfault at a much earlier > stage. Did you try FLTK 1.3 ? I don't know of a specific bug in XLoadQueryFont, but I remember that some uninitialized font-related variables (internal display handles or similar) have been fixed. Is there an STR WRT this XLoadQueryFont crash? > My questions are: > > 1. What can I do about the segfault in XLoadQueryFont? > Are there any known workarounds? See above. > 2. I'm currently compiling with -O0 (no optimizing at > all), but the code runs differently when running > in gdb instead of by itself, making it hard to see > what the code is actually doing. Is there anything I > can do about that? If you can, try running your program with valgrind (on Linux). Recently someone had a bug, and the valgrind output showed a hint that an object had been deleted before it should have been. Maybe you'll find something with valgrind as well. Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

