Segmentation Fault

Once more, with feeling.

I’m trying to implement using xrc_replace so as to use a RichTextCtrl in
a form created by FormBuilder. The problem is that I can’t even create a
RichTextCtrl. When I try to, I get a segmentation fault.

I’ve attached the files that are causing this. I’m running wxRuby on a
box running an up-to-date PCLinuxOS distro. I’ve stripped what I’ve
written down to the bare essentials, the fault occurs on the
Wx::RichTextCtrl.new(self) line in mwsnotes.rb.

The exact message I’m seeing is /usr/lib/ruby/site_ruby/1.8/wx

/keyword_ctors.rb:168: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [i586-linux]

Thanks in advance.
—Michael

Hey Michael,

Try creating the RichText Control, with
Wx::TextCtrl.new(self,:style=>Wx::TE_MULTILINE|Wx::TE_RICH). I’ve never
had
the ability to use the Wx::RichTextCtrl class directly, but using the
above
method, works perfectly fine, and has never failed on me.

hth,

Mario

On Mon, Aug 23, 2010 at 10:50 AM, Michael S.

Mario S. wrote:

Hey Michael,

Try creating the RichText Control, with
Wx::TextCtrl.new(self,:style=>Wx::TE_MULTILINE|Wx::TE_RICH). I’ve never
had
the ability to use the Wx::RichTextCtrl class directly, but using the
above
method, works perfectly fine, and has never failed on me.

hth,

Mario

On Mon, Aug 23, 2010 at 10:50 AM, Michael S.

That probably works great under Windoze, but it’s ignored under other
platforms. I’m developing on PCLinuxOS.

Hey Michael,

On Tue, Aug 24, 2010 at 10:39 AM, Michael S.
[email protected]wrote:

hth,

Mario

On Mon, Aug 23, 2010 at 10:50 AM, Michael S.

That probably works great under Windoze, but it’s ignored under other
platforms. I’m developing on PCLinuxOS.

I develop for Ubuntu / Mac OS X, and have always used that incarnation
to
create a RichText Control, and has always come out to be a RichText
Control.
It is universal, and works on all 3 platforms, so I don’t see why it
wouldn’t work.

Mario S. wrote:

I develop for Ubuntu / Mac OS X, and have always used that incarnation
to
create a RichText Control, and has always come out to be a RichText
Control.
It is universal, and works on all 3 platforms, so I don’t see why it
wouldn’t work.

My fault, and it is a perfect example of Satterwhite’s Observation on
Life #2: “In any situation in which theory conflicts with reality,
reality wins hands down.”

I was basing my reply on the documentation of style TE_RICH: “Use rich
text control under Win32, this allows to have more than 64KB of text in
the control even under Win9x. This style is ignored under other
platforms.” That was the theory. You’re telling me what the reality is
based on experience - that it works well under the other platforms. I
should have known better.

Thanks much. I’ll try this.