Shai Ayal schrieb:
On Sat, Jun 27, 2009 at 4:09 PM, Thomas Treichl<address@hidden
> wrote:
Can somebody please give a short Octave code example how I can
check if text
rendering works or not after the inclusion of fontconfig into my
binary (how
does it look like - I'm no plotting expert).
Thanks,
Thomas
backend("fltk")
plot(1:10)
and see if the axis labels appear. you can than try "title",
"xlabel", etc ...
Shai
Your example works and the axis labels appear on my Mac OS X 10.4
system. But this only works once, if I call "plot", "xlabel" or
"title" as a second command then Octave crashes. Here is what I
mean by example:
octave-3.2.0:1> backend ("fltk")
octave-3.2.0:2> plot (1:10) # does work very well
octave-3.2.0:3> plot (1:10)
octave-3.2.0:4> error: could not match any font: *-normal-normal-12
error: unable to load font:
error: ft_render: unable to load appropriate font
panic: Segmentation fault -- stopping myself...
attempting to save variables to `octave-core'...
save to `octave-core' complete
In debug mode I can reproduce the following output:
octave:1> backend ("fltk")
Reading symbols for shared libraries .... done
octave:2> plot (1:10) # does work very well
octave:3> Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries ... done
Reading symbols for shared libraries . done
Reading symbols for shared libraries .. done
Reading symbols for shared libraries . done
Reading symbols for shared libraries ....... done
Reading symbols for shared libraries ... done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
octave:3> plot (1:10)
octave:4> error: could not match any font: *-normal-normal-12
error: unable to load font:
error: ft_render: unable to load appropriate font
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xfffffffd
0x90b40517 in __gnu_cxx::__exchange_and_add ()
(gdb) where
#0 0x90b40517 in __gnu_cxx::__exchange_and_add ()
#1 0x011be99c in input_event_hook () at basic_string.h:226
#2 0x02ba39a6 in command_editor::event_handler () at cmd-edit.cc:877
#3 0x00779524 in rl_read_key ()
#4 0x007610e1 in readline_internal_char ()
#5 0x007612d5 in readline ()
#6 0x02ba6ca4 in gnu_readline::do_readline (this=0x364fa50,
address@hidden, address@hidden) at cmd-edit.cc:255
#7 0x02ba50e1 in command_editor::readline (address@hidden,
address@hidden) at cmd-edit.cc:902
#8 0x011b9a33 in gnu_readline (address@hidden,
force_readline=false) at input.cc:202
#9 0x011b9fbe in octave_gets () at input.cc:248
#10 0x011ba82a in octave_read (buf=0xf5000 "", max_size=8192) at
input.cc:347
#11 0x011c1d4d in yy_get_next_buffer () at <stdout>:2879
#12 0x011cdba3 in octave_lex () at <stdout>:2721
#13 0x012aad4c in octave_parse () at parse.cc:2234
#14 0x012fc07b in main_loop () at toplev.cc:566
#15 0x012983df in octave_main (argc=6, argv=0xbfffda20, embedded=0)
at octave.cc:886
#16 0x00006630 in main (argc=-1, argv=0xffffffff) at main.c:35
#17 0x00005f92 in _start ()
#18 0x00005eb9 in start ()
(gdb)
Any ideas? Thanks,
Thomas
PS. Ben can you see this with Fink, too, or is it just my binary?