[bug] TreeView implementation can cause debugger to appear.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[bug] TreeView implementation can cause debugger to appear.

Michael van der Gulik-2
This is a bug report for the devs.

VisualWorks 7.10.1, on 64-bit Linux.

Make a TreeView somehow. Give it focus but ensure that no selection is made. Press cursor-up. You get the stack trace below. I'm pretty sure it's not my code at fault, but that possibility remains.

To recreate, you need to give keyboard focus to the tree but have no selection. I did the following (bound to a menu entry with a keyboard shortcut):

actionFocusOnStatements
    | statements |
    statements := self widgetAt: #moduleContentsTree.
    self mainWindow keyboardProcessor requestActivationFor: (statements controller).
    statements flash.

I think some of my code elsewhere changed the selection to be nil; if you want I can hunt around for it. To the credit of VW's dev team, bugs are pretty hard to find, and I'm enjoying using the environment.

The rest of this email is the stack trace.

Thanks,
Michael.


Unhandled exception: Subscript out of bounds:
TreeModel(Object)>>subscriptBoundsError:
TreeModel(List)>>at:
TreeModel>>at:
SelectionInTree(SelectionInList)>>selection
Faish.FaishModuleUI>>selectedStatementChanged
MessageSend>>value
MessageSend>>evaluate
TreeView(Object)>>triggerEvent:
TreeController(SequenceController)>>valueChange
TreeController>>selectThePrev
TreeController>>processKeyboardEvent:
TreeController(Controller)>>keyPressedEvent:
KeyPressedEvent>>dispatchTo:
TreeController(ControllerWithMenu)>>handleEvent:
[] in KeyboardProcessor>>processKeyboardEvent:
BlockClosure>>cull:
TreeController(Object)>>ifNotNil:
KeyboardProcessor>>processKeyboardEvent:
KeyboardProcessor>>processKeyboardEvent:for:
EventDispatcher>>dispatchEvent:
KeyPressedEvent(Event)>>dispatch
KeyPressedEvent(Event)>>dispatchForWindowManager:
optimized [] in WindowManager>>safelyDispatchForWindowManager:
BlockClosure>>on:do:
WindowManager>>safelyDispatchForWindowManager:
WindowManager>>processNextEvent
optimized [] in [] in WindowManager>>newProcess
BlockClosure>>on:do:
optimized [] in WindowManager>>newProcess
BlockClosure>>on:do:
optimized [] in Process class>>forBlock:priority:

----------------------------------------------------------------------
TreeModel(Object)>>subscriptBoundsError:
Receiver:
    a TreeModel
Instance Variables:
    dependents = a TreeView
    collection = an Array[20]
    limit = 10
    collectionSize = 20
    root = a Faish.FaishModuleUI
    childrenBlock = BlockClosure [] in TreeModel>>initialize
    hasChildrenBlock = nil
    mayHaveNilValue = false
Arguments:
    index = 19
Context PC = 8

----------------------------------------------------------------------
TreeModel(List)>>at:
Receiver:
    a TreeModel
Instance Variables:
    dependents = a TreeView
    collection = an Array[20]
    limit = 10
    collectionSize = 20
    root = a Faish.FaishModuleUI
    childrenBlock = BlockClosure [] in TreeModel>>initialize
    hasChildrenBlock = nil
    mayHaveNilValue = false
Arguments:
    anIndex = 19
Context PC = 9

----------------------------------------------------------------------
TreeModel>>at:
Receiver:
    a TreeModel
Instance Variables:
    dependents = a TreeView
    collection = an Array[20]
    limit = 10
    collectionSize = 20
    root = a Faish.FaishModuleUI
    childrenBlock = BlockClosure [] in TreeModel>>initialize
    hasChildrenBlock = nil
    mayHaveNilValue = false
Arguments:
    anIndex = 19
Context PC = 6

----------------------------------------------------------------------
SelectionInTree(SelectionInList)>>selection
Receiver:
    a SelectionInTree
Instance Variables:
    dependents = nil
    listHolder = a ValueHolder on: TreeModel on: a Faish.FaishModuleUI (opened: 10)
    selectionIndexHolder = a ValueHolder on: 19
Temporaries:
    si = 19
Context PC = 13

----------------------------------------------------------------------
Faish.FaishModuleUI>>selectedStatementChanged
Receiver:
    a Faish.FaishModuleUI
Instance Variables:
    dependents = a ScheduledWindow 39922859
    builder = an UIBuilder
    uiSession = a ControlManager
    eventHandlers = nil
    selectionInModuleContentsTree = a SelectionInTree
    module = HelloWorld
    editedStatementHolder = a ValueHolder on: Text for 'b:[" [ ] ].'
    editedStatementOrig = Text for 'b:[" [ ] ].'
    queryTree = a SelectionInTree
    queryResults = a Faish.QueryTreeRoot
    ignoreCallbacks = false
    filterField = a ValueHolder on: '*'
    newStatementIndex = nil
    selectionType = #statement
Temporaries:
    statement = nil
    source = nil
    position = nil
    wrapper = nil
Context PC = 10

----------------------------------------------------------------------
MessageSend>>value
Receiver:
    a MessageSend
Instance Variables:
    selector = #selectedStatementChanged
    args = an Array[0]
    receiver = a Faish.FaishModuleUI
Context PC = 5

----------------------------------------------------------------------
MessageSend>>evaluate
Receiver:
    a MessageSend
Instance Variables:
    selector = #selectedStatementChanged
    args = an Array[0]
    receiver = a Faish.FaishModuleUI
Context PC = 4

----------------------------------------------------------------------
TreeView(Object)>>triggerEvent:
Receiver:
    a TreeView
Instance Variables:
    container = a ScrollWrapper on: a TreeView
    eventHandlers = an IdentityDictionary[1]
    properties = a Dictionary[3]
    model = a ValueHolder on: TreeModel on: a Faish.FaishModuleUI (opened: 10)
    controller = a TreeController
    state = a WidgetState
    scrollOffset = a ScrollValueHolder
    sequence = a TreeModel[10]
    selectionChannel = a ValueHolder on: 19
    selectionIndex = 19
    targetIndex = 19
    grid = BlockClosure [] in SequenceView>>initializeGrid
    textStyle = nil
    displayStringSelector = nil
    visualBlock = BlockClosure [] in TreeView>>useImage:selectedImage:
    selectedVisualBlock = BlockClosure [] in TreeView>>useImage:selectedImage:
    measureWidth = true
    cachedWidth = 355
    mouseOverIndex = 0
    useChildImages = true
    useLines = true
    rootExpander = true
    displayingObject = nil
    fullLineSelect = true
Arguments:
    anEventNameSymbol = #selectionChanged
Context PC = 5

----------------------------------------------------------------------
TreeController(SequenceController)>>valueChange
Receiver:
    a TreeController
Instance Variables:
    model = a ValueHolder on: TreeModel on: a Faish.FaishModuleUI (opened: 10)
    view = a TreeView
    menuHolder = a Menu
    performer = a Faish.FaishModuleUI
    outside = false
    searchString = nil
    keyboardHook = nil
    doStringSearching = true
    dispatcher = nil
    dragDropCallbacks = nil
    selectOnDownWithDrag = false
    autoSelect = true
    useModifierKeys = true
    inPlaceEditor = nil
    composite = a CompositePart
Context PC = 9

----------------------------------------------------------------------
TreeController>>selectThePrev
Receiver:
    a TreeController
Instance Variables:
    model = a ValueHolder on: TreeModel on: a Faish.FaishModuleUI (opened: 10)
    view = a TreeView
    menuHolder = a Menu
    performer = a Faish.FaishModuleUI
    outside = false
    searchString = nil
    keyboardHook = nil
    doStringSearching = true
    dispatcher = nil
    dragDropCallbacks = nil
    selectOnDownWithDrag = false
    autoSelect = true
    useModifierKeys = true
    inPlaceEditor = nil
    composite = a CompositePart
Temporaries:
    indx = 20
    newTarget = 19
Context PC = 45

----------------------------------------------------------------------
TreeController>>processKeyboardEvent:
Receiver:
    a TreeController
