DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L1806 Version: 2.0-current In both r5940 and r5941 the file src/win32/list_fonts.cxx a function call is made to EnumFontFamiliesExW with a NULL argument where there should be a pointer. Under "wine" under Linux, this NULL pointer gets dereferenced and causes an illegal memory reference error. Under MS Windows XP the cross-complied .exe files work all right. Either MS Windows XP checks for the null pointer and fixes the call, or the path using this call is not exercised. The patch below fixes this, but then another memory reference error occurs in another place in the code -- this time in the threading part. I have not found a fix for the next level of error, except to not run under wine :(. > diff -c list_fonts.cxx~ list_fonts.cxx *** list_fonts.cxx~ 2006-12-12 18:55:45.000000000 -0600 --- list_fonts.cxx 2007-10-10 10:27:18.000000000 -0500 *************** *** 172,178 **** HDC dc = getDC(); if (has_unicode()) { ! EnumFontFamiliesExW(dc, NULL, (FONTENUMPROCW)enumcbW, 0, 0); } else { LOGFONT lf; memset(&lf, 0, sizeof(lf)); --- 172,184 ---- HDC dc = getDC(); if (has_unicode()) { ! /* EnumFontFamiliesExW(dc, NULL, (FONTENUMPROCW)enumcbW, 0, 0);*/ ! /*khc - 10oct07: NULL above causes zero pointer dereference in ! windows routines. So replace statement above with those below.*/ ! tagLOGFONTW lf; ! memset(&lf, 0, sizeof(lf)); ! lf.lfCharSet = DEFAULT_CHARSET; ! EnumFontFamiliesExW(dc, &lf, (FONTENUMPROCW)enumcbW, 0, 0); } else { LOGFONT lf; memset(&lf, 0, sizeof(lf)); Link: http://www.fltk.org/str.php?L1806 Version: 2.0-current _______________________________________________ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs