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

Uncomment php block causes error #1509

Closed
babobski opened this Issue May 17, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@babobski
Contributor

babobski commented May 17, 2016

Short Summary

When you try to uncomment a php block, only the first line gets uncomment and the cursor dissapears. As discribed here.

Steps to Reproduce

Open a php file and try to uncomment this:

<?php
//echo "test";
//
//echo "test"
?>

Platform Information

[2016-05-18 00:09:32,423] [INFO] Startup: Welcome to Komodo IDE 10.0.0 build 89159 (platform win32-x86, running on Windows post2012Server version 6.3.9600)

Additional Information

ERROR:xpcom:Unhandled exception calling 'int8 * uncomment(in nsISomething);'
Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\mozilla\python\xpcom\server\policy.py", line 300, in _CallMethod_
    return 0, func(*params)
  File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\mozilla\python\komodo\koUDLLanguageBase.py", line 591, in uncomment
    KoCommenterLanguageService.uncomment(self, scimoz)
  File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\mozilla\python\komodo\koLanguageServiceBase.py", line 760, in uncomment
    self._determineMethodAndDispatch(scimoz, uncommenters, commenting=False)
  File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\mozilla\python\komodo\koLanguageServiceBase.py", line 712, in _determineMethodAndDispatch
    workers["line"](scimoz, textStart, textEnd)
  File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\mozilla\python\komodo\koLanguageServiceBase.py", line 510, in _uncommentLines
    scimoz.replaceTarget(replacementLines[i].rstrip('\r\n'))
  File "<XPCOMObject method 'replaceTarget'>", line 3, in replaceTarget
Exception: 2147942487 (NS_ERROR_ILLEGAL_VALUE)
ERROR:xpcom:Unhandled exception calling 'int8 * doCommand(in string);'
Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\mozilla\python\xpcom\server\policy.py", line 300, in _CallMethod_
    return 0, func(*params)
  File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\mozilla\components\koLanguageCommandHandler.py", line 694, in doCommand
    meth()
  File "C:\Program Files (x86)\ActiveState Komodo IDE 10\lib\mozilla\components\koLanguageCommandHandler.py", line 1013, in _do_cmd_uncomment
    commenter.uncomment(view.scimoz)
  File "<XPCOMObject method 'uncomment'>", line 3, in uncomment
Exception: 2147500037 (NS_ERROR_FAILURE)
[2016-05-18 00:09:52,016] [ERROR] commands: An error occurred executing the cmd_uncomment command
-- EXCEPTION START --
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIController.doCommand]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://xtk/content/controller.js :: ForwardingController_doCommand :: line 203"  data: no]
+ toString (function) 3 lines
+ message (string) 'Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIController.doCommand]'
+ result (number) 2147500037
+ name (string) 'NS_ERROR_FAILURE'
+ filename (string) 'chrome://xtk/content/controller.js'
+ lineNumber (number) 203
+ columnNumber (number) 0
+ inner (object) null
| + data (object) null
| + stack (string) 'ForwardingController_doCommand@chrome://xtk/content/controller.js:203:4
command_doCommand@chrome://k'...475 chars
+ location (object) JS frame :: chrome://xtk/content/controller.js :: ForwardingController_doCommand :: line 203
| + QueryInterface (function) 3 lines
| + language (number) 2
| + languageName (string) 'JavaScript'
| + filename (string) 'chrome://xtk/content/controller.js'
| + name (string) 'ForwardingController_doCommand'
| + lineNumber (number) 203
| + columnNumber (number) 4
| + sourceLine (string) ''
| + caller (object) JS frame :: chrome://komodo/content/library/commands.js :: command_doCommand :: line 239
| + formattedStack (string) 'ForwardingController_doCommand@chrome://xtk/content/controller.js:203:4
command_doCommand@chrome://k'...475 chars
| + stack
    ForwardingController_doCommand@chrome://xtk/content/controller.js:203:4
    command_doCommand@chrome://komodo/content/library/commands.js:239:0
    @chrome://komodo/content/keybindings/keybindings.js line 2562 > eval:1:0
    this.Manager.prototype.evalCommand@chrome://komodo/content/keybindings/keybindings.js:2562:22
    this.Manager.prototype.keypressHandler@chrome://komodo/content/keybindings/keybindings.js:2733:16
    gKeyHandler@chrome://komodo/content/keybindings/keybindings.js:2617:4
-- EXCEPTION END --
@Naatan

This comment has been minimized.

Member

Naatan commented May 17, 2016

What are you doing to uncomment it?

@babobski

This comment has been minimized.

Contributor

babobski commented May 17, 2016

Forgot to add the link, noticed a issue on the forum. Tested it and got the same result.
You need to select the block first and than uncomment, got the same result using the keybinding as trough the menu.

@Naatan Naatan added this to the 10.0.1 milestone May 17, 2016

@Naatan

This comment has been minimized.

Member

Naatan commented May 17, 2016

Reproduced using Code > Un-comment. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment