continue icon indicating copy to clipboard operation
continue copied to clipboard

JetBrains reproducible Crash using inline edits

Open Hakenadu opened this issue 1 year ago • 0 comments

Before submitting your bug report

Relevant environment info

- OS: Windows 11 Pro 64-Bit-Version (10.0, Build 22631)
- Continue: 0.0.56
- IDE: IntelliJ IDEA 2024.1.4 (Build #IU-241.18034.62)
- Model: gpt-4o
- config.json:
  
{
  "disableIndexing": true,
  "models": [
    {
      "title": "GPT-4o",
      "provider": "openai",
      "model": "gpt-4o",
      "systemMessage": "You are an expert software developer. You give helpful and concise responses.",
      "contextLength": 100000,
      "completionOptions": {
        "maxTokens": 4000
      }
    }
  ],
  "customCommands": [],
  "allowAnonymousTelemetry": false,
  "docs": []
}

Description

In the past, I have sporadically noticed that the IDE freezes when using the inline edit functionality of Continue and can only be closed via the Task Manager. Some colleagues have also told me that they have had similar experiences.

I have now discovered a case today for which the behavior is reproducible. I have also been able to reproduce this on several end devices. I have attached the case and also a video of the misbehavior.

https://github.com/user-attachments/assets/bc2f55c5-1d84-4d25-ae48-580b7899da23

(The behavior does not occur under VSCode, I have validated this).

To reproduce

  1. open a Java File containing the following content:
package de.test;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;

import java.util.Collection;
import java.util.Set;

public abstract class Model {
    private String name;
    private String label;

    @JsonIgnore
    private Set<String> authorities;

    public String getName() {
        return this.name;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public String getLabel() {
        return this.label;
    }

    public void setLabel(final String label) {
        this.label = label;
    }

    public Set<String> getAuthorities() {
        return this.authorities;
    }

    public void setAuthorities(final Set<String> authorities) {
        this.authorities = authorities;
    }

    /**
     * @return true if the user is allowed to use the model
     */
    public boolean isPermittedForCurrentUser() {
        final Set<String> modelAuthorities = getAuthorities();
        if (modelAuthorities == null || modelAuthorities.isEmpty()) {
            return true;
        }
        final Collection<? extends GrantedAuthority> userAuthorities = SecurityContextHolder.getContext()
                .getAuthentication().getAuthorities();
        for (final GrantedAuthority authority : userAuthorities) {
            if (modelAuthorities.contains(authority.getAuthority())) {
                return true;
            }
        }
        return false;
    }
}
  1. mark the whole code using CTRL+A
  2. start inline edits using CTRL+I
  3. prompt "add missing javadoc"
  4. submit
  5. the ide crashes and can only be closed using the task manager (the code in the target file becomes invalid in the process)

Log output

[info] Starting Continue core...
[2024-08-07T13:55:54] [info] Starting Continue core... 
[2024-08-07T13:55:54] Setup 
[2024-08-07T13:55:54] Core started 
[2024-08-07T13:55:54] Unknown context provider codebase 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:11] [object Object] 
[2024-08-07T13:56:12] [object Object] 
[2024-08-07T13:56:12] [object Object] 
[2024-08-07T13:56:12] [object Object] 
[2024-08-07T13:56:12] [object Object] 
[2024-08-07T13:56:12] [object Object] 
[2024-08-07T13:56:12] [object Object] 
[2024-08-07T13:56:12] [object Object] 
[2024-08-07T13:56:12] [object Object]

Hakenadu avatar Aug 07 '24 13:08 Hakenadu