Subscript out of bounds when filtering a list

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

Subscript out of bounds when filtering a list

Jakob Reschke
Hello,

Did anybody else notice "Error: subscript out of bounds" when filtering a list?

I sometimes get that when I type in a list and quickly hit backspace to reset the filter again. But I have not managed yet to think of not immediately dismissing the debugger. So I cannot provide you with a stack trace. Also I can never reproduce it when I try to.

Kind regards,
Jakob


Reply | Threaded
Open this post in threaded view
|

Re: Subscript out of bounds when filtering a list

Christoph Thiede

Did you activate the #balloonHelpInMessageLists preference?


Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
Gesendet: Samstag, 15. Februar 2020 15:54:33
An: [hidden email]
Betreff: [squeak-dev] Subscript out of bounds when filtering a list
 
Hello,

Did anybody else notice "Error: subscript out of bounds" when filtering a list?

I sometimes get that when I type in a list and quickly hit backspace to reset the filter again. But I have not managed yet to think of not immediately dismissing the debugger. So I cannot provide you with a stack trace. Also I can never reproduce it when I try to.

Kind regards,
Jakob


Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: Subscript out of bounds when filtering a list

Jakob Reschke
Yes I have ballon help in message lists activated.

Am Sa., 15. Feb. 2020 um 16:02 Uhr schrieb Thiede, Christoph
<[hidden email]>:

>
> Did you activate the #balloonHelpInMessageLists preference?
>
> ________________________________
> Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
> Gesendet: Samstag, 15. Februar 2020 15:54:33
> An: [hidden email]
> Betreff: [squeak-dev] Subscript out of bounds when filtering a list
>
> Hello,
>
> Did anybody else notice "Error: subscript out of bounds" when filtering a list?
>
> I sometimes get that when I type in a list and quickly hit backspace to reset the filter again. But I have not managed yet to think of not immediately dismissing the debugger. So I cannot provide you with a stack trace. Also I can never reproduce it when I try to.
>
> Kind regards,
> Jakob
>

Reply | Threaded
Open this post in threaded view
|

Re: Subscript out of bounds when filtering a list

Christoph Thiede

I also faced a similar problem in the past when I had activated the preference, not sure whether this could be related.

I just reactivated the preference, let's hope the error will occur again :-)


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
Gesendet: Samstag, 15. Februar 2020 16:06:43
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] Subscript out of bounds when filtering a list
 
Yes I have ballon help in message lists activated.

Am Sa., 15. Feb. 2020 um 16:02 Uhr schrieb Thiede, Christoph
<[hidden email]>:
>
> Did you activate the #balloonHelpInMessageLists preference?
>
> ________________________________
> Von: Squeak-dev <[hidden email]> im Auftrag von Jakob Reschke <[hidden email]>
> Gesendet: Samstag, 15. Februar 2020 15:54:33
> An: [hidden email]
> Betreff: [squeak-dev] Subscript out of bounds when filtering a list
>
> Hello,
>
> Did anybody else notice "Error: subscript out of bounds" when filtering a list?
>
> I sometimes get that when I type in a list and quickly hit backspace to reset the filter again. But I have not managed yet to think of not immediately dismissing the debugger. So I cannot provide you with a stack trace. Also I can never reproduce it when I try to.
>
> Kind regards,
> Jakob
>



Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: Subscript out of bounds when filtering a list

Jakob Reschke
Got it! It is the message balloons indeed.


Error: subscript is out of bounds: 0
15 February 2020 10:29:49.78168 pm

