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

Crash on selection #20

Closed
corcillo opened this issue Jun 12, 2015 · 8 comments
Closed

Crash on selection #20

corcillo opened this issue Jun 12, 2015 · 8 comments

Comments

@corcillo
Copy link

I just installed the elm language support package via sublime 2 package control. Sublime kept crashing when I would highlight the elm code in sublime, and I traced it back to the language support plugin code, specifically in Elm Language Support.py's get_type(view) function.

I was getting this stack trace on the error:

Traceback (most recent call last):
File "./sublime_plugin.py", line 200, in on_selection_modified
File "./sublime_plugin.py", line 154, in run_timed_function
File "./sublime_plugin.py", line 199, in
File "./Elm Language Support.py", line 346, in on_selection_modified
File "./Elm Language Support.py", line 312, in get_type
File "./Elm Language Support.py", line 253, in modules_in_scope
File "./Elm Language Support.py", line 260, in current_module_name
IndexError: list index out of range

Here is a screenshot of some code that when highlighted caused the crash:

screen shot 2015-06-12 at 11 42 04 am

Any thoughts? I temporarily stopped the crashes by commenting out the get_type function, which I'm assuming will cause problems in the future.

@ryanmtaylor
Copy link

This happens to me too! It makes your (amazing) plugin unusable.

@corcillo
Copy link
Author

@ryanmtaylor if you comment out what's inside the get_type(view) function in Elm Language Support.py it will stop crashing. I've been using it like that for the past few days and it seems to work fine. It looks like all that function does is find the type signature of the word under the cursor.

@ryanmtaylor
Copy link

@corcillo totally! I read your comment and added a comment and return statement to the top, so same thing. Commenting out the method and everywhere that calls it might be easier though with sublime's with cmd+D.

It works perfectly now.

@deadfoxygrandpa
Copy link
Owner

Hi guys, sorry I haven't commented on this yet. I have a 3 day weekend
starting tonight and I'll totally look into this! Thanks for letting me
know.

On Fri, Jun 19, 2015 at 8:09 AM, Ryan M Taylor notifications@github.com
wrote:

@corcillo https://github.com/corcillo totally! I read your comment and
added a comment and return statement to the top, although commenting out
the method and everywhere that calls it might arguably make more sense...

It works perfectly now.


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

@ryanb
Copy link

ryanb commented Jul 30, 2015

I ran into this as well. Is there an update on the status?

@ryanmtaylor
Copy link

When I got Sublime 3 I didn't need to edit any source code.

@deadfoxygrandpa
Copy link
Owner

Sorry for the delay. I looked into it today and figured out the problem. I'll push an update to fix it.

@deadfoxygrandpa
Copy link
Owner

This should be fixed in the newest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants