Skip to content

Erlang shell crashes when trying to suggest command when there is a"(" present and it cannot suggest a module or method #9470

Open
@stanczyk280

Description

Describe the bug
Erlang shell crashes when it tries to suggest when there is a "(" char present and it cannot suggest a module or method

1> self().
<0.89.0>

Trying to type "catch(" and pressing tab results in error:

Error in process <0.71.0> with exit value:
{{badmatch,{ok,[{'catch',1}],1}},
 [{edlin_expand,shell_default_or_bif,1,[{file,"edlin_expand.erl"},{line,741}]},
  {edlin_context,over_module,2,[{file,"edlin_context.erl"},{line,657}]},
  {edlin_context,get_context,2,[{file,"edlin_context.erl"},{line,118}]},
  {edlin_expand,expand,3,[{file,"edlin_expand.erl"},{line,165}]},
  {group,get_line1,5,[{file,"group.erl"},{line,734}]},
  {group,get_chars_loop,10,[{file,"group.erl"},{line,518}]},
  {group,io_request,6,[{file,"group.erl"},{line,213}]},
  {group,server_loop,3,[{file,"group.erl"},{line,139}]}]}

Then it reopens a new shell

1> self().
<0.97.0>

So far i found that this happens when

catch( 
case(
<unknown_method> + ( ie: unbinded function F(

To Reproduce

  1. Open erl shell
  2. Start typing catch(
  3. Click tab to ask for suggestion to fill command
  4. Shell crashes
    and reopens

Expected behavior
Shell doesnt crash when trying to suggest with "(" char present

Affected versions
Tested on 27.2.4

Activity

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

Metadata

Assignees

Labels

bugIssue is reported as a bugteam:VMAssigned to OTP team VM

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions