Latest fontconfig Crashes mplayer/smplayer

The latest x11-fonts/fontconfig (2.9.0) in the ports tree causes mplayer and other ports that use the library to crash from a failed assertion.

There are three asserts in:

/usr/ports/x11-fonts/fontconfig/work/fontconfig-2.9.0/src/fcmatch.c

Code:
assert (result != NULL);

on lines 523, 548, 688, and 850 that can be safely commented out.

After rebuilding fontconfig with those changes, movies played without problem.
 
Off topic: In my opinion production code should never contain asserts, the user of the code should trust that the call returns eventually and does not abort the running program under normal operating conditions, whatever errors are encountered should be handled with status codes or thrown exceptions.
 
Back
Top