Navigation Menu

Skip to content
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

A certain popup string causes a crash (Windows, Linux) #1126

Closed
thevaliantx opened this issue Mar 1, 2016 · 12 comments
Closed

A certain popup string causes a crash (Windows, Linux) #1126

thevaliantx opened this issue Mar 1, 2016 · 12 comments

Comments

@thevaliantx
Copy link

Never seen that before. I rebooted the Linux Mint 17 machine and the problem persists.


Reproduction steps: #1126 (comment)

@FichteFoll
Copy link
Collaborator

What is your ST version?

Can you provide an exact reproduce sample?

Do you have packages installed, and if so, which? Does the problem go away when you disable them?

@thevaliantx
Copy link
Author

Build 3103

What do you mean by "exact reproduce sample"? If I do the following, it
will forceclose:

beans = ["green", <-- as soon as I type in the comma an press SPACE it
force closes. I just verified this by creating a test python file and
typing in:

beans = ["green", <-- CRASH

however, when I removed the only package (Anaconda) I had, the problem has
gone away.

On Tue, Mar 1, 2016 at 6:44 PM, FichteFoll notifications@github.com wrote:

What is your ST version?

Can you provide an exact reproduce sample?

Do you have packages installed, and if so, which? Does the problem go away
when you disable them?


Reply to this email directly or view it on GitHub
#1126 (comment)
.

@FichteFoll
Copy link
Collaborator

Hm, interesting. So it seems like the crash is caused by Anaconda. Technically ST should never crash, so this could be classified as a core bug, but the trigger is external.

@DamnWidget: Do you happen to know more about this?

@DamnWidget
Copy link

First notice @FichteFoll

@thevaliantx please, go to one of this places and gather log files from the external anaconda's server if any (depending of your operating system):

  • Linux: $HOME/.cache/jedi
  • OS X: $HOME/Library/Caches/Jedi
  • Windows: %APPDATA%\Jedi\Jedi

Paste it in gist, pastebin or similar and update this thread please.

@thevaliantx
Copy link
Author

I am a Linux newbie, so I just ran this:

cat anaconda_jsonserver.log > /home/thevaliantx/anaconda_jsonserver.log

and opened the file up in gedit, and copied the log details to:

http://pastebin.com/YWt3UGK5

Let me know if I can be of any other assistance.

thevaliantx

On Wed, Mar 2, 2016 at 7:13 AM, Oscar Campos notifications@github.com
wrote:

First notice @FichteFoll https://github.com/FichteFoll

@thevaliantx https://github.com/thevaliantx please, go to one of this
places and gather log files from the external anaconda's server if any
(depending of your operating system):

  • Linux: $HOME/.cache/jedi
  • OS X: $HOME/Library/Caches/Jedi
  • Windows: %APPDATA%\Jedi\Jedi

Paste it in gist, pastebin or similar and update this thread please.


Reply to this email directly or view it on GitHub
#1126 (comment)
.

@thevaliantx
Copy link
Author

I have found the Anaconda plugin, from a user perspective, to be rather
problematic.

  • constant flickering of the discoverability toolbox (unless all other
    plugins were disabled or removed)
  • buggy discoverability. One second its discovers a module method after I
    type in ".", a second later I could backspace over the '.', repeat entering
    the '.' and it would not discover the module method

On a side note, I have had issues with ST3 doing weird things with spaces
and tabs. I would open up a file (previously edited in ST3) in Geany and
get errors about improper indentation an have to use Geany's tab/space
correcting feature to fix things.

ST3 is a beautiful editor, but these sorts of things just kill the
experience for me.

thevaliantx

On Wed, Mar 2, 2016 at 11:25 AM, Not Known thevaliantx@gmail.com wrote:

I am a Linux newbie, so I just ran this:

cat anaconda_jsonserver.log > /home/thevaliantx/anaconda_jsonserver.log

and opened the file up in gedit, and copied the log details to:

http://pastebin.com/YWt3UGK5

Let me know if I can be of any other assistance.

thevaliantx

On Wed, Mar 2, 2016 at 7:13 AM, Oscar Campos notifications@github.com
wrote:

First notice @FichteFoll https://github.com/FichteFoll

@thevaliantx https://github.com/thevaliantx please, go to one of this
places and gather log files from the external anaconda's server if any
(depending of your operating system):

  • Linux: $HOME/.cache/jedi
  • OS X: $HOME/Library/Caches/Jedi
  • Windows: %APPDATA%\Jedi\Jedi

Paste it in gist, pastebin or similar and update this thread please.


Reply to this email directly or view it on GitHub
#1126 (comment)
.

@DamnWidget
Copy link

Hi @thevaliantx
I think ST3 is crashing due to a very large docstring (that you can find here: https://docs.python.org/2/library/stdtypes.html) that is then sent to the ST3 tooltip mechanism.

I don't know why you are getting a page from the Python documentation as tooltip docstring for bytearray, you should not. Are you sure you are not using any other package or feature (even if it's in your Python local installation)?

My suggestion for you is to totally disable tooltip support in anaconda settings display_signatures as false in your options until there is a fix from ST3 side.

About anaconda's specifics you can open new issues or discuss whatever aspect of the package that you wish in it's project page here at GitHub.

By the way @FichteFoll, there is some issue related to this problem in the anaconda's issues tracker but it has been already reported.

Anaconda's issue: DamnWidget/anaconda#335
SublimeTextIssues: #879

@thevaliantx
Copy link
Author

Then that just makes ST3 like any other ol' editor out there. No use to
me.

Blessings.

On Wed, Mar 2, 2016 at 12:20 PM, Oscar Campos notifications@github.com
wrote:

Hi @thevaliantx https://github.com/thevaliantx
I think ST3 is crashing due to a very large docstring (that you can find
here: https://docs.python.org/2/library/stdtypes.html) that is then sent
to the ST3 tooltip mechanism.

I don't know why you are getting a page from the Python documentation as
tooltip docstring for bytearray, you should not. Are you sure you are not
using any other package or feature (even if it's in your Python local
installation)?

My suggestion for you is totally disable tooltip support in anaconda
setting display_signatures as false in your options until there is a fix
from ST3 side.

About anaconda's specifics you can open new issues or discuss whatever
aspect of the package that you wish in it's project page
https://github.com/DamnWidget/anaconda here at GitHub.


Reply to this email directly or view it on GitHub
#1126 (comment)
.

@DamnWidget
Copy link

I don't understand why you say that, Sublime Text 3 didn't had any tooltip feature for years and it was still a great editor. You can still check the documentation for any word under your cursor using the command Anaconda: Display object Docs or using the default Linux shortcut ctrl+alt+d, a bottom panel will open with the documentation so you can review it.

@FichteFoll
Copy link
Collaborator

Indeed, I can confirm that ST crashes with the following code (run from console or command)

view.show_popup("None\n<br>Mutable Sequence Types<br>**********************<br><br>List and ``bytearray`` objects support additional operations that<br>allow in-place modification of the object. Other mutable sequence<br>types (when added to the language) should also support these<br>operations. Strings and tuples are immutable sequence types: such<br>objects cannot be modified once created. The following operations are<br>defined on mutable sequence types (where *x* is an arbitrary object):<br><br>+--------------------------------+----------------------------------+-----------------------+<br>| Operation                      | Result                           | Notes                 |<br>+================================+==================================+=======================+<br>| ``s[i] = x``                   | item *i* of *s* is replaced by   |                       |<br>|                                | *x*                              |                       |<br>+--------------------------------+----------------------------------+-----------------------+<br>| ``s[i:j] = t``                 | slice of *s* from *i* to *j* is  |                       |<br>|                                | replaced by the contents of the  |                       |<br>|                                | iterable *t*                     |                       |<br>+--------------------------------+----------------------------------+-----------------------+<br>| ``del s[i:j]``                 | same as ``s[i:j] = []``          |                       |<br>+--------------------------------+----------------------------------+-----------------------+<br>| ``s[i:j:k] = t``               | the elements of ``s[i:j:k]`` are | (1)                   |<br>|                                | replaced by those of *t*         |                       |<br>+--------------------------------+----------------------------------+-----------------------+<br>| ``del s[i:j:k]``               | removes the elements of          |                       |<br>|                                | ``s[i:j:k]`` from the list       |                       |<br>+--------------------------------+----------------------------------+-----------------------+<br>| ``s.append(x)``                | same as ``s[len(s):len(s)] =     | (2)                   |<br>|                                | [x]``                            |                       |<br>+--------------------------------+----------------------------------+-----------------------+<br>| ``s.extend(x)``                | same as ``s[len(s):len(s)] = x`` | (3)                   |<br>+--------------------------------+----------------------------------+-----------------------+<br>| ``s.count(x)``                 | return number of *i*'s for which |                       |<br>|                                | ``s[i] == x``                    |                       |<br>+--------------------------------+----------------------------------+-----------------------+<br>| ``s.index(x[, i[, j]])``       | return smallest *k* such that    | (4)                   |<br>|                                | ``s[k] == x`` and ``i <= k < j`` |                       |<br>+--------------------------------+----------------------------------+-----------------------+<br>| ``s.insert(i, x)``             | same as ``s[i:i] = [x]``         | (5)                   |<br>+--------------------------------+----------------------------------+-----------------------+<br>| ``s.pop([i])``                 | same as ``x = s[i]; del s[i];    | (6)                   |<br>|                                | return x``                       |                       |<br>+--------------------------------+----------------------------------+-----------------------+<br>| ``s.remove(x)``                | same as ``del s[s.index(x)]``    | (4)                   |<br>+--------------------------------+----------------------------------+-----------------------+<br>| ``s.reverse()``                | reverses the items of *s* in     | (7)                   |<br>|                                | place                            |                       |<br>+--------------------------------+----------------------------------+-----------------------+<br>| ``s.sort([cmp[, key[,          | sort the items of *s* in place   | (7)(8)(9)(10)         |<br>| reverse]]])``                  |                                  |                       |<br>+--------------------------------+----------------------------------+-----------------------+<br><br>Notes:<br><br>1. *t* must have the same length as the slice it is  replacing.<br><br>2. The C implementation of Python has historically accepted multiple<br>   parameters and implicitly joined them into a tuple; this no longer<br>   works in Python 2.0.  Use of this misfeature has been deprecated<br>   since Python 1.4.<br><br>3. *x* can be any iterable object.<br><br>4. Raises ``ValueError`` when *x* is not found in *s*. When a negative<br>   index is passed as the second or third parameter to the ``index()``<br>   method, the list length is added, as for slice indices.  If it is<br>   still negative, it is truncated to zero, as for slice indices.<br><br>   Changed in version 2.3: Previously, ``index()`` didn't have<br>   arguments for specifying start and stop positions.<br><br>5. When a negative index is passed as the first parameter to the<br>   ``insert()`` method, the list length is added, as for slice<br>   indices.  If it is still negative, it is truncated to zero, as for<br>   slice indices.<br><br>   Changed in version 2.3: Previously, all negative indices were<br>   truncated to zero.<br><br>6. The ``pop()`` method's optional argument *i* defaults to ``-1``, so<br>   that by default the last item is removed and returned.<br><br>7. The ``sort()`` and ``reverse()`` methods modify the list in place<br>   for economy of space when sorting or reversing a large list.  To<br>   remind you that they operate by side effect, they don't return the<br>   sorted or reversed list.<br><br>8. The ``sort()`` method takes optional arguments for controlling the<br>   comparisons.<br><br>   *cmp* specifies a custom comparison function of two arguments (list<br>   items) which should return a negative, zero or positive number<br>   depending on whether the first argument is considered smaller than,<br>   equal to, or larger than the second argument: ``cmp=lambda x,y:<br>   cmp(x.lower(), y.lower())``.  The default value is ``None``.<br><br>   *key* specifies a function of one argument that is used to extract<br>   a comparison key from each list element: ``key=str.lower``.  The<br>   default value is ``None``.<br><br>   *reverse* is a boolean value.  If set to ``True``, then the list<br>   elements are sorted as if each comparison were reversed.<br><br>   In general, the *key* and *reverse* conversion processes are much<br>   faster than specifying an equivalent *cmp* function.  This is<br>   because *cmp* is called multiple times for each list element while<br>   *key* and *reverse* touch each element only once.  Use<br>   ``functools.cmp_to_key()`` to convert an old-style *cmp* function<br>   to a *key* function.<br><br>   Changed in version 2.3: Support for ``None`` as an equivalent to<br>   omitting *cmp* was added.<br><br>   Changed in version 2.4: Support for *key* and *reverse* was added.<br><br>9. Starting with Python 2.3, the ``sort()`` method is guaranteed to be<br>   stable.  A sort is stable if it guarantees not to change the<br>   relative order of elements that compare equal --- this is helpful<br>   for sorting in multiple passes (for example, sort by department,<br>   then by salary grade).<br><br>10. **CPython implementation detail:** While a list is being sorted,<br>    the effect of attempting to mutate, or even inspect, the list is<br>    undefined.  The C implementation of Python 2.3 and newer makes the<br>    list appear empty for the duration, and raises ``ValueError`` if<br>    it can detect that the list has been mutated during a sort.<br>")

I wonder what the "exact cause" is, but that should be enough to be able to narrow it down for anyone investigating further.

#1009 might be related.

@FichteFoll FichteFoll changed the title pressing ',' after enter a string item in a Python list force closes Sublime Text 3 A certain popup string causes a crash Mar 3, 2016
@wbond
Copy link
Member

wbond commented May 5, 2016

Does not seem to affect OS X, but does affect Windows build 3112.

@wbond wbond modified the milestones: Build 3100, Build 3113 May 6, 2016
@wbond wbond added the R: fixed label May 6, 2016
@wbond
Copy link
Member

wbond commented May 6, 2016

This should be fixed in build 3113.

@wbond wbond closed this as completed May 6, 2016
@FichteFoll FichteFoll changed the title A certain popup string causes a crash A certain popup string causes a crash (Windows) May 8, 2016
@FichteFoll FichteFoll changed the title A certain popup string causes a crash (Windows) A certain popup string causes a crash (Windows, Linux) May 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants