Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Crash after setItemJustify with custom FXTable createItem

#31

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

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

State: new
Milestone: none
Assigned to: lyle (at lylejohnson) lyle (at lylejohnson)

Activity

  1. lyle (at lylejohnson)
    lyle (at lylejohnson)

    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.

    November 11th, 2009 @ 10:40 PM

  2. lyle (at lylejohnson)
    lyle (at lylejohnson)

    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?

    November 11th, 2009 @ 10:41 PM

  3. Lars Kanis
    Lars Kanis
    • Milestone order changed from 0 to 0

    This is solved in 1.6.22.

    February 16th, 2012 @ 07:45 PM

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.