#31 new
lyle (at lylejohnson)

Crash after setItemJustify with custom FXTable createItem

Reported by lyle (at lylejohnson) | November 11th, 2009 @ 10:40 PM

The following code crashes on exit on XP and Vista with Ruby 1.8.6 and FXRuby 1.6.16. The crash remains if setItemJustify is replaced with setItemBorders, but not if it is replaced with setItemText or setItemData. All four of these functions call createItem.

require 'fox16'; include Fox

class CustomTable < FXTable
  def createItem *args
    puts 'createItem was called'
    FXTableItem.new *args
  end
end

app = FXApp.new
main = FXMainWindow.new app, 'Test'
table = CustomTable.new main
table.setTableSize 1, 1
table.visibleRows = table.visibleColumns = 1

app.addChore {
  table.setItemJustify 0, 0, FXTableItem::LEFT|FXTableItem::CENTER_Y
  exit
}

app.create
main.show PLACEMENT_SCREEN
app.run

Comments and changes to this ticket

  • lyle (at lylejohnson)

    lyle (at lylejohnson) November 11th, 2009 @ 10:40 PM

    I've tested it with the latest (post-1.6.16) FXRuby code and while it still crashes if you exit immediately after creating the table item, it doesn't crash if you just exit the app normally (i.e. by clicking the close button). Will back up and test it with 1.6.16 to confirm that I can reproduce it there.

  • lyle (at lylejohnson)

    lyle (at lylejohnson) November 11th, 2009 @ 10:41 PM

    Tim, I can't reproduce this bug on Windows XP, using Ruby 1.8.6 (2007-09-24 patchlevel 111) and FXRuby 1.6.16, if I remove the call to exit at the end of the chore block. That is, instead of forcing the application to immediately exit after adding the new item, I just close the application a few seconds later by clicking the close button.

    In an ideal world, the app wouldn't crash in either situation, but right now this feels like a low priority bug. Can you provide some more information about why it is that you'd want to immediately exit the application as shown in this test program?

  • Lars Kanis

    Lars Kanis February 16th, 2012 @ 07:45 PM

    • Milestone order changed from “0” to “0”

    This is solved in 1.6.22.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

FXRuby is a library for developing powerful and sophisticated cross-platform graphical user interfaces (GUIs) for your Ruby applications. It’s based on the FOX Toolkit, a popular open source C++ library developed by Jeroen van der Zijp. What that means for you as an application developer is that you’re able to write code in the Ruby programming language that you already know and love, while at the same time taking advantage of the performance and functionality of a featureful, highly optimized C++ toolkit.

Shared Ticket Bins

People watching this ticket

Tags

Pages