Segmentation fault when using FXRuby on 1.8.0

I am trying to run a simple FXRuby sample program from
a tutorial by Lyle Johnson. I am getting the following
error:

fxr.rb:12: [BUG] Segmentation fault
ruby 1.8.0 [2003-05-26] [i386-mswin32]

abnormal program termination

Here is a cut/paste from the tutorial:

require ‘fox’

include Fox

theApp = FXApp.new

theMainWindow = FXMainWindow.new(theApp, “Hello”)

theButton = FXButton.new(theMainWindow, “Hello,
World!”)
theButton.tipText = “Push Me!”
iconFile = File.open(“pbr.jpg”, “rb”)
theButton.icon = FXJPGIcon.new(theApp, iconFile.read)
iconFile.close
theButton.connect(SEL_COMMAND) { exit }

FXTooltip.new(theApp)

theApp.create

theMainWindow.show

theApp.run

Any help will be appreciated.

Thank you

···

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

8-<
That code works fine for me, my versions:
Ruby: 1.8.0 (2003-08-10) [i386-linux]
Fox-Toolkit: 1.0.42
FXRuby: 1.0.25

Fox and FXRuby were compiled by myself. As I see from your ruby version
compilation date, you should update it to a more recent release, like 1.8.0

···

On Wednesday 03 September 2003 11:01, Ruby Ruby wrote:

I am trying to run a simple FXRuby sample program from
a tutorial by Lyle Johnson. I am getting the following
error:

fxr.rb:12: [BUG] Segmentation fault
ruby 1.8.0 [2003-05-26] [i386-mswin32]

abnormal program termination

sdmitry -=- Dmitry V. Sabanin
MuraveyLabs.

Ruby Ruby wrote:

I am trying to run a simple FXRuby sample program from
a tutorial by Lyle Johnson. I am getting the following
error:

This looks fine to me. Which version of FXRuby are you using? Do the
regular FXRuby example programs (e.g. the “hello2.rb” example) work for
you? Are you pretty sure that the image file (“pbr.jpg”) is a valid JPEG
image?

Dmitry,
I installed the new build of ruby and still have the
same problem.

ruby -v shows:

Ruby: 1.8.0 (2003-08-12) [i386-linux]

···

— “Dmitry V. Sabanin” sdmitry@lrn.ru wrote:

On Wednesday 03 September 2003 11:01, Ruby Ruby > wrote:

I am trying to run a simple FXRuby sample program
from
a tutorial by Lyle Johnson. I am getting the
following
error:

fxr.rb:12: [BUG] Segmentation fault
ruby 1.8.0 [2003-05-26] [i386-mswin32]

abnormal program termination
8-<
That code works fine for me, my versions:
Ruby: 1.8.0 (2003-08-10) [i386-linux]
Fox-Toolkit: 1.0.42
FXRuby: 1.0.25

Fox and FXRuby were compiled by myself. As I see
from your ruby version
compilation date, you should update it to a more
recent release, like 1.8.0

sdmitry -=- Dmitry V. Sabanin
MuraveyLabs.


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

I am using version 1.8.0 built 2003-08-12.

···

— Lyle Johnson lyle@users.sourceforge.net wrote:

Ruby Ruby wrote:

I am trying to run a simple FXRuby sample program
from
a tutorial by Lyle Johnson. I am getting the
following
error:

This looks fine to me. Which version of FXRuby are
you using? Do the
regular FXRuby example programs (e.g. the
“hello2.rb” example) work for
you? Are you pretty sure that the image file
(“pbr.jpg”) is a valid JPEG
image?


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Sorry, I forgot to tell you that the image appears to
be valid. I can see it with ACDsee, Netscape and
Microsoft Photo Editor.

I can’t see it with Adobe Photoshop.

Thank you

···

— Lyle Johnson lyle@users.sourceforge.net wrote:

Ruby Ruby wrote:

I am trying to run a simple FXRuby sample program
from
a tutorial by Lyle Johnson. I am getting the
following
error:

This looks fine to me. Which version of FXRuby are
you using? Do the
regular FXRuby example programs (e.g. the
“hello2.rb” example) work for
you? Are you pretty sure that the image file
(“pbr.jpg”) is a valid JPEG
image?


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Ruby Ruby wrote:

Sorry, I forgot to tell you that the image appears to
be valid. I can see it with ACDsee, Netscape and
Microsoft Photo Editor.

I can’t see it with Adobe Photoshop.

Hmmm. If possible, please e-mail me a copy of the image.

Ruby Ruby wrote:

I am using version 1.8.0 built 2003-08-12.

Thanks, but that’s not what I asked :wink: I would also like to know:

  1. Which version of FXRuby are you using?
  2. Did you compile it (FXRuby) yourself, from the source code,
    or did you download the regular FXRuby installer from the
    FXRuby SourceForge site?
  3. Do the regular FXRuby example programs,
    especially those that display icons or images,
    work properly on your machine?

– Lyle