Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.15k stars 302 forks source link

CodeIntel errors out without warning when cmd.exe is not found #3537

Open ANSI-C opened 6 years ago

ANSI-C commented 6 years ago

See image below, no way to get functions/method list anymore, this disapperared without reason: immagine

ANSI-C commented 6 years ago

I tried even to wipe all my preferences from %userprofile%\AppData*\ActiveState, uninstall and reinstall Komodo IDE, no way as well.

th3coop commented 6 years ago

Please fill out all the requested fields (or as many as possible) in the default bug report.

ANSI-C commented 6 years ago

Sir, please look at the screenshot, a picture is worth a thousand words. There is no way to display functions and methods anymore in a sidebar, the menu entry to display symbol browser sidebar is disappeared, please advise.

th3coop commented 6 years ago

Where is the OS? Komodo version? Steps to reproduce? Logs? Please see the default report and fill in as many fields as possible.

ANSI-C commented 6 years ago

Windows 8.1 Komodo IDE, version 11.0.2, build 90813, platform win32-x86. Built on Mon Dec 04 08:56:02 2017. Steps to reproduce: install it and try to activate symbol browser sidebar, it does not appear in related menu (see above).

th3coop commented 6 years ago

@ANSI-C, what about logs? Help > Troubleshooting > View Log File. Also, %userprofile%\AppData\ActiveState\KomodoIDE\11.0\codeintel.log*.

ANSI-C commented 6 years ago
[2018-04-27 00:25:40,559] [INFO] Startup: Welcome to Komodo IDE 11.0.2 build 90813 (platform win32-x86, running on Windows post2012Server version 6.3.9600)
[2018-04-27 00:25:40,561] [INFO] Startup: C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\komodo.exe built on Mon Dec 04 08:56:02 2017
[2018-04-27 00:25:42,302] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in resource://gre/modules/Preferences.jsm:381
[2018-04-27 00:25:42,427] [WARNING] root: [object Object].logging has been converted to a CommonJS module; use require("ko/logging") instead (since Komodo 9.0.0a1).
    @chrome://komodo/content/komodo.js:15:1

[2018-04-27 00:25:43,492] [ERROR] console-logger: bad script XDR magic number (0) in :0
Traceback (most recent call last):
  File "", line 0, in 

[2018-04-27 00:25:43,960] [WARNING] keybindings: [Ctrl+0] was used for 'cmd_goToQuickBookmark_0', overriding to use 'cmd_fontZoomReset'
[2018-04-27 00:25:43,966] [WARNING] keybindings: [Ctrl+P] was used for 'cmd_scope-packages', overriding to use 'cmd_vim_linePrevious'
[2018-04-27 00:25:43,967] [WARNING] keybindings: [Ctrl+D] was used for 'cmd_addNextSubstringToCaretSet', overriding to use 'cmd_vim_scrollHalfPageDown'
[2018-04-27 00:25:43,969] [WARNING] keybindings: [Ctrl+U] was used for 'cmd_convertUpperCase', overriding to use 'cmd_vim_scrollHalfPageUp'
[2018-04-27 00:25:43,969] [WARNING] keybindings: [Ctrl+F] was used for 'cmd_startIncrementalSearch', overriding to use 'cmd_vim_pageDown'
[2018-04-27 00:25:43,969] [WARNING] keybindings: [Ctrl+B] was used for 'cmd_runInLine', overriding to use 'cmd_vim_pageUp'
[2018-04-27 00:25:43,970] [WARNING] keybindings: [Ctrl+Y] was used for 'cmd_redo', overriding to use 'cmd_vim_lineScrollUp'
[2018-04-27 00:25:43,970] [WARNING] keybindings: [Ctrl+E] was used for 'cmd_endOfWord', overriding to use 'cmd_vim_lineScrollDown'
[2018-04-27 00:25:43,974] [WARNING] keybindings: [Ctrl+V] was used for 'cmd_paste', overriding to use 'cmd_vim_toggleVisualBlockMode'
[2018-04-27 00:25:43,976] [WARNING] keybindings: [Ctrl+[] was used for 'cmd_blockSelect', overriding to use 'cmd_vim_cancel'
[2018-04-27 00:25:44,253] [WARNING] ko.widgets: Could not restore widget unittest-widget
[2018-04-27 00:25:44,586] [DEBUG] ko.launch: versioncheck on http://docs.komodoide.com/changelog/11
[2018-04-27 00:25:44,857] [INFO] koInitService: Adding pre startup service for 'koFileStatusService': '@activestate.com/koFileStatusService;1'
[2018-04-27 00:25:45,151] [INFO] codeintel/process: Starting CodeIntel
[2018-04-27 00:25:45,155] [DEBUG] codeintel/process: PYTHONPATH: C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\python\..\lib\python2.7;C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\support\dbgp\pythonlib;C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\extensions\codeintel@activestate.com\content\..\pylib\codeintel\lib;C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\extensions\codeintel@activestate.com\content\..\pylib\codeintel\env\Lib\site-packages
[2018-04-27 00:25:45,253] [INFO] elastic_tabstops: Elastic tabstops loaded.
[2018-04-27 00:25:45,296] [INFO] komodospellchecker: Spell checker loaded.
[2018-04-27 00:25:45,296] [INFO] komodospellchecker: Using dictionary en-US
[2018-04-27 00:25:45,933] [ERROR] ko-shell: Error during process execution
-- EXCEPTION START --
TypeError: command.isExecutable is not a function
+ stack
    getCommandStr@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/system/child_process/subprocess.js:412:16
    subprocess_win32@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/system/child_process/subprocess.js:1043:18
    subprocess.call@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/system/child_process/subprocess.js:456:20
    initialize@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/system/child_process.js:45:14
    constructor@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/core/heritage.js:145:23
    spawn@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/system/child_process.js:153:10
    this.run@chrome://komodo/content/sdk/shell.js:153:23
    this.start@chrome://codeintel/content/sdk/process.js:81:26
    this.start@chrome://codeintel/content/sdk/codeintel.js:70:9
    init@chrome://codeintel/content/sdk/codeintel.js:63:13
    @chrome://codeintel/content/sdk/codeintel.js:208:5
    @chrome://codeintel/content/sdk/codeintel.js:1:1
    evaluate@resource://gre/modules/commonjs/toolkit/loader.js:266:19
    load@resource://gre/modules/commonjs/toolkit/loader.js:317:5
    main@resource://gre/modules/commonjs/toolkit/loader.js:690:10
    require@chrome://komodo/content/jetpack.js:154:1
    loadIntoWindow@resource://gre/modules/addons/XPIProvider.jsm -> file:///C:/Program%20Files%20(x86)/ActiveState%20Komodo%20IDE%2011/lib/mozilla/extensions/codeintel@activestate.com/bootstrap.js:39:9
    onLoad@resource://gre/modules/addons/XPIProvider.jsm -> file:///C:/Program%20Files%20(x86)/ActiveState%20Komodo%20IDE%2011/lib/mozilla/extensions/codeintel@activestate.com/bootstrap.js:58:13
    xtk.domutils.fireEvent@chrome://xtk/content/domutils.js:157:5
    onloadDelay/<@chrome://komodo/content/komodo.js:450:9
-- EXCEPTION END --
[2018-04-27 00:25:45,934] [INFO] codeintel/process: onClose called, code: -1
[2018-04-27 00:25:45,934] [DEBUG] codeintel/process: Calling callbacks for: stopped, number: 0
[2018-04-27 00:25:47,917] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in file:///C:/Program%20Files%20(x86)/ActiveState%20Komodo%20IDE%2011/lib/mozilla/components/koLessProtocolHandler.js:154
[2018-04-27 00:25:47,917] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in file:///C:/Program%20Files%20(x86)/ActiveState%20Komodo%20IDE%2011/lib/mozilla/components/koLessProtocolHandler.js:154
[2018-04-27 00:25:47,917] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in file:///C:/Program%20Files%20(x86)/ActiveState%20Komodo%20IDE%2011/lib/mozilla/components/koLessProtocolHandler.js:154
ERROR:xpcom:Unhandled exception calling 'G     int8 * sccType(in dipper retval string &);'
Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\python\xpcom\server\policy.py", line 274, in _CallMethod_
    ret = getattr(self._obj_, name) # Let attribute error go here!
  File "C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\components\koFileEx.py", line 72, in __getattr__
    raise AttributeError, attr
AttributeError: sccType
[2018-04-27 00:25:48,536] [INFO] koInitService: Adding pre startup service for 'KoMemoryReporter': '@activestate.com/koMemoryReporter;1'
[2018-04-27 00:25:48,545] [INFO] koInitService: Adding pre startup service for 'koCommandmentService': '@activestate.com/koCommandmentService;1'
[2018-04-27 00:25:48,555] [INFO] koInitService: Adding pre startup service for 'koDBGPManager': '@activestate.com/koDBGPManager;1'
[2018-04-27 00:25:48,561] [ERROR] koFileStatusService: unexpected error from koIFile.isLocal or koIFile.isFile
Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\components\koFileStatusService.py", line 466, in _process
    if u.isLocal and not u.isNetworkFile:
  File "C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\components\koFileEx.py", line 72, in __getattr__
    raise AttributeError, attr
AttributeError: isLocal
[2018-04-27 00:25:48,562] [ERROR] koFileStatusService: Exception checking uri: None
Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\components\koFileStatusService.py", line 621, in _process
    reason):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\python\komodo\fileStatusUtils.py", line 250, in updateFileStatus
    if koIFile.isLocal and not koIFile.isNetworkFile:
  File "C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\components\koFileEx.py", line 72, in __getattr__
    raise AttributeError, attr
