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

If destination class exists - IDE freezes #411

Open
Jeansen opened this issue Dec 25, 2022 · 8 comments
Open

If destination class exists - IDE freezes #411

Jeansen opened this issue Dec 25, 2022 · 8 comments

Comments

@Jeansen
Copy link

Jeansen commented Dec 25, 2022

Generating a class that already exists in a project make the latest Inellij IDEA freeze.

@Jeansen
Copy link
Author

Jeansen commented Dec 25, 2022

IntelliJ IDEA Version: Build #IU-223.8214.52, built on December 20, 2022
JSON to Kotlin Plugin Verison: 3.7.4
System: Debian/Bullseye

@wuseal
Copy link
Owner

wuseal commented Dec 27, 2022

Oh, Thanks for feed back, will check it later

@wuseal
Copy link
Owner

wuseal commented Dec 27, 2022

I checked local on MacOS, it doesn't freeze when generate a exists class name file here, is that convenient to record a video to show the problem?

@Jeansen
Copy link
Author

Jeansen commented Dec 27, 2022

Well, there's not much to record. After I click the generate button, the dialog simply disappears and I cannot do much. Looking at the log, I see the following. I cleared the log before, so it is only shown what happens when I use the plugin to create a file and do the same again. Also, my CPU has extreme loads after that. Only way is to hard kill the process.

22-12-27 16:22:58,969 [  70971]   INFO - #c.i.c.ComponentStoreImpl - Saving appAcceptedLanguageLevels took 25 ms, SonarLintGlobalSettings took 13 ms
2022-12-27 16:22:59,025 [  71027]   INFO - #c.i.c.ComponentStoreImpl - Saving Project(name=k8s-playground, containerState=COMPONENT_CREATED, componentStore=/home/marcel/k8s-playground)RunManager took 22 ms
2022-12-27 16:23:07,679 [  79681]   INFO - #c.i.c.ComponentStoreImpl - Saving appCodeStyleSchemeSettings took 13 ms, Perl5ApplicationSettings took 12 ms
2022-12-27 16:23:07,717 [  79719]   INFO - #c.i.c.ComponentStoreImpl - Saving Project(name=k8s-playground, containerState=COMPONENT_CREATED, componentStore=/home/marcel/k8s-playground)RemoteRepositoriesConfiguration took 11 ms
2022-12-27 16:23:09,108 [  81110]   INFO - #c.i.c.ComponentStoreImpl - Saving appGeneralSettings took 14 ms
2022-12-27 16:23:09,148 [  81150]   INFO - #c.i.c.ComponentStoreImpl - Saving Project(name=k8s-playground, containerState=COMPONENT_CREATED, componentStore=/home/marcel/k8s-playground)CheckStyle-IDEA took 18 ms
2022-12-27 16:23:10,738 [  82740]   INFO - #c.i.o.a.i.PopupMenuPreloader - 22493 ms since showing to preload popup menu 'Project View Popup Menu' at 'ProjectViewPopup(preload-bgt)' in 11 ms
2022-12-27 16:23:10,742 [  82744]   INFO - #c.i.o.a.i.PopupMenuPreloader - 22121 ms since showing to preload popup menu '' at 'StructureViewPopup(preload-bgt)' in 13 ms
2022-12-27 16:23:10,976 [  82978]   INFO - #c.i.o.a.i.PopupMenuPreloader - 22673 ms since showing to preload popup menu 'Editor Popup Menu' at 'EditorPopup(preload-bgt)' in 247 ms
2022-12-27 16:23:10,996 [  82998]   INFO - #c.i.o.a.i.PopupMenuPreloader - 12020 ms since showing to preload popup menu 'Editor Popup Menu' at 'EditorPopup(preload-bgt)' in 267 ms
2022-12-27 16:23:38,170 [ 110172]   INFO - JSON To Kotlin Class - ListClassGeneratorByJSONArray jsonArray allElementAreSamePrimitiveType, return GenericListClass with generic type Int
2022-12-27 16:23:38,171 [ 110173]   INFO - JSON To Kotlin Class - ListClassGeneratorByJSONArray jsonArray allItemAreObjectElement, return GenericListClass with generic type MasterNode
2022-12-27 16:23:38,172 [ 110174]   INFO - JSON To Kotlin Class - ListClassGeneratorByJSONArray jsonArray allElementAreSamePrimitiveType, return GenericListClass with generic type Int
2022-12-27 16:23:38,172 [ 110174]   INFO - JSON To Kotlin Class - ListClassGeneratorByJSONArray jsonArray allItemAreObjectElement, return GenericListClass with generic type WorkerNode
2022-12-27 16:24:25,984 [ 157986]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:26,288 [ 158290]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:26,610 [ 158612]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:26,916 [ 158918]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:27,223 [ 159225]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:27,524 [ 159526]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:27,827 [ 159829]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:28,131 [ 160133]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:28,422 [ 160424]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:28,716 [ 160718]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:29,019 [ 161021]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:29,324 [ 161326]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:29,626 [ 161628]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:29,939 [ 161941]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:30,256 [ 162258]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:30,568 [ 162570]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false
2022-12-27 16:24:30,887 [ 162889]   INFO - #c.i.o.u.LowMemoryWatcher - Low memory signal received: afterGc=false

@wuseal
Copy link
Owner

wuseal commented Dec 27, 2022

How big is your JSON, is it too much content in the JSON?

@Jeansen
Copy link
Author

Jeansen commented Dec 27, 2022

No, it is very simple.

{
  "cluster": {
    "masterNodes": [
      {
        "id": 0,
        "status": "provisioned",
        "snapshots": [
          1670448150
        ]
      }
    ],
    "workerNodes": [
      {
        "id": 1,
        "status": "provisioned",
        "snapshots": [
          1670448151
        ]
      }
    ]
  }
}

@Jeansen
Copy link
Author

Jeansen commented Dec 29, 2022

So, I tried around a bit more. When I use the default settings (after plugin install) and try to generate a class with the same name that already exists, new files appear with an X appended. For instance, If a class 'Clsuter.kt' already existes, a class 'ClusterX.kt' would be created. Running the plugin again and telling it to generate the class 'Cluster' would create a class 'ClusterXX.kt', and so forth.

The IDE freezes in my case, where I use the following settings:

image
image

If I generate a class, e.g. 'Cluster', with these settings and that class already exists, then the IDE freezes and I see the output as shown in the log excerpt above.

@wuseal
Copy link
Owner

wuseal commented Feb 11, 2023

I will check it later

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

2 participants