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

Math domain error and a logic problem in CodeIntel #796

Closed
Defman21 opened this Issue Nov 4, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@Defman21
Contributor

Defman21 commented Nov 4, 2015

Happens for me with a clean profile when picking PHP file type.
The log:

[2015-11-04 17:37:37,122] [INFO] Startup: Welcome to Komodo IDE 9.3.0 build 88117 (platform linux-x86_64, running on Linux 4.2.0-17-generic version #21-Ubuntu SMP Fri Oct 23 19:56:16 UTC 2015)
[2015-11-04 17:37:37,122] [INFO] Startup: /usr/bin/python built on Thu Oct 29 11:07:23 2015
[2015-11-04 17:37:37,133] [WARNING] koEnviron: skipping environment string: '"'><;|&(:'
[2015-11-04 17:37:37,468] [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
[2015-11-04 17:37:37,558] [WARNING] root: ko.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

[2015-11-04 17:37:38,434] [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:///home/defman/Komodo-IDE-9/lib/mozilla/components/koamAddonManager.js:138
[2015-11-04 17:37:38,488] [WARNING] keybindings: [Ctrl+0] was used for 'cmd_goToQuickBookmark_0', overriding to use 'cmd_fontZoomReset'
[2015-11-04 17:37:38,810] [WARNING] koSkin: Detected GTK theme via libgtk: Iris
[2015-11-04 17:37:41,261] [ERROR] console-logger: While trying to require("spellcheck/spellcheck"): (0) in chrome://komodo/content/jetpack.js:156
Traceback (most recent call last):
  File "chrome://komodo/content/jetpack.js", line 156, in 

[2015-11-04 17:37:41,262] [ERROR] console-logger: Module `spellcheck/spellcheck` is not found at resource://gre/modules/commonjs/spellcheck/spellcheck.js (0) in chrome://komodo/content/jetpack.js:157
Traceback (most recent call last):
  File "chrome://komodo/content/jetpack.js", line 157, in 

[2015-11-04 17:37:41,263] [ERROR] console-logger: require@chrome://komodo/content/jetpack.js:154:20
doUpdateUI/this.spellcheck_timeout<@viewbufferbase:1150:25
 (0) in chrome://komodo/content/jetpack.js:160
Traceback (most recent call last):
  File "chrome://komodo/content/jetpack.js", line 160, in 

[2015-11-04 17:37:41,577] [INFO] elastic_tabstops: Elastic tabstops loaded.
[2015-11-04 17:37:41,657] [INFO] komodospellchecker: Spell checker loaded.
[2015-11-04 17:37:41,658] [INFO] komodospellchecker: Using dictionary en-US
[2015-11-04 17:37:45,313] [WARNING] views: Inconsistent view count in view_closed event
[2015-11-04 17:37:45,398] [WARNING] views: Inconsistent view count in view_opened event
[2015-11-04 17:38:12,184] [WARNING] console-logger: Key event not available on some keyboard layouts: key="v" modifiers="control,alt" (1) in chrome://komodo/content/komodo.xul:0
[2015-11-04 17:38:13,851] [ERROR] codeintel.oop.driver: style_at_pos binary search sentinel hit: there is likely a logic problem here!
Traceback (most recent call last):
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 564, in run
    handler.handleRequest(request, self)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 622, in handleRequest
    meth(request, driver)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 907, in do_get_scopes
    scopes = self._do_get_scopes_aux(buf, pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 912, in _do_get_scopes_aux
    scoperef = buf.scoperef_from_pos(pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/udl.py", line 303, in scoperef_from_pos
    lang = self.lang_from_pos(pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/udl.py", line 217, in lang_from_pos
    style = self.accessor.style_at_pos(pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/accessor.py", line 165, in style_at_pos
    return self._token_at_pos(pos)["style"]
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/accessor.py", line 161, in _token_at_pos
    raise CodeIntelError("style_at_pos binary search sentinel hit: "
CodeIntelError: style_at_pos binary search sentinel hit: there is likely a logic problem here!
[2015-11-04 17:38:13,854] [ERROR] koCodeIntel: style_at_pos binary search sentinel hit: there is likely a logic problem here!
Traceback (most recent call last):
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 564, in run
    handler.handleRequest(request, self)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 622, in handleRequest
    meth(request, driver)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 907, in do_get_scopes
    scopes = self._do_get_scopes_aux(buf, pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 912, in _do_get_scopes_aux
    scoperef = buf.scoperef_from_pos(pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/udl.py", line 303, in scoperef_from_pos
    lang = self.lang_from_pos(pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/udl.py", line 217, in lang_from_pos
    style = self.accessor.style_at_pos(pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/accessor.py", line 165, in style_at_pos
    return self._token_at_pos(pos)["style"]
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/accessor.py", line 161, in _token_at_pos
    raise CodeIntelError("style_at_pos binary search sentinel hit: "
CodeIntelError: style_at_pos binary search sentinel hit: there is likely a logic problem here!

[2015-11-04 17:38:15,812] [ERROR] codeintel.oop.driver: math domain error
Traceback (most recent call last):
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 564, in run
    handler.handleRequest(request, self)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 622, in handleRequest
    meth(request, driver)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 907, in do_get_scopes
    scopes = self._do_get_scopes_aux(buf, pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 912, in _do_get_scopes_aux
    scoperef = buf.scoperef_from_pos(pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/udl.py", line 303, in scoperef_from_pos
    lang = self.lang_from_pos(pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/udl.py", line 217, in lang_from_pos
    style = self.accessor.style_at_pos(pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/accessor.py", line 165, in style_at_pos
    return self._token_at_pos(pos)["style"]
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/accessor.py", line 145, in _token_at_pos
    for iter_count in range(int(math.ceil(math.log(upper, 2)) + 1)):
ValueError: math domain error
[2015-11-04 17:38:15,818] [ERROR] koCodeIntel: math domain error
Traceback (most recent call last):
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 564, in run
    handler.handleRequest(request, self)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 622, in handleRequest
    meth(request, driver)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 907, in do_get_scopes
    scopes = self._do_get_scopes_aux(buf, pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/oop/driver.py", line 912, in _do_get_scopes_aux
    scoperef = buf.scoperef_from_pos(pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/udl.py", line 303, in scoperef_from_pos
    lang = self.lang_from_pos(pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/udl.py", line 217, in lang_from_pos
    style = self.accessor.style_at_pos(pos)
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/accessor.py", line 165, in style_at_pos
    return self._token_at_pos(pos)["style"]
  File "/home/defman/Komodo-IDE-9/lib/mozilla/python/komodo/codeintel2/accessor.py", line 145, in _token_at_pos
    for iter_count in range(int(math.ceil(math.log(upper, 2)) + 1)):
ValueError: math domain error

[2015-11-04 17:38:22,909] [WARNING] codeintel.php: _handleTraitResolution:: not in a class|trait definition
[2015-11-04 17:38:22,910] [WARNING] codeintel.php: _handleTraitResolution:: not in a class|trait definition
[2015-11-04 17:38:22,911] [WARNING] codeintel.php: _handleTraitResolution:: not in a class|trait definition
[2015-11-04 17:38:23,475] [WARNING] codeintel.php: _handleTraitResolution:: not in a class|trait definition
[2015-11-04 17:38:23,522] [WARNING] codeintel.php: _handleTraitResolution:: not in a class|trait definition
[2015-11-04 17:38:36,525] [WARNING] notify: Notification panel has already been removed, callback is likely called twice
[2015-11-04 17:38:39,113] [WARNING] console-logger: Key event not available on some keyboard layouts: key="v" modifiers="control,alt" (1) in chrome://komodo/content/tail/tail.xul:0
@Naatan

This comment has been minimized.

Member

Naatan commented Nov 4, 2015

Reference: #768

@Naatan Naatan added the Type: Bug label Nov 4, 2015

@Naatan Naatan added this to the 9.4 milestone Nov 4, 2015

@Defman21

This comment has been minimized.

Contributor

Defman21 commented Nov 9, 2015

Navigating to the EOF triggers this again.

Just an useful info.

@Naatan

This comment has been minimized.

Member

Naatan commented Nov 13, 2015

Reopening this so that it's integrated to 9.3.2, please do not integrate until 9.3.1 is out the door.

@Naatan Naatan modified the milestones: 9.3.2, 9.4 Nov 13, 2015

@Naatan Naatan reopened this Nov 13, 2015

mitchell-as added a commit that referenced this issue Nov 19, 2015

fix: codeintel: Buffers with only one token should not cause errors a…
…nymore - fixes #796

rn=

(integrated from master branch change 9.2.1-682-gf1b2d39 by Mitchell <mitchellb@activestate.com>)
@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Nov 19, 2015

Merged for 9.3.2 release.

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