Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

random IndexErrors while editing text #213

Open
slice opened this issue Jul 24, 2018 · 6 comments
Open

random IndexErrors while editing text #213

slice opened this issue Jul 24, 2018 · 6 comments
Labels

Comments

@slice
Copy link

slice commented Jul 24, 2018

I've triggered this bug multiple times (I'd say over 10 times) over multiple days. I don't know how to trigger it, as it happens randomly while I'm editing text. It puts Six into an unstable state that can only be restored after a full restart.

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 462, in run_callback
    expr()
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 552, in <lambda>
    run_callback('on_post_save', callback, lambda: callback.on_post_save(v))
  File "D:/a/1/six-release\commands\events\event_sync_mode.py", line 167, in on_post_save
  File "D:/a/1/six-release\lib\command_state.py", line 802, in active_mode
IndexError: list index out of range
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 757, in on_post_text_command
    callback.on_post_text_command(v, name, args)
  File "D:/a/1/six-release\commands\events\event_mouse.py", line 41, in on_post_text_command
  File "D:/a/1/six-release\lib\command_state.py", line 802, in active_mode
IndexError: list index out of range
@guillermooo
Copy link
Owner

I've seen these errors too recently, but I can't pinpoint what triggers them. I will catch the errors and reinit Six for now.

@guillermooo
Copy link
Owner

Should be fixed in the latest dev build.

@slice
Copy link
Author

slice commented Jan 3, 2019

This still appears to be happening for me:

2019-01-02 20:34:27,783 - CRITICAL - Six.lib.editor_internal - Unexpected error.
2019-01-02 20:34:27,791 - ERROR - Six.lib.editor_internal - can only concatenate list (not "NoneType") to list
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\editor_internal.py", line 92, in handle
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\editor_internal.py", line 182, in _handle_state
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\command_state.py", line 843, in _handle
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\command_state.py", line 425, in enter
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\command_state_internal.py", line 128, in enter
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\command_state_internal.py", line 34, in enter
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\command_state_internal.py", line 44, in _from_non_normal_mode
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\command_state_internal.py", line 56, in _from_insert
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\command_state_internal.py", line 72, in _repeat_insert_mode
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\command_state.py", line 958, in repeat_insert_mode
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\editor_internal.py", line 256, in repeat
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\editor_internal.py", line 322, in _calculate_history
2019-01-02 20:34:27,795 - INFO - Six.lib.editor_internal - Trying to reenter Normal mode...
2019-01-02 20:34:27,795 - CRITICAL - Six.lib.command_state - cannot enter unavailable mode: normal (<Esc>)
2019-01-02 20:34:27,795 - CRITICAL - Six.lib.editor_internal - Could not reenter Normal mode. Please restart Sublime Text.
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\editor_internal.py", line 224, in _handle_exception
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\command_state.py", line 955, in enter_mode
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 638, in on_query_context
    val = callback.on_query_context(v, key, operator, operand, match_all)
  File "D:\Users\guillermo\Source\sublime-packages\six-release\commands\events\context_tracker.py", line 25, in on_query_context
  File "D:\Users\guillermo\Source\sublime-packages\six-release\plugin\contexts.py", line 42, in check
  File "D:\Users\guillermo\Source\sublime-packages\six-release\plugin\contexts.py", line 28, in six_is_in_multiple_selection_mode
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\command_state.py", line 823, in active_mode
IndexError: list index out of range
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1066, in run_
    return self.run(edit, **args)
  File "D:\Users\guillermo\Source\sublime-packages\six-release\commands\press_key.py", line 107, in run
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\command_state.py", line 823, in active_mode
IndexError: list index out of range
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 638, in on_query_context
    val = callback.on_query_context(v, key, operator, operand, match_all)
  File "D:\Users\guillermo\Source\sublime-packages\six-release\commands\events\context_tracker.py", line 25, in on_query_context
  File "D:\Users\guillermo\Source\sublime-packages\six-release\plugin\contexts.py", line 42, in check
  File "D:\Users\guillermo\Source\sublime-packages\six-release\plugin\contexts.py", line 28, in six_is_in_multiple_selection_mode
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\command_state.py", line 823, in active_mode
IndexError: list index out of range
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1066, in run_
    return self.run(edit, **args)
  File "D:\Users\guillermo\Source\sublime-packages\six-release\commands\press_key.py", line 107, in run
  File "D:\Users\guillermo\Source\sublime-packages\six-release\lib\command_state.py", line 823, in active_mode
IndexError: list index out of range
2019-01-02 20:34:39,440 - ERROR - Six.commands.events.event_mouse - no active mode available; switching to normal mode

On the latest dev build. It seems to fix itself (although only sometimes).

@guillermooo guillermooo reopened this Jan 22, 2019
@slice
Copy link
Author

slice commented Feb 2, 2019

More logs:

raceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1082, in run_
    return self.run(edit, **args)
  File "D:/a/1/six-release\commands\press_key.py", line 107, in run
  File "D:/a/1/six-release\lib\command_state.py", line 823, in active_mode
IndexError: list index out of range
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1082, in run_
    return self.run(edit, **args)
  File "D:/a/1/six-release\commands\press_key.py", line 107, in run
  File "D:/a/1/six-release\lib\command_state.py", line 823, in active_mode
IndexError: list index out of range
Package Control: No updated packages
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1082, in run_
    return self.run(edit, **args)
  File "D:/a/1/six-release\commands\press_key.py", line 107, in run
  File "D:/a/1/six-release\lib\command_state.py", line 823, in active_mode
IndexError: list index out of range
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1082, in run_
    return self.run(edit, **args)
  File "D:/a/1/six-release\commands\press_key.py", line 107, in run
  File "D:/a/1/six-release\lib\command_state.py", line 823, in active_mode
IndexError: list index out of range

This one happened immediately after starting Sublime Text (from a completely closed state) and trying to use it.

Using latest dev build at time of posting.

@slice
Copy link
Author

slice commented Feb 2, 2019

And after opening Sublime Text (from a completely closed state) and clicking somewhere in a file, this error happens:

Traceback (most recent call last):
  File "D:/a/1/six-release\commands\events\event_mouse.py", line 42, in on_post_text_command
  File "D:/a/1/six-release\lib\command_state.py", line 823, in active_mode
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 773, in on_post_text_command
    callback.on_post_text_command(v, name, args)
  File "D:/a/1/six-release\commands\events\event_mouse.py", line 56, in on_post_text_command
  File "D:/a/1/six-release\lib\command_state.py", line 425, in enter
  File "D:/a/1/six-release\lib\command_state_internal.py", line 121, in enter
  File "D:/a/1/six-release\lib\command_state_internal.py", line 153, in _init
  File "D:/a/1/six-release\lib\command_state.py", line 916, in record_xpos
AttributeError: 'NoneType' object has no attribute 'sel'

@slice
Copy link
Author

slice commented Feb 2, 2019

Okay, actually, I think this build is just broken. (Although the above errors are still separate bugs.) Nothing seems to be working, getting constant errors in console.

Will open a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants