Komodo IDE and Code Intelligence

Posted by boxed on 2013-10-14 06:41

Greetings,

The short:
I couldn't get code intelligence to work in Komodo edit 8.5.
My question is:
If I were to install the Komodo IDE trial, would I most likely have the same issue?

The long:
I have been using Komodo Edit 8.5 for a month or so on Windows 7 Enterprise. The entire time I've not been able to get autosuggestion/completion to work for php, Javascript, my own project, etc.

I spent many hours last week trying to make it happen and just could not get it to cooperate. I found and tried many suggested solutions on the forums including: reinstalling, resetting the profile, adding my directories under the languages, using the nightly build, etc.

Finally I gave up and installed 8.0.2.

I enjoy Komodo and there is the potential of purchasing the IDE, but I don't want to struggle trying to get the code intelligence to work.

Is this bug common across Edit and IDE?

Thanks

kalvaro | Tue, 2013-10-15 00:10

I understand code intelligence works fine for you in 8.0.2, doesn't it? If so, I suggest you stick to 8.0 (Edit or IDE) by now. There're several reports like yours in 8.5 (Edit or IDE), including myself.

nathanri
ActiveState Staff
Tue, 2013-10-15 07:53

Were you using Komodo Edit 8.5.0 or 8.5.1? It is known that 8.5.0 has a bug where codeintel may stop working, which has been fixed in 8.5.1. If you were previously using 8.5.0 then I would suggest updating to the latest release.

kalvaro | Tue, 2013-10-15 09:23

Code intelligence is still broken in 8.5.1. Perhaps it's a different issue but the effect is the same.

boxed | Wed, 2013-10-16 06:11

Thanks for the replies,

Yes, I tried the nightly build which was the freshest at the time(Komodo-Edit-8.5.2-13784). It fixed it and then I set up the IDE the way I like it and it was back to being broken.

I was more interested as to if this bug is also present in Komodo IDE not just Komodo Edit. I want to install the trial and give the IDE a try, but I don't want to mess up my Komodo Edit 8.0.x.

nathanri
ActiveState Staff
Wed, 2013-10-16 09:15

You can safely install Komodo IDE 8.5 without messing up your Edit install.

Could you check whether your error log has any relevant errors when codeintel fails? It's under Help > Troubleshooting > View Log File

boxed | Wed, 2013-10-16 11:54

I installed the IDE trial: Komodo IDE, version 8.5.1, build 82367, platform win32-x86

The code intelligence does not work.

I have the specific directory picked in the Preferences->Languages->PHP->PHP Directories.
Preferences->Code Intelligence->Enable automatic autocomplete.. is checked.
Preferences->Code Intelligence->Enable autocomplete fill-up characters is checked.
Preferences->Code Intelligence->Include all files and directories from the project base directory is checked.
Preferences->Code Intelligence->API Catalogs has nothing checked

In the past I deleted my profiles and still received the same errors.
I also previously tried a nightly build of Edit, 8.5.2 build 13xxx, with the same errors.

I have received numerous error messages over the past couple of months. Here is one that I receive when I try to access a class file I created in my currently selected project:

[2013-10-16 13:39:42,875] [WARNING] codeintel.db: the following catalog selections didn't match any loaded API catalog: 'pywin32 (Python3)', 'C:\Program Files (x86)\ActiveState Komodo Edit 8\lib\mozilla\python\komodo\codeintel2\catalogs\jquery.cix'

Here is one for trying to get CodeIntelligence for just php working:

[2013-10-16 13:39:57,477] [ERROR] koAppInfo: could not determine PHP version number for 'C:\php\php.exe':
----

----
[2013-10-16 13:39:57,477] [ERROR] koAppInfo: Failed to check version of executable C:\php\php.exe
Traceback (most recent call last):
File "C:\Program Files (x86)\ActiveState Komodo IDE 8\lib\mozilla\components\koAppInfo.py", line 190, in _isValidExecutable
isvalid = self._isValidExecutableVersion(exe)
File "C:\Program Files (x86)\ActiveState Komodo IDE 8\lib\mozilla\components\koAppInfo.py", line 162, in _isValidExecutableVersion
versionParts = invocationutils.split_short_ver(ver, intify=True)
File "C:\Program Files (x86)\ActiveState Komodo IDE 8\lib\mozilla\python\komodo\invocationutils.py", line 94, in split_short_ver
raise ValueError("%r is not a valid short version string" % ver_str)
ValueError: '' is not a valid short version string
[2013-10-16 13:39:57,584] [ERROR] koAppInfo: could not determine PHP version number for 'C:\php\php.exe':
----

----

The same profile settings in Komodo Edit 8.0.2 has working code intelligence for both my project and php.

I have to admit I miss using 8.5's minimap vs. 8.0's minimap.

Thanks.

toddw
ActiveState Staff
Thu, 2013-10-17 14:14

We'd certainly like to solve the problem. Could you provide the output from these two commands:
C:\php\php.exe --version
C:\php\php.exe -i (just need the first 50 lines)

Thanks,
Todd

boxed | Fri, 2013-10-18 10:50

Still not much success. No code intelligence for PHP or my own codebase.

I did the above two commands.

PHP flipped out on me because it isn't properly set up on my local machine. And I don't have access to point to the php directory on the server.

The fix I implemented for Komodo Edit 8.0.x was to just copy over a handful of files from the server, mainly php.ini and php.exe. This caused my 8.0.x to work properly.

To remedy the situation on Komodo 8.5.x, I found the version of PHP we're using(5.2.5) in the php archives online. I dumped it into the directory while maintaining the same php.ini as our server.

I'm not a php/web server genius so I might have introduced more complication by doing this.

Under Preferences->Languages->PHP->Debugger Configuration it now says: "WARNING! Failed to configure for local PHP debugging. See Komodo's PHP Debugging documentation for trouble shooting."

Now it isn't spitting anything out in the log other than when I try to use code intell from my own project:
[2013-10-18 08:54:55,986] [WARNING] codeintel.db: the following catalog selections didn't match any loaded API catalog: 'pywin32 (Python3)', 'C:\Program Files (x86)\ActiveState Komodo Edit 8\lib\mozilla\python\komodo\codeintel2\catalogs\jquery.cix'

I type, ClassName::, and let it sit there for about 20-30 seconds. Then it pops up with the codeintell and throws the above error to the log.

Maybe I could try installing Komodo IDE 8.0.x, I just don't know what features are different for Edit->IDE and from IDE 8.0 -> 8.5.

The cmd calls after I dumped 8.2.5 into the directory Komodo points to:

C:\php>php.exe --version
PHP 5.2.5 (cli) (built: Nov  8 2007 23:18:51)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

C:\php>php.exe -i /p
phpinfo()
PHP Version => 5.2.5

System => Windows NT MINENOTYOURS 6.1 build 7601
Build Date => Nov  8 2007 23:18:08
Configure Command => cscript /nologo configure.js  "--enable-snapshot-build" "--
with-gd=shared"
Server API => Command Line Interface
Virtual Directory Support => enabled
Configuration File (php.ini) Path => C:\Windows
Loaded Configuration File => C:\php\php.ini
PHP API => 20041225
PHP Extension => 20060613
Zend Extension => 220060519
Debug Build => no
Thread Safety => enabled
Zend Memory Manager => enabled
IPv6 Support => enabled
Registered PHP Streams => php, file, data, http, ftp, compress.zlib, https, ftps
, zip
Registered Stream Socket Transports => tcp, udp, ssl, sslv3, sslv2, tls
Registered Stream Filters => convert.iconv.*, string.rot13, string.toupper, stri
ng.tolower, string.strip_tags, convert.*, consumed, zlib.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

 _______________________________________________________________________

Configuration

PHP Core

Directive => Local Value => Master Value
allow_call_time_pass_reference => Off => Off
allow_url_fopen => On => On
allow_url_include => Off => Off
always_populate_raw_post_data => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
asp_tags => Off => Off
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => no value => no value
default_mimetype => text/html => text/html
define_syslog_variables => Off => Off
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => STDOUT => STDOUT
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => On => On
error_append_string => no value => no value
error_log => phperrors.log
error_prepend_string => no value => no value
error_reporting => 6135 => 6135
expose_php => On => On
extension_dir => C:\PHP\ext => C:\PHP\ext
file_uploads => On => On
highlight.bg => <font style="color: #FFFFFF">#FFFFFF</font> => <font style="colo
r: #FFFFFF">#FFFFFF</font>
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style=
"color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style=
"color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="co
lor: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style=
"color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="
color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .;C:\php5\pear => .;C:\php5\pear
log_errors => On => On
log_errors_max_len => 0 => 0
magic_quotes_gpc => Off => Off
magic_quotes_runtime => Off => Off
magic_quotes_sybase => Off => Off
mail.force_extra_parameters => no value => no value
max_execution_time => 0 => 0
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
memory_limit => 128M => 128M
open_basedir => no value => no value
output_buffering => 0 => 0
output_handler => no value => no value
post_max_size => 100M => 100M
precision => 14 => 14
realpath_cache_size => 16K => 16K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
register_globals => Off => Off
register_long_arrays => Off => Off
report_memleaks => On => On
report_zend_debug => Off => Off
safe_mode => Off => Off
safe_mode_exec_dir => no value => no value
safe_mode_gid => Off => Off
safe_mode_include_dir => no value => no value
sendmail_from => no value => no value
sendmail_path => no value => no value
serialize_precision => 100 => 100
short_open_tag => Off => Off
SMTP => 147.145.1.30 => 147.145.1.30
smtp_port => no value => no value
sql.safe_mode => Off => Off
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 50M => 50M
upload_tmp_dir => F:\Data\uploadtemp => F:\Data\uploadtemp
user_dir => no value => no value
variables_order => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
y2k_compliance => On => On
zend.ze1_compatibility_mode => Off => Off

boxed | Fri, 2013-10-18 10:49

I managed to get a copy of the php running on our server exactly. 8.5.x still hates me. :(

C:\PHP>php.exe --version
PHP 5.2.5 (cli) (built: Nov  8 2007 23:32:47)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

C:\PHP>php.exe -i
phpinfo()
PHP Version => 5.2.5

System => Windows NT MINE-PC 6.1 build 7601
Build Date => Nov  8 2007 23:32:05
Configure Command => cscript /nologo configure.js  "--enable-snapshot-build" "--
with-gd=shared" "--disable-zts" "--disable-isapi" "--disable-activescript"
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => C:\Windows
Loaded Configuration File => C:\PHP\php.ini
PHP API => 20041225
PHP Extension => 20060613
Zend Extension => 220060519
Debug Build => no
Thread Safety => disabled
Zend Memory Manager => enabled
IPv6 Support => enabled
Registered PHP Streams => php, file, data, http, ftp, compress.zlib, sqlsrv, htt
ps, ftps, ssh2.shell, ssh2.exec, ssh2.tunnel, ssh2.scp, ssh2.sftp, zip
Registered Stream Socket Transports => tcp, udp, ssl, sslv3, sslv2, tls
Registered Stream Filters => convert.iconv.*, string.rot13, string.toupper, stri
ng.tolower, string.strip_tags, convert.*, consumed, zlib.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

 _______________________________________________________________________

Configuration

PHP Core

Directive => Local Value => Master Value
allow_call_time_pass_reference => Off => Off
allow_url_fopen => On => On
allow_url_include => Off => Off
always_populate_raw_post_data => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
asp_tags => Off => Off
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => no value => no value
default_mimetype => text/html => text/html
define_syslog_variables => Off => Off
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => STDOUT => STDOUT
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => On => On
error_append_string => no value => no value
error_log => F:\Data\iislogs\phperrors\phperrors.log => F:\Data\iislogs\phperror
s\phperrors.log
error_prepend_string => no value => no value
error_reporting => 6135 => 6135
expose_php => On => On
extension_dir => C:\PHP\ext => C:\PHP\ext
file_uploads => On => On
highlight.bg => <font style="color: #FFFFFF">#FFFFFF</font> => <font style="colo
r: #FFFFFF">#FFFFFF</font>
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style=
"color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style=
"color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="co
lor: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style=
"color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="
color: #DD0000">#DD0000</font>

boxed | Mon, 2013-10-21 06:23

This thread should probably be moved to support. My original intent wasn't exactly to fix Komodo.

I installed Komodo-IDE-8.5.3-82628.msi and php/my own classes would not autocomplete/calltip/code intell.

I installed Komodo-IDE-8.0.2-78971.msi and everything works well.

Something about 8.5 hates my computer.

Thanks for the help.

cgchoffman
ActiveState Staff
Tue, 2013-10-22 17:44

You are currently getting support :) Two of the participants are on the Komodo development team. The commands Toddw requested you run were not intended to fix the issue but to gather further information. Thanks for cooperating. This issue is VERY high priority for our team.

Cheers,

- Carey

orangeaid | Tue, 2013-10-22 05:25

I have tried versions:

  • 8.5.0
  • 8.5.1
  • 8.5.2

and I get massive delays in the presentation of CallTips / AutoComplete

With each release, I have ended up reverting back to v8.0.2 - so that I can be productive.

Hope this issue gets fixed soon, as I have always rated ActiveState's products highly.

orangeaid | Tue, 2013-10-22 05:35

P.S.
My OS is Windows 7
I am using the free version - Komodo Edit

technoh | Wed, 2013-10-23 11:48

I am using Komodo IDE 8.5.2 (previously 8.5.1, I updated today after reading this thread) and I have the same issue. I code in PHP, Javascript and HTML and I cannot get any code intelligence to work. Code completion (Ctrl + Space) works well but Code intel does not.

Here is the content of my log file:

[2013-10-23 14:38:21,108] [WARNING] codeintel.oop.driver.Environment.sidebar.php: Warning: no way to trigger new prefs
[2013-10-23 14:38:21,265] [WARNING] root: ko.findresults was already loaded, re-creating it.

[2013-10-23 14:38:21,354] [WARNING] codeintel.oop.driver.Environment.loop.php: Warning: no way to trigger new prefs
[2013-10-23 14:38:21,375] [DEBUG] places_js: waiting for document complete
[2013-10-23 14:38:27,197] [WARNING] codeintel.oop.driver.Environment.sidebar.php: Warning: no way to trigger new prefs
[2013-10-23 14:38:27,197] [WARNING] codeintel.oop.driver.Environment.sidebar.php: Warning: no way to trigger new prefs
[2013-10-23 14:38:27,197] [WARNING] codeintel.oop.driver.Environment.sidebar.php: Warning: no way to trigger new prefs
[2013-10-23 14:38:27,197] [WARNING] codeintel.oop.driver.Environment.sidebar.php: Warning: no way to trigger new prefs
[2013-10-23 14:38:27,197] [WARNING] codeintel.oop.driver.Environment.sidebar.php: Warning: no way to trigger new prefs
[2013-10-23 14:38:27,198] [WARNING] codeintel.oop.driver.Environment.sidebar.php: Warning: no way to trigger new prefs
[2013-10-23 14:38:27,198] [WARNING] codeintel.oop.driver.Environment.sidebar.php: Warning: no way to trigger new prefs
[2013-10-23 14:38:27,200] [WARNING] codeintel.oop.driver.Environment.sidebar.php: Warning: no way to trigger new prefs
[2013-10-23 14:38:27,339] [WARNING] process: `GetStdHandle(STD_INPUT_HANDLE)` != 3: something has changed w.r.t. std handle inheritance in Komodo that may affect subprocess launching

I already tried to recreate the preferences and code intel (e.g. I renamed the whole AppData\Local\ActiveState\KomodoIDE directory to KomodoIDE.bak) but that did not fix the problem. I completely uninstalled and reinstalled Komodo IDE 8.5.2 but that did not fix the problem. I would love to use Komodo 8.0.2 instead but I cannot find the installation file anywhere. Can anyone point me to a working link? Code intel is one of the main reasons I use Komodo IDE; not having it really hurts my productivity.

Any help is welcome. Thanks!

technoh | Wed, 2013-10-23 12:16

Code intelligence seems to work if I open Komodo IDE and open a PHP file without opening or creating a project. If I open a project then it stops working and I have to exit Komodo IDE and restart it for code intelligence to work again.

toddw
ActiveState Staff
Fri, 2013-10-25 12:26

Hi Technoh,

Interesting, it could be that Komodo's code intelligence is running into a problem when scanning your project PHP files.

It would be of great assistance if you could try installing the following Komodo (nightly) build (ensure you install it into a different directory than your other Komodo installs):
http://downloads.activestate.com/Komodo/nightly/komodoide/latest-8.5.3/

And then run the following command (from the command prompt) to start Komodo:
C:\Program Files (x86)\ActiveState Komodo IDE 8 nightly\komodo.exe --raw -log codeintel.komodo:INFO -log codeintel.db:INFO

which should output a lot more log information, to help track down where this is going wrong.

BTW, you might want to start a bug on this here:
http://bugs.activestate.com/enter_bug.cgi?product=Komodo
as it's better to keep track of issues there (and better for log attachments).

Thanks,
Todd

technoh | Mon, 2014-01-20 08:39

A little late but I noticed I still have the same issue. I am using 8.5.3, build 83298, should I still try to download the latest-8.5.3 and open a bug with the complete log files?

cgchoffman
ActiveState Staff
Mon, 2014-01-20 12:05

If you're going to file a bug, file it running the the latest Komod code (build).

- Carey

orangeaid | Tue, 2014-01-21 03:47

So, does that mean that this bug is being addressed in the 8.5.4 build?

technoh | Wed, 2014-01-22 12:35

Sadly, unless I'm mistaken, the latest Komodo builds do not include a Windows version and since I use the Windows version I am stuck with versions that include a Windows installer. Or is there a way to install the latest builds on Windows without affecting the official release already installed?

toddw
ActiveState Staff
Wed, 2014-01-22 14:19

The Windows nightly build is now included again (a glitch with the build at that time).
http://downloads.activestate.com/Komodo/nightly/komodoide/latest/
http://downloads.activestate.com/Komodo/nightly/komodoedit/latest/

Yes, you can install the nightly build without affecting the official release (just install to a different directory).

Cheers,
Todd

orangeaid | Tue, 2014-01-21 03:45

I had installed v 8.5.3 of Komodo Edit, and thought for a while that the issue had been fixed. However, the issue had just been improved upon. I wasn't getting the delays in autocomplete and calltips. However there seemed to be an issue with the scanning to include up-to-date functions/properties/methods. There were a whole load of new functions etc. simply not included in the lists. Hence, I yet again reverted back to v8.0.2 - which works just fine. It seems a shame that the basics are not working for the sake of some new functionality or eye-candy that I am not using or benefiting from. No doubt other developers are happy to see the new features, but I would prefer a product that delivers it's core assets

kalvaro | Thu, 2013-10-24 05:25

orangeaid | Thu, 2013-10-24 07:54