Instance Variables:
    model = a ValueHolder on: TreeModel on: a Faish.FaishModuleUI (opened: 10)
    view = a TreeView
    menuHolder = a Menu
    performer = a Faish.FaishModuleUI
    outside = false
    searchString = nil
    keyboardHook = nil
    doStringSearching = true
    dispatcher = nil
    dragDropCallbacks = nil
    selectOnDownWithDrag = false
    autoSelect = true
    useModifierKeys = true
    inPlaceEditor = nil
    composite = a CompositePart
Arguments:
    aKeyboardEvent = a KeyPressedEvent
Temporaries:
    event = a KeyPressedEvent
    keyValue = #Up
Context PC = 79

----------------------------------------------------------------------
TreeController(Controller)>>keyPressedEvent:
Receiver:
    a TreeController
Instance Variables:
    model = a ValueHolder on: TreeModel on: a Faish.FaishModuleUI (opened: 10)
    view = a TreeView
    menuHolder = a Menu
    performer = a Faish.FaishModuleUI
    outside = false
    searchString = nil
    keyboardHook = nil
    doStringSearching = true
    dispatcher = nil
    dragDropCallbacks = nil
    selectOnDownWithDrag = false
    autoSelect = true
    useModifierKeys = true
    inPlaceEditor = nil
    composite = a CompositePart
Arguments:
    event = a KeyPressedEvent
Context PC = 5

----------------------------------------------------------------------
KeyPressedEvent>>dispatchTo:
Receiver:
    a KeyPressedEvent
Instance Variables:
    time = nil
    initiator = an EventDispatcher
    window = a ScheduledWindow 39922859
    wasHandled = false
    state = nil
    keyCharacter = #Up
    metaState = 0
    alternativeKeyCharacter = nil
Arguments:
    anObject = a TreeController
Context PC = 4

----------------------------------------------------------------------
TreeController(ControllerWithMenu)>>handleEvent:
Receiver:
    a TreeController
Instance Variables:
    model = a ValueHolder on: TreeModel on: a Faish.FaishModuleUI (opened: 10)
    view = a TreeView
    menuHolder = a Menu
    performer = a Faish.FaishModuleUI
    outside = false
    searchString = nil
    keyboardHook = nil
    doStringSearching = true
    dispatcher = nil
    dragDropCallbacks = nil
    selectOnDownWithDrag = false
    autoSelect = true
    useModifierKeys = true
    inPlaceEditor = nil
    composite = a CompositePart
Arguments:
    anEvent = a KeyPressedEvent
Context PC = 38

----------------------------------------------------------------------
[] in KeyboardProcessor>>processKeyboardEvent:
Receiver:
    a KeyboardProcessor
Instance Variables:
    keyboardHook = nil
    focusIsShifting = false
    acceptOnControlChange = false
    menuBar = a Win98MenuBar
    parentVisual = a ScheduledWindow 39922859
    focusedView = a TreeView
Arguments:
    handler = a TreeController
Temporaries:
    .commandEvent = a CommandEvent Set (#movePreviousByLine)
    .self = a KeyboardProcessor
    .aKeyboardEvent = a KeyPressedEvent
Context PC = 14

----------------------------------------------------------------------
BlockClosure>>cull:
Receiver:
    a BlockClosure
Instance Variables:
    method = CompiledBlock [] in KeyboardProcessor>>processKeyboardEvent:
    outerContext = KeyboardProcessor>>processKeyboardEvent:
    copiedValues = an Array[3]
Arguments:
    anObject = a TreeController
Context PC = 15

----------------------------------------------------------------------
TreeController(Object)>>ifNotNil:
Receiver:
    a TreeController
Instance Variables:
    model = a ValueHolder on: TreeModel on: a Faish.FaishModuleUI (opened: 10)
    view = a TreeView
    menuHolder = a Menu
    performer = a Faish.FaishModuleUI
    outside = false
    searchString = nil
    keyboardHook = nil
    doStringSearching = true
    dispatcher = nil
    dragDropCallbacks = nil
    selectOnDownWithDrag = false
    autoSelect = true
    useModifierKeys = true
    inPlaceEditor = nil
    composite = a CompositePart
Arguments:
    aBlock = BlockClosure [] in KeyboardProcessor>>processKeyboardEvent:
Context PC = 4

----------------------------------------------------------------------
KeyboardProcessor>>processKeyboardEvent:
Receiver:
    a KeyboardProcessor
Instance Variables:
    keyboardHook = nil
    focusIsShifting = false
    acceptOnControlChange = false
    menuBar = a Win98MenuBar
    parentVisual = a ScheduledWindow 39922859
    focusedView = a TreeView
Arguments:
    aKeyboardEvent = a KeyPressedEvent
Temporaries:
    commandEvent = a CommandEvent Set (#movePreviousByLine)
Context PC = 36

----------------------------------------------------------------------
KeyboardProcessor>>processKeyboardEvent:for:
Receiver:
    a KeyboardProcessor
Instance Variables:
    keyboardHook = nil
    focusIsShifting = false
    acceptOnControlChange = false
    menuBar = a Win98MenuBar
    parentVisual = a ScheduledWindow 39922859
    focusedView = a TreeView
Arguments:
    keyboardEvent = a KeyPressedEvent
    aController = an ApplicationStandardSystemController
Temporaries:
    ev = a KeyPressedEvent
Context PC = 26

----------------------------------------------------------------------
EventDispatcher>>dispatchEvent:
Receiver:
    an EventDispatcher
Instance Variables:
    windowController = an ApplicationStandardSystemController
    currentMouseConsumer = nil
    grabbingMouse = false
    lastControlObject = nil
    trapList = nil
    state = nil
    repairDamageWhenDebugging = true
    flushQueueAfterError = true
    distributeEventsWhenDebugging = true
    dragDropInProgress = false
    dragDropTracker = nil
    dispatchUnknownEvents = false
Arguments:
    event = a KeyPressedEvent
Temporaries:
    objectWantingControl = nil
    targetKeyboardProcessor = a KeyboardProcessor
Context PC = 103

----------------------------------------------------------------------
KeyPressedEvent(Event)>>dispatch
Receiver:
    a KeyPressedEvent
Instance Variables:
    time = nil
    initiator = an EventDispatcher
    window = a ScheduledWindow 39922859
    wasHandled = false
    state = nil
    keyCharacter = #Up
    metaState = 0
    alternativeKeyCharacter = nil
Context PC = 16

----------------------------------------------------------------------
KeyPressedEvent(Event)>>dispatchForWindowManager:
Receiver:
    a KeyPressedEvent
Instance Variables:
    time = nil
    initiator = an EventDispatcher
    window = a ScheduledWindow 39922859
    wasHandled = false
    state = nil
    keyCharacter = #Up
    metaState = 0
    alternativeKeyCharacter = nil
Arguments:
    aWinMgr = a WindowManager
Context PC = 4

----------------------------------------------------------------------
optimized [] in WindowManager>>safelyDispatchForWindowManager:
Receiver:
    an UndefinedObject
Temporaries:
    .event = a KeyPressedEvent
    .self = a WindowManager
Context PC = 6

----------------------------------------------------------------------
BlockClosure>>on:do:
Receiver:
    a BlockClosure
Instance Variables:
    method = CompiledBlock [] in WindowManager>>safelyDispatchForWindowManager:
    outerContext = nil
    copiedValues = an Array[2]
Arguments:
    anExceptionSelector = BadControllerError
    handlerBlock = BlockClosure [] in WindowManager>>safelyDispatchForWindowManager:
Context PC = 18

----------------------------------------------------------------------
WindowManager>>safelyDispatchForWindowManager:
Receiver:
    a WindowManager
Instance Variables:
    windows = an OrderedCollection[2]
    activeController = nil
    interruptLock = false
    outstandingMetaOrDamage = false
    openInProgress = false
    eventQueue = an EventQueue
    baseProcess = a Process in Semaphore>>waitIfCurtailedSignal
    dontFilterEvents = false
Arguments:
    event = a KeyPressedEvent
Context PC = 13

----------------------------------------------------------------------
WindowManager>>processNextEvent
Receiver:
    a WindowManager
Instance Variables:
    windows = an OrderedCollection[2]
    activeController = nil
    interruptLock = false
    outstandingMetaOrDamage = false
    openInProgress = false
    eventQueue = an EventQueue
    baseProcess = a Process in Semaphore>>waitIfCurtailedSignal
    dontFilterEvents = false
Temporaries:
    event = a KeyPressedEvent
Context PC = 9

<snip - even more>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc