[R] Segmentation fault with expression on linux

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Mon Dec 18 13:48:46 CET 2000


[I'm taking the liberty of forwarding this back to r-help. Others may
be better at following up on this, and I don't see anything
particularly embarrassing to you.]

Thomas Petzoldt <petzoldt at Rcs1.urz.tu-dresden.de> writes:

> Hello Peter,
> 
> > I can't reproduce this with 1.2.0, nor 1.1.1 on RedHat6.2. Could you
> > please try running it with R -d gdb until the point of crash and show
> > us a backtrace?
> 
> thank you very much for your immediate reply. Unfortunalely I am not a C
> programmer. My skills are on a "applied low level", to write simulations
> and simple scripts in Turbo-Pascal, Java, ... and :) R or to do a make
> configure", make, make install. Maybe, that a misconfiguration of my
> system was not detected by the make procedure and this is the reason for
> the crash. Nevertheless I run gdb and found the following output:
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x4023220b in X11_MetricInfo (c=115, ascent=0xbfffd2c4,
> descent=0xbfffd2cc,
>     width=0xbfffd2d4, dd=0x89dfe08) at devX11.c:1299
> 1299            *ascent = xd->font->per_char[c-first].ascent;

Well, that's still quite useful. Something is wrong with the fonts you
have available. This does make sense considering the fact that the
sigma needs to be set in a smaller size in your third example.

It may help to install the "other" set of X11 fonts (75/100 dpi)
and/or make sure that font scaling is allowed. 

In any case, it would seem that there is also a bug in R, since this
condition should at worst cause an error saying that a font is
unavailable, not segfault.

> 
> backtrace then gives:
> =====================
> 
> (gdb) backtrace
> #0  0x4023220b in X11_MetricInfo (c=115, ascent=0xbfffd2c4,
>     descent=0xbfffd2cc, width=0xbfffd2d4, dd=0x89dfe08) at devX11.c:1299
> #1  0x8094b1c in Rf_GMetricInfo (c=115, ascent=0xbfffd2c4,
> descent=0xbfffd2cc,
>     width=0xbfffd2d4, units=INCHES, dd=0x89dfe08) at graphics.c:2627
> #2  0x80c6624 in GlyphBBox (chr=115) at plotmath.c:936
> #3  0x80c6751 in RenderSymbolChar (ascii=115, draw=0) at plotmath.c:982
> #4  0x80c6ba9 in RenderSymbol (expr=0x857f25c, draw=0) at
> plotmath.c:1091
> #5  0x80c6e3e in RenderAtom (expr=0x857f25c, draw=0) at plotmath.c:1166
> #6  0x80cc11e in RenderElement (expr=0x857f25c, draw=0) at
> plotmath.c:2800
> #7  0x80c8858 in RenderFraction (expr=0x8a00154, rule=1, draw=0)
>     at plotmath.c:1727
> #8  0x80c8b9e in RenderOver (expr=0x8a00154, draw=0) at plotmath.c:1772
> #9  0x80cbe34 in RenderFormula (expr=0x8a00154, draw=0) at
> plotmath.c:2750
> #10 0x80cc111 in RenderElement (expr=0x8a00154, draw=0) at
> plotmath.c:2798
> #11 0x80c75a5 in RenderBin (expr=0x8a0018c, draw=0) at plotmath.c:1341
> #12 0x80cbd32 in RenderFormula (expr=0x8a0018c, draw=0) at
> plotmath.c:2736
> #13 0x80cc111 in RenderElement (expr=0x8a0018c, draw=0) at
> plotmath.c:2798
> #14 0x80c79e4 in RenderSup (expr=0x8a001e0, draw=0) at plotmath.c:1438
> #15 0x80cbd55 in RenderFormula (expr=0x8a001e0, draw=0) at
> plotmath.c:2738
> #16 0x80cc111 in RenderElement (expr=0x8a001e0, draw=0) at
> plotmath.c:2798
> #17 0x80cb25c in RenderRel (expr=0x8a00234, draw=0) at plotmath.c:2476
> #18 0x80cbfae in RenderFormula (expr=0x8a00234, draw=0) at
> plotmath.c:2770
> #19 0x80cc111 in RenderElement (expr=0x8a00234, draw=0) at
> plotmath.c:2798
> ---Type <return> to continue, or q <return> to quit---
> #20 0x80cc353 in Rf_GMathText (x=3.6786417322834639,
> y=3.5863681102362204,
>     coords=13, expr=0x8a00234, xc=0.5, yc=NaN(0x80000000007a2), rot=0,
>     dd=0x89dfe08) at plotmath.c:2904
> #21 0x80ba85a in do_text (call=0x8836a84, op=0x81e8c74, args=0x81d8008,
>     env=0x89fe798) at plot.c:2008
> #22 0x80a567a in do_internal (call=0x88369f8, op=0x81dd19c,
> args=0x8836a14,
>     env=0x89fe798) at names.c:925
> #23 0x80862c7 in Rf_eval (e=0x88369f8, rho=0x89fe798) at eval.c:317
> #24 0x8087490 in do_begin (call=0x88356f4, op=0x81dd554, args=0x88356d8,
>     rho=0x89fe798) at eval.c:803
> #25 0x80862c7 in Rf_eval (e=0x88356f4, rho=0x89fe798) at eval.c:317
> #26 0x80868d8 in Rf_applyClosure (call=0x89feba4, op=0x88368fc,
>     arglist=0x89fdfe4, rho=0x89fdee8, suppliedenv=0x89febdc) at
> eval.c:501
> #27 0x80a5a31 in applyMethod (call=0x89feba4, op=0x88368fc,
> args=0x89fdfe4,
>     rho=0x89fdee8, newrho=0x89febdc) at objects.c:117
> #28 0x80a6058 in Rf_usemethod (generic=0xbfffe158 "text", obj=0x89fd168,
>     call=0x8834e60, args=0x81d8008, rho=0x89fdee8, ans=0xbfffe154)
>     at objects.c:271
> #29 0x80a624d in do_usemethod (call=0x8834e60, op=0x81ea994,
> args=0x8834e7c,
>     env=0x89fdee8) at objects.c:325
> #30 0x80862c7 in Rf_eval (e=0x8834e60, rho=0x89fdee8) at eval.c:317
> #31 0x80868d8 in Rf_applyClosure (call=0x89fe47c, op=0x8834d80,
>     arglist=0x89fdfe4, rho=0x81eb480, suppliedenv=0x81d8008) at
> eval.c:501
> ---Type <return> to continue, or q <return> to quit---
> #32 0x8086528 in Rf_eval (e=0x89fe47c, rho=0x81eb480) at eval.c:352
> #33 0x8088454 in do_eval (call=0x87b4440, op=0x81e7418, args=0x89fe0e0,
>     rho=0x89fe134) at eval.c:1281
> #34 0x80a567a in do_internal (call=0x87b43b4, op=0x81dd19c,
> args=0x87b43d0,
>     env=0x89fe134) at names.c:925
> #35 0x80862c7 in Rf_eval (e=0x87b43b4, rho=0x89fe134) at eval.c:317
> #36 0x80868d8 in Rf_applyClosure (call=0x87b6f30, op=0x89d9cec,
>     arglist=0x89fe1dc, rho=0x89d9dcc, suppliedenv=0x81d8008) at
> eval.c:501
> #37 0x8086528 in Rf_eval (e=0x87b6f30, rho=0x89d9dcc) at eval.c:352
> #38 0x8087b56 in do_set (call=0x87b6edc, op=0x81dd5fc, args=0x87b6ef8,
>     rho=0x89d9dcc) at eval.c:1008
> #39 0x80862c7 in Rf_eval (e=0x87b6edc, rho=0x89d9dcc) at eval.c:317
> #40 0x8087490 in do_begin (call=0x87b616c, op=0x81dd554, args=0x87b6150,
>     rho=0x89d9dcc) at eval.c:803
> #41 0x80862c7 in Rf_eval (e=0x87b616c, rho=0x89d9dcc) at eval.c:317
> #42 0x8087001 in do_for (call=0x87b8ccc, op=0x81d7a04, args=0x87b8ce8,
>     rho=0x89d9dcc) at eval.c:678
> #43 0x80862c7 in Rf_eval (e=0x87b8ccc, rho=0x89d9dcc) at eval.c:317
> #44 0x8087490 in do_begin (call=0x87b42d4, op=0x81dd554, args=0x87b42b8,
>     rho=0x89d9dcc) at eval.c:803
> #45 0x80862c7 in Rf_eval (e=0x87b42d4, rho=0x89d9dcc) at eval.c:317
> #46 0x80868d8 in Rf_applyClosure (call=0x89d6538, op=0x87b9abc,
>     arglist=0x89d9ec8, rho=0x81eb480, suppliedenv=0x81d8008) at
> eval.c:501
> #47 0x8086528 in Rf_eval (e=0x89d6538, rho=0x81eb480) at eval.c:352
> #48 0x809b1a1 in R_ReplConsole (rho=0x81eb480, savestack=0,
> browselevel=0)
>     at main.c:187
> #49 0x809b8f2 in run_Rmainloop () at main.c:485
> #50 0x809b930 in Rf_mainloop () at main.c:499
> #51 0x80ec82b in main (ac=1, av=0xbffff684) at system.c:88
> (gdb)                                                              
> 
> -------------------
> 
> Is there anything else, what I can do in order to isolate the problem?

One can do various things to catch the failed attempt at font loading,
but let's first hear if anyone can spot the problem offhand.

> Thank you!
> 
> Thomas Petzoldt
> 

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list