AttributeError: isLocal
[2018-04-27 00:25:48,562] [ERROR] koFileStatusService: Exception detail: AttributeError('isLocal',)
Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\components\koFileStatusService.py", line 621, in _process
    reason):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\python\komodo\fileStatusUtils.py", line 250, in updateFileStatus
    if koIFile.isLocal and not koIFile.isNetworkFile:
  File "C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\components\koFileEx.py", line 72, in __getattr__
    raise AttributeError, attr
AttributeError: isLocal
[2018-04-27 00:25:48,562] [ERROR] koFileStatusService: KoFileStatusService thread exception Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\components\koFileStatusService.py", line 590, in _process
    reason):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\extensions\publishing@ActiveState.com\components\koPublishingStatus.py", line 164, in needsToReCheckFileStatus
    uri_cache_key = self._norm_uri_cache_key(koFile.URI)
  File "C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\mozilla\python\komodo\fileStatusUtils.py", line 107, in _norm_uri_cache_key
    uri = unescapeURL(uri).strip("/")
  File "C:\Program Files (x86)\ActiveState Komodo IDE 11\lib\python\lib\urllib.py", line 1217, in unquote
    bits = s.split('%')
AttributeError: 'NoneType' object has no attribute 'split'

[2018-04-27 00:25:48,630] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in chrome://unittest/content/views/panel.xul:0
[2018-04-27 00:25:48,632] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in chrome://unittest/content/views/panel.xul:0
[2018-04-27 00:25:48,635] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in chrome://unittest/content/views/panel.xul:0
[2018-04-27 00:25:50,671] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in file:///C:/Program%20Files%20(x86)/ActiveState%20Komodo%20IDE%2011/lib/mozilla/components/koamAddonManager.js:138
[2018-04-27 00:25:50,799] [DEBUG] ko.launch: Response: http://docs.komodoide.com/__omnigollum__/auth/github?origin=%2Fcreate%2Fchangelog%2F11 (404)
[2018-04-27 00:25:50,799] [DEBUG] ko.launch: versioncheck on http://docs.komodoide.com/changelog/110
[2018-04-27 00:25:51,650] [DEBUG] ko.launch: Response: http://docs.komodoide.com/__omnigollum__/auth/github?origin=%2Fcreate%2Fchangelog%2F110 (404)
[2018-04-27 00:27:49,213] [WARNING] console-logger: Key event not available on GTK2: key="u" modifiers="control,shift" (1) in chrome://komodo/content/tail/tail.xul:0
ANSI-C commented 6 years ago

No codeintel.log* found under AppData dir.

Naatan commented 6 years ago

Can you reproduce this using Help > Troubleshooting > Restart in Safe-mode ?

Please verify that when restarting in safe-mode Komodo should be using the default UI (all your settings would be temporarily reset).

ANSI-C commented 6 years ago

Restarted in safe mode, same story, no menu entry.

Naatan commented 6 years ago

What windows version are you on? Also, you said "anymore", suggesting it worked before. Any idea what triggered it to stop working?

ANSI-C commented 6 years ago

I am on Windows 8.1, no idea what triggered the problem since I didn't do any change on my computer, only Windows security updates are enabled. Only thing I can think of is that I uninstalled and cleanly reinstalled Java SDK 8, and fired CCleaner reg cleaner (that shown itself always safe). After detecting this problem I completely uninstalled also Komodo anyway, and deleted all its preferences, so I started over with a clean slate (reinstalled license, reinstalled Komodo, followed initial config wizard, etc etc), but got same problem. Only after two hours of tinkering I given up and decided to open the ticket. There are a lot of things not working in v11, like autocompletion, etc etc. In last days I was forced to switch to IntelliJ IDEA to not go back to Vim/Notepad++ (despite being a Java IDE it works pretty well with Perl language and Vim emulation, better than Eclipse)

Naatan commented 6 years ago

The issue you're seeing is strange as based on the error log I don't see why you would be the only one running into this, but you are. Suggesting that there's some corruption going on, perhaps due to some overzealous antivirus software. What are you using for antivirus?

ANSI-C commented 6 years ago

I have Windows Defender, with realtime check temporarily stopped.

ANSI-C commented 6 years ago

Can you confirm that all Komodo settings are in %userprofile%\AppData\Local|Roaming\ActiveState\ ? Is there any settings saved in the registry? And also, what about this double folder? immagine

Naatan commented 6 years ago

The one with the space contains mainly license info, it doesn't really affect the running of Komodo. Nothing of importance is saved to the registry to my knowledge.

Could you as a test see if running Komodo without windows defender enabled makes a difference?

ANSI-C commented 6 years ago

Well, actually realtime Defender is already disabled in my computer.

Naatan commented 6 years ago

I'm really not too sure what else this could be. I realise this is a big ask but I can't think of a simpler debugging step at this stage; could you create a temporary user account on your machine and see if the problem persists there?

ANSI-C commented 6 years ago

Done, same result:

result

th3coop commented 6 years ago

@Naatan, would trying to start code intel manually give us any helpful info?

Naatan commented 6 years ago

@cgchoffman I think that would just give us the same call stack we already have from the log.

Targeting for 11.1 so we can dig into the call stack, see if we can figure out if that can explain why this only happens for one user (to our knowledge).

Naatan commented 6 years ago

@ANSI-C could you execute the following in your Console widget (bottom pane):

var koDirSvc = Cc["@activestate.com/koDirs;1"].getService();
var pythonExe = koDirSvc.pythonExe;
console.log(pythonExe);
console.log(require("ko/shell").lookup(pythonExe));

I suspect the second console.log will give us some answers.

Thank you

ANSI-C commented 6 years ago

Hello: immagine

Naatan commented 6 years ago

Sorry, one more if you don't mind:

console.log(require("ko/shell").lookup("cmd"));
ANSI-C commented 6 years ago

immagine

Naatan commented 6 years ago

There we go. There's our problem. It seems Komodo cannot find your cmd.exe. It looks for this on your PATH and it uses the PATHEXT environment variable to determine the file extension. It sounds like one of four things is going on:

Could you investigate the above on your end?

ANSI-C commented 6 years ago

It turned out that there were duplicate entries in PATH, removed them, cleaned it up and now I can see the menu entry, thanks. Now I see this and forgot how to change the setting (I remember you gave me a console command to do it):

immagine

Naatan commented 6 years ago
require("ko/prefs").setLong("codeintel.symbolbrowser.max_filesize", 1000000);

Repurposed this ticket so that we can warn about cmd.exe not being found.

ANSI-C commented 6 years ago

It works now, thanks for help and patience, much appreciated!

The only remaining issue would be the code completion not working, despite module sources are being inserted in Languages->Perl->Additional Import Perl Directories and Default Perl Interpreter set to a direct valid path of ActivePerl: if I type "Module->" list of methods of Module.pm do not show up.

Naatan commented 6 years ago

Could you please report a new bug for this? We can only take one bug per report, otherwise it becomes impossible to keep track of individual bugs.

ANSI-C commented 6 years ago

Will do, thanks!