Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Uncaught Error: Can't undo with an open transaction #5723

Closed

Description

@mMerlin

Looks like #4817 has resurfaced.

Additional environment details: This is a guest VM running in VirtualBox for host OS Windows 7 64-bit. At the time the error occurred, I had a momentary slow down, where atom / the VM was not responding quickly. I think what happened, is I did <ctrl>x a second time on a highlighted word before the first had been processed, and my finger slipped over and also did a <ctrl>z. Don't really know which got there first. I saw the same thing with an older version of atom (about 0.173), but ignored it when I saw the 'already reported' message. This time I had a look at the report, and saw that it had been closed.

Just incase it overlaps. I saw some reports about problems using split tabs. When the error occurred, there were no splits, but earlier in the session I had 3 splits open (Split Down) for a single file, editing in all 3.

As you can see from the config report, this is a pretty bare environment. Quite new to using atom, and have not done any real customizing, other than tabs-to-spaces.

After collecting the details for reporting, the session continued. A couple of undo operations got things back where the should be. Save, Exit, restarted, just to be safe :)

Atom Version: 0.182.0-d1e6dba
System: linux 3.18.7-200.fc21.i686
Thrown From: Atom Core

Stack Trace

Uncaught Error: Can't undo with an open transaction

At /opt/atom/share/atom/resources/app/node_modules/text-buffer/lib/history.js:76

Error: Can't undo with an open transaction
    at History.module.exports.History.undo (/opt/atom/share/atom/resources/app/node_modules/text-buffer/lib/history.js:76:15)
    at TextBuffer.module.exports.TextBuffer.undo (/opt/atom/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:679:27)
    at TextEditor.module.exports.TextEditor.undo (/opt/atom/share/atom/resources/app/src/text-editor.js:1186:26)
    at TextEditor.atom.commands.add.stopEventPropagation.core:undo (/opt/atom/share/atom/resources/app/src/text-editor-element.js:318:19)
    at atom-text-editor.newCommandListeners.(anonymous function) (/opt/atom/share/atom/resources/app/src/text-editor-element.js:286:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/share/atom/resources/app/src/command-registry.js:243:29)
    at /opt/atom/share/atom/resources/app/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/atom/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/atom/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
    at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/opt/atom/share/atom/resources/app/src/window-event-handler.js:176:20)

Commands

     -0:22.6 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
  2x -0:21.9 editor:move-to-beginning-of-word (atom-text-editor.editor.is-focused)
     -0:20.6 core:move-left (atom-text-editor.editor.is-focused)
     -0:20.4 editor:select-to-end-of-line (atom-text-editor.editor.is-focused)
     -0:19.7 core:cut (atom-text-editor.editor.is-focused)
  2x -0:19.4 editor:move-to-end-of-word (atom-text-editor.editor.is-focused)
     -0:17.9 editor:move-to-beginning-of-word (atom-text-editor.editor.is-focused)
     -0:17.0 core:move-left (atom-text-editor.editor.is-focused)
     -0:16.4 core:paste (atom-text-editor.editor.is-focused)
     -0:11.1 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
     -0:10.4 editor:select-to-beginning-of-word (atom-text-editor.editor.is-focused)
     -0:09.8 core:select-left (atom-text-editor.editor.is-focused)
     -0:09.1 core:cut (atom-text-editor.editor.is-focused)
     -0:09.1 core:undo (atom-text-editor.editor.is-focused)
     -0:02.6 core:cut (atom-text-editor.editor.is-focused)
     -0:02.4 core:move-right (atom-text-editor.editor.is-focused)

Config

{
  "core": {},
  "editor": {
    "invisibles": {},
    "autoIndentOnPaste": false,
    "showInvisibles": true,
    "fontSize": 14
  }
}

Installed Packages

# User
tabs-to-spaces, v0.8.1

# Dev
No dev packages

Activity

  1. izuzak commented on Feb 25, 2015

    @izuzak
    Contributor

    Thanks for the report, @mMerlin.

    I tried really hard, but couldn't reproduce this. @maxbrunsfeld @nathansobo I'm guessing you might have 💭/💡 about this since you've been working on this part of text-buffer.

    What would need to happen for this to be triggered during normal Atom operation? Does the description above explain how this might happen:

    I had a momentary slow down, where atom / the VM was not responding quickly. I think what happened, is I did x a second time on a highlighted word before the first had been processed, and my finger slipped over and also did a z.

    If this does happen, could we instead drop the undo/redo operation (and return false or something) instead of throwing an exception?

  2. bojidar-bg commented on Mar 10, 2015

    @bojidar-bg

    Just happened to me... I pressed ctrl-x and slipped to ctrl-z. No damaged ocurred, though. (e.g. I was able to make undo/redo after that).

  3. yoavst commented on Apr 15, 2015

    @yoavst

    I've just did ctrl x and it happens. sorry that I cannot give more details (Ubuntu 14.04)

  4. izuzak commented on Jun 10, 2015

    @izuzak
    Contributor

    This was closed in atom/text-buffer#58, I believe. /cc @maxbrunsfeld

  5. lock commented on Jan 22, 2019

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  6. locked as resolved and limited conversation to collaborators on Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions