leomillon / uuid-generator-plugin

An IntelliJ Idea plugin to generate UUID (Universally Unique Identifier), ULID (Universally Unique Lexicographically Sortable Identifier) and CUID (Collision Resistant Unique Identifier)
MIT License
34 stars 13 forks source link

(MacOS) Option-Enter Replace sometimes places the UUID incorrectly #133

Open babramovitch opened 2 years ago

babramovitch commented 2 years ago

When I try to replace the gen command with a new UUID using Option-Enter to speed things up, it sometimes places the new UUID incorrectly. This doesn't happen if I mouse click on the content, then choose additional actions and then choose replace.

This is on version 4.5.1

Screen Shot 2022-05-05 at 12 12 04 PM

into

Screen Shot 2022-05-05 at 12 10 31 PM

It's pretty frequent, like 1 in 4 are wrong

leomillon commented 2 years ago

Hi @babramovitch!

Thanks for the feedback, but I'm not able to reproduce this error... 😞

Could you please share at least:

MartinX3 commented 1 year ago

Same problem on linux. It seems to happen in high cpu usage situations with the IDE.

babramovitch commented 1 year ago

@leomillon I missed that you'd replied to this, but just saw MartinX3's notification.

It was happening before and up to on this. I'll see if I can reproduce it sometime in the next couple days in a sample project for you, as well as on any newer versions if there is.

Android Studio Chipmunk | 2021.2.1 Patch 1 Build #AI-212.5712.43.2112.8609683, built on May 18, 2022 Runtime version: 11.0.12+0-b1504.28-7817840 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 12.2 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 10 Registry: external.system.auto.import.disabled=true Non-Bundled Plugins: wu.seal.tool.jsontokotlin (3.7.4), com.github.leomillon.uuidgenerator (4.5.1), org.jetbrains.kotlin (212-1.7.0-release-281-AS5457.46), izhangzhihao.rainbow.brackets (6.25)

MartinX3 commented 1 year ago

Probably the project is dead and the author lost in the void due to lack of free time.

leomillon commented 1 year ago

@MartinX3 you're right, I don't have much time to spend on this project right now BUT that does not mean that this projet is dead.

If you want to help solving this, please provide "a sample projet / use-case to reproduce this exact behavior".

And don't forget that you can also open a pull-request to fix it ;)

MartinX3 commented 1 year ago

Thank you for your info. :)

Sadly it's hard to reproduce. I need to have a large file and a high cpu usage in IntelliJ. Then I need to fast replace many uuid by hand with the Replace at cursor action, maybe with a macro. And then it happens rarely here. Or maybe he can trigger it because the IntelliJ is slow due to his low RAM.

leomillon commented 1 year ago

The only thing I can think of is some "miss alignment" with characters indices when virtual hints are displayed in the document (changing virtually the characters indices).

That's why it would be nice to find a use-case easy to reproduce :/