[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FR-devel] the segmentation fault(FXScintilla)
From: |
NISHIO Mizuho |
Subject: |
[FR-devel] the segmentation fault(FXScintilla) |
Date: |
Thu, 22 Aug 2002 00:44:54 +0900 |
User-agent: |
Wanderlust/2.8.1 (Something) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (UnebigoryĆmae) APEL/10.3 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI) |
This is the sample script which causes ruby to be aborted.
In my environment, when I load the large file and print
the scintilla's buffer, Segmentation fault occurs.
The scintilla_wrapper is in the FXRuby's example directory.
******************************
NISHIO Mizuho
e-mail address@hidden
----------------------------------------
#!/usr/bin/env ruby
require 'fox'
require 'scintilla_wrapper'
include Fox
class FXScintilla
include Scintilla
end
class ScintillaTest < FXMainWindow
def initialize(app)
super(app, "Scintilla Test", nil, nil, DECOR_ALL, 0, 0, 800, 600)
menubar = FXMenubar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
@scintilla = FXScintilla.new(self, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y)
# File menu
filemenu = FXMenuPane.new(self)
FXMenuCommand.new(filemenu, "&Open\tCtl-O\tOpen...").connect(SEL_COMMAND) {
openDialog = FXFileDialog.new(self, "Open Document")
openDialog.selectMode = SELECTFILE_EXISTING
openDialog.patternList = ["All Files (*.*)", "Ruby Files (*.rb)"]
if openDialog.execute != 0
loadFile(openDialog.filename)
end
print_buffer
}
FXMenuTitle.new(menubar, "&File", nil, filemenu)
end
def loadFile(filename)
begin
getApp().beginWaitCursor()
text = File.open(filename, "r").read
@scintilla.setText(text)
ensure
getApp().endWaitCursor()
end
end
def create
super
show(PLACEMENT_SCREEN)
end
def print_buffer
text = @scintilla.getText(@scintilla.getLength + 1)
print text
end
end
if __FILE__ == $0
application = FXApp.new("ScintillaTest", "FoxTest")
application.init(ARGV)
ScintillaTest.new(application)
application.create
application.run
end
- [FR-devel] the segmentation fault(FXScintilla),
NISHIO Mizuho <=