[R] segfault from systemfonts::system_fonts

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Tue Nov 3 22:00:16 CET 2020


On 03/11/2020 3:43 p.m., Dennis Fisher wrote:
> R 4.0.3
> OS X 10.15.7
> 
> Colleagues
> 
> When I run flextable, it generates a segfault.  I traced the problem to systemfonts::system_fonts()
> 
>>> require("systemfonts")
>> Loading required package: systemfonts
>>>   system_fonts()
>>
>>   *** caught segfault ***
>> address 0x0, cause 'memory not mapped'
>>
>> Traceback:
>>   1: system_fonts_c()
>>   2: system_fonts()
>>
>> Possible actions:
>> 1: abort (with core dump, if enabled)
>> 2: normal R exit
>> 3: exit R without saving workspace
>> 4: exit R saving workspace
>>
> I updated my OS and R, deleted and reinstalled the systemfonts package -- problem persists.
> 
> I also opened Apple's font application and "validated" all font files (I have never installed any special fonts nor is there anything non-standard (e.g., Homebrew) on my system.
> 
> Of note, I can run other functions in systemfonts without problems -- only system_fonts triggers the segfault.
> 
> Another similar setup on OS X does not trigger the same problem, so the problem is more likely something in my system rather than a problem in R.
> 
> Does anyone have any ideas on how one might address this?
> 

For what it's worth, I have the same R version and macOS version, and it 
works fine.  Debugging it will be hard:  all the work happens in a 
function called using

     .Call("_systemfonts_system_fonts_c")

If I could reproduce the bug and wanted to track it down, I think I'd do 
it by adding a bunch of Rprintf() commands into the source of 
_systemfonts_system_fonts_c and rebuilding the package.  It would be 
really tedious; I'm glad I'm not doing this!

Duncan Murdoch



More information about the R-help mailing list