VM: Win32 - Smalltalk
Image: Squeak5.3beta [latest update: #19332]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir C:\Users\Jakob\HiDrive
Trusted Dir C:\Users\Jakob\HiDrive\Jakob
Untrusted Dir C:\Users\Jakob\Documents\My Squeak

Array(Object)>>error:
   Receiver: #(#addRemote: #branchNamed: #branchNames #branches
#configAt: #configAt:ifAbsent: #configAt:put:...etc...
   Arguments and temporary variables:
      aString:    'subscript is out of bounds: 0'
   Receiver's instance variables:
#(#addRemote: #branchNamed: #branchNames #branches #configAt:
#configAt:ifAbsent: #configAt:put:...etc...
Array(Object)>>errorSubscriptBounds:
   Receiver: #(#addRemote: #branchNamed: #branchNames #branches
#configAt: #configAt:ifAbsent: #configAt:put:...etc...
   Arguments and temporary variables:
      index:    0
   Receiver's instance variables:
#(#addRemote: #branchNamed: #branchNames #branches #configAt:
#configAt:ifAbsent: #configAt:put:...etc...
Array(Object)>>at:
   Receiver: #(#addRemote: #branchNamed: #branchNames #branches
#configAt: #configAt:ifAbsent: #configAt:put:...etc...
   Arguments and temporary variables:
      index:    0
   Receiver's instance variables:
#(#addRemote: #branchNamed: #branchNames #branches #configAt:
#configAt:ifAbsent: #configAt:put:...etc...
Browser>>messageHelpAt:
   Receiver: a Browser
   Arguments and temporary variables:
      anIndex:    0
      iconHelp:    nil
      selector:    nil
      method:    nil
   Receiver's instance variables:
      dependents:    a DependentsArray(a PluggableSystemWindow<System
Browser: GitUnitOf...etc...
      contents:    a Text for 'followSymbolicRefs: aString
   | target |
   (refStores anySa...etc...
      currentCompiledMethod:    (GitUnitOfWork>>#followSymbolicRefs:
"a CompiledMethod(2...etc...
      contentsSymbol:    #source
      multiWindowState:    nil
      environment:    Smalltalk
      systemOrganizer:    ('Squot-Interfaces' TSquotArtifact
TSquotDiff TSquotDiffable TSquotDiffableShadow...etc...
      classOrganizer:    ('accessing' addRemote: branchNamed:
branchNames branches configAt:...etc...
      metaClassOrganizer:    ('as yet unclassified')

      editSelection:    #editMessage
      metaClassIndicated:    false
      selectedSystemCategory:    #'FileSystem-Git-Plumbing-Core'
      selectedClassName:    #GitUnitOfWork
      selectedMessageName:    #followSymbolicRefs:
      selectedMessageCategoryName:    #accessing
      classDefinition:    'Object subclass: #GitUnitOfWork
   instanceVariableNames: ''rep...etc...
      metaClassDefinition:    'GitUnitOfWork class
   instanceVariableNames: '''''

PluggableListMorphPlus(PluggableListMorph)>>balloonText
   Receiver: a PluggableListMorphPlus(3479582)
   Arguments and temporary variables:
      selector:    #messageHelpAt:
   Receiver's instance variables:
      bounds:    1174@895 corner: 1317@1050
      owner:    a PluggableSystemWindow<System Browser: GitUnitOfWork>(2725606)
      submorphs:    {a TransformMorph(3819222)}
      fullBounds:    1174@895 corner: 1317@1050
      color:    Color white
      extension:    a MorphExtension (3425414) [other:
(layoutProperties -> a LayoutPro...etc...
      borderWidth:    1
      borderColor:    (Color r: 0.509 g: 0.6 b: 0.419)
      model:    a Browser
      slotName:    nil
      open:    false
      scrollBar:    a ScrollBar(266769)
      scroller:    a TransformMorph(3819222)
      retractableScrollBar:    false
      scrollBarOnLeft:    false
      getMenuSelector:    #messageListMenu:shifted:
      getMenuTitleSelector:    nil
      hasFocus:    true
      hScrollBar:    a ScrollBar(4070961)
      hScrollBarPolicy:    #never
      vScrollBarPolicy:    #whenNeeded
      scrollBarThickness:    14
      list:    an OrderedCollection(#followSymbolicRefs:
#refName:forRemote: #remoteConfigFor:option:...etc...
      fullList:    #(#addRemote: #branchNamed: #branchNames #branches
#configAt: #configAt:ifAbsent:...etc...
      modelToView:    a Dictionary(14->1 23->2 27->3 28->4 36->5 38->6 47->7 )
      viewToModel:    a Dictionary(1->14 2->23 3->27 4->28 5->36 6->38 7->47 )
      getListSelector:    #messageList
      getListSizeSelector:    nil
      getListElementSelector:    nil
      getIndexSelector:    #messageListIndex
      setIndexSelector:    #messageListIndex:
      keystrokeActionSelector:    #messageListKey:from:
      autoDeselect:    true
      lastKeystrokeTime:    3759254989771
      lastKeystrokes:    'fo'
      lastClickTime:    nil
      doubleClickSelector:    nil
      handlesBasicKeys:    nil
      potentialDropRow:    nil
      hoverRow:    45
      listMorph:    a LazyListMorph(231067)
      keystrokePreviewSelector:    nil
      priorSelection:    45
      getIconSelector:    #messageIconAt:
      getHelpSelector:    #messageHelpAt:
      dragItemSelector:    #dragFromMessageList:
      dropItemSelector:    nil
      wantsDropSelector:    nil
      dragTypeSelector:    nil
      dragStartedSelector:    nil

PluggableListMorphPlus(Morph)>>wantsBalloon
   Receiver: a PluggableListMorphPlus(3479582)
   Arguments and temporary variables:

   Receiver's instance variables:
      bounds:    1174@895 corner: 1317@1050
      owner:    a PluggableSystemWindow<System Browser: GitUnitOfWork>(2725606)
      submorphs:    {a TransformMorph(3819222)}
      fullBounds:    1174@895 corner: 1317@1050
      color:    Color white
      extension:    a MorphExtension (3425414) [other:
(layoutProperties -> a LayoutPro...etc...
      borderWidth:    1
      borderColor:    (Color r: 0.509 g: 0.6 b: 0.419)
      model:    a Browser
      slotName:    nil
      open:    false
      scrollBar:    a ScrollBar(266769)
      scroller:    a TransformMorph(3819222)
      retractableScrollBar:    false
      scrollBarOnLeft:    false
      getMenuSelector:    #messageListMenu:shifted:
      getMenuTitleSelector:    nil
      hasFocus:    true
      hScrollBar:    a ScrollBar(4070961)
      hScrollBarPolicy:    #never
      vScrollBarPolicy:    #whenNeeded
      scrollBarThickness:    14
      list:    an OrderedCollection(#followSymbolicRefs:
#refName:forRemote: #remoteConfigFor:option:...etc...
      fullList:    #(#addRemote: #branchNamed: #branchNames #branches
#configAt: #configAt:ifAbsent:...etc...
      modelToView:    a Dictionary(14->1 23->2 27->3 28->4 36->5 38->6 47->7 )
      viewToModel:    a Dictionary(1->14 2->23 3->27 4->28 5->36 6->38 7->47 )
      getListSelector:    #messageList
      getListSizeSelector:    nil
      getListElementSelector:    nil
      getIndexSelector:    #messageListIndex
      setIndexSelector:    #messageListIndex:
      keystrokeActionSelector:    #messageListKey:from:
      autoDeselect:    true
      lastKeystrokeTime:    3759254989771
      lastKeystrokes:    'fo'
      lastClickTime:    nil
      doubleClickSelector:    nil
      handlesBasicKeys:    nil
      potentialDropRow:    nil
      hoverRow:    45
      listMorph:    a LazyListMorph(231067)
      keystrokePreviewSelector:    nil
      priorSelection:    45
      getIconSelector:    #messageIconAt:
      getHelpSelector:    #messageHelpAt:
      dragItemSelector:    #dragFromMessageList:
      dropItemSelector:    nil
      wantsDropSelector:    nil
      dragTypeSelector:    nil
      dragStartedSelector:    nil

HandMorph>>spawnBalloonFor:
   Receiver: a HandMorph(3499674)
   Arguments and temporary variables:
      aMorph:    a PluggableListMorphPlus(3479582)
   Receiver's instance variables:
      bounds:    1272@978 corner: 1288@994
      owner:    a PasteUpMorph(2465254) [world]
      submorphs:    #()
      fullBounds:    1272@978 corner: 1288@994
      color:    Color blue
      extension:    a MorphExtension (1044607) [other:
(balloonHelpMorphs -> an Ordered...etc...
      mouseFocus:    nil
      keyboardFocus:    a PluggableListMorphPlus(3479582)
      eventListeners:    nil
      mouseListeners:    nil
      keyboardListeners:    nil
      eventCaptureFilters:    nil
      mouseCaptureFilters:    nil
      keyboardCaptureFilters:    a WeakArray(a HandMorph(3499674))
      mouseClickState:    nil
      mouseOverHandler:    a MouseOverHandler
      mouseWheelState:    a MouseWheelState
      lastMouseEvent:    [1275@978 1272@978 mouseMove 84425703]
      targetOffset:    201@120
      damageRecorder:    a DamageRecorder
      cacheCanvas:    nil
      cachedCanvasHasHoles:    false
      temporaryCursor:    nil
      temporaryCursorOffset:    nil
      hardwareCursor:    nil
      hasChanged:    true
      savedPatch:    nil
      userInitials:    ''
      lastEventBuffer:    #(1 84425703 1272 978 0 0 0 1)
      genieGestureProcessor:    nil
      keyboardInterpreter:    an UTF32InputInterpreter

...


Reply | Threaded
Open this post in threaded view
|

Re: Subscript out of bounds when filtering a list

Jakob Reschke
The hoverRow is 0 at least when I inspected it from the debugger. And
even though there is the condition self hoverRow > 0 in #balloonText
it gets past that, only to find that self modelIndexFor: self hoverRow
is 0. So either there is a concurrency issue and another process sets
hoverRow, or the hoverRow index (when it was still non-zero) was not
found in viewToModel at the time when the balloon should be displayed.

I'm going to submit zero check in ballonText. Maybe Marcel or anyone
else has a better idea.

Reply | Threaded
Open this post in threaded view
|

Re: Subscript out of bounds when filtering a list

marcel.taeumel
Fixed. Thanks for the hint!

Best,
Marcel

Am 15.02.2020 23:01:14 schrieb Jakob Reschke <[hidden email]>:

The hoverRow is 0 at least when I inspected it from the debugger. And
even though there is the condition self hoverRow > 0 in #balloonText
it gets past that, only to find that self modelIndexFor: self hoverRow
is 0. So either there is a concurrency issue and another process sets
hoverRow, or the hoverRow index (when it was still non-zero) was not
found in viewToModel at the time when the balloon should be displayed.

I'm going to submit zero check in ballonText. Maybe Marcel or anyone
else has a better idea.