Forum: wxRuby Segmentation Fault

Posted by Michael Satterwhite (msatterwhite)
on 2010-08-23 16:50
Attachment: test.zip (3,71 KB)
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
Posted by Mario Steele (Guest)
on 2010-08-24 06:59
(Received via mailing list)
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 Satterwhite
Posted by Michael Satterwhite (msatterwhite)
on 2010-08-24 16:39
Mario Steele 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 Satterwhite

That probably works great under Windoze, but it's ignored under other 
platforms. I'm developing on PCLinuxOS.
Posted by Mario Steele (Guest)
on 2010-08-25 01:18
(Received via mailing list)
Hey Michael,

On Tue, Aug 24, 2010 at 10:39 AM, Michael Satterwhite
<lists@ruby-forum.com>wrote:

> > hth,
> >
> > Mario
> >
> > On Mon, Aug 23, 2010 at 10:50 AM, Michael Satterwhite
>
> 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.
Posted by Michael Satterwhite (msatterwhite)
on 2010-08-25 05:43
Mario Steele 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.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.