tuupola / fontx_tools

3 stars 2 forks source link

Core dump stops conversion from BDF to FONTX #2

Open CHiPs44 opened 1 year ago

CHiPs44 commented 1 year ago

Hello,

I'm trying to convert Viznut 2.1 fonts from PCF => BDF => FONTX, but the same error happens with X11 fonts that didn't change for ages.

I use an Ubuntu 22.04 LTS amd64 machine, and pcf2bdf was just updated from master + make + make install.

It seems malloc isn't happy:

pcf2bdf < src/unscii-8.pcf > src/unscii-8.bdf;
mkdir -p fontx
bdf2fontx < src/unscii-8.bdf > fontx/unscii-8.fnt;
Unscii: 16 x 8, type: 1, sjis 0
0 (0x0)
bdf2fontx: malloc.c:2617: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
/bin/bash : ligne 1 : 135856 Abandon                 (core dumped) bdf2fontx < src/unscii-8.bdf > fontx/unscii-8.fnt
make: *** [Makefile:30 : fontx] Erreur 134
$ gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

What can I do to help debugging this?

tuupola commented 1 year ago

I vaguely remember starting to fix a similar problem. I found and old branch from my laptop and pushed it here:

https://github.com/tuupola/fontx_tools/compare/master...fix-fonts

You could try compiling that branch to see if it fixes your problem. I think this branch was used to fix the generated fonts off by one error which I mention here:

https://github.com/tuupola/embedded-fonts/issues/2#issuecomment-963606704

I really need to step up and properly fix these tools. Currently they are just quick hack using code from other people code. However since I recently started freelancing paid work currently comes first :(

PS: Great work with CHiPs44/hagl_pico_vgaboard!

CHiPs44 commented 1 year ago

Hopefully I'll find time to test during this week-end!