Create new empty project.
In Settings / Version control set Perforce VCS for the whole project.
Edit Perforce settings the way to get Login dialog on next project reopening. I have set:
. Perforce is online = true.
. Use P4CONFIG = true.
. Use login authentication = true.
The rest is default. Ok.
If Login dialog is shown on Ok, then enter correct password. Now you have p4tickets file in your user home.
Exit IDEA.
Remove p4tickets from user home.
Restart IDEA, reopen project. Get Perforce login dialog.
Press Cancel.
Result: it seems to be a deadlock. IDEA UI does not respond in 10 minutes, no more memory is allocated, CPU usage is about 0%. Then IDEA was killed.
See attached dump.txt with 2 dumps: one is taken right after pressing Cancel, another is a minute later.