This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 115796 [details] Thread dump During testing of the new project scanning implementation I bumped into hard to reproduce problem: In some cases IDE will freeze after hitting alt+shift+f. More details including profiler and application snap shots and heap dump could be found in the thread [71cat] Re: [news] Urgent call for help on NETCat mailing list.
Your thread dump is quite strange, because lines are not corresponding with lines in 7.2 build... I tried to reproduce it, but I'm not able to do that. I'll monitor this strange behaviour... Thanks.
(In reply to comment #1) > Your thread dump is quite strange, because lines are not corresponding with > lines in 7.2 build... I tried to reproduce it, but I'm not able to do that. > I'll monitor this strange behaviour... Thanks. I used the tool you suggested. :) I can create new thread dump if you think I did something wrong. Just give me step by step instructions or ping me on gtalk.
Yes please, create new dump. And if you have a file, where the problem is reproducible, please, attach it too. Thanks.
(In reply to comment #3) > Yes please, create new dump. And if you have a file, where the problem is > reproducible, please, attach it too. Thanks. OK. I will try to create new thread dump. File in question has been changed meanwhile and I am not sure if the problem is reproducible. I can only send the file to you personally assuming that it will never go public.
Yes, you can send it personally, I'll use it just for testing.
Created attachment 115835 [details] one more thread dump Product Version: NetBeans IDE Dev (Build 201202160400) Java: 1.7.0; Java HotSpot(TM) 64-Bit Server VM 21.0-b17 System: Linux version 3.0.0-16-generic running on amd64; UTF-8; en_US (nb) netbeans_default_options="--fontsize 14 --userdir ${HOME}/.netbeans/7.2-dev --laf javax.swing.plaf.metal.MetalLookAndFeel -J-client -J-Xss8m -J-Xms64m -J-XX:PermSize=256m -J-XX:MaxPermSize=512m -J-Xmx1024m -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled -J-XX:+UseParNewGC -J-Dnetbeans.logger.console=true -J-ea -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Djavax.net.ssl.trustStore=${HOME}/trackeystore -J-Djavax.net.ssl.trustStorePassword=xxxx -J-Dplugin.manager.check.updates=false -J-Dsun.zip.disableMemoryMapping=true" Running Ubuntu 11.10 on Apple iMac "Core i7" 3.4 27-Inch (Mid-2011)
Created attachment 115838 [details] invoking code completion It seams that problem is more widespread. I hit it when invoking code completion on defining methods.
It's about cache. I was not able to continue working and I started IDE with fresh user directory. Code completion functions normally as well as formatting sent file. Will the old user directory be of any use to you? Feel free to close the ticket if you find that we cannot tackle the problem.
Actually this but is quite annoying. In last two hours I had to kill java and reopen IDE three times. Each time I was inserting some code from in one or other way: code completion, try/catch block, etc... Using fresh user directory is just a temporary fix. :(
When you hit CC, reformat is called, so it's still in formatter. But if I tried to format your confidental file, it worked properly, I have to investigate it more.
(In reply to comment #10) > When you hit CC, reformat is called, so it's still in formatter. But if I tried > to format your confidental file, it worked properly, I have to investigate it > more. I was sure that the file itself will not be helpful. I have a strong feeling that it is about cached data. I don't know how you guys are doing it exactly but I would most likely create tree like structure from the file, persist it and use it to manipulate nodes. Here is what I was doing last evening: 1. IDE freezes (same live lock in each case) after inserting desired "object" from selection list (code completion, wrapping selection in try/catch block or similar) 2. kill -9 pidofide 3. Open IDE try the same 4. Live lock encountered again 5. kill -9 pidofide 6. rm -r ~/.netbeans/user_dir 7. Open IDE try the same 8. No live lock
Can you try to reproduce it with the piece of code from this issue #154019 ? In the first comment, there is a class Form inside <??>...select it with your mouse (including <??>) ctrl+c then open NB, with some opened PHP file, press ctrl+a (select all) press ctrl+v (to paste) and right after the pasting, press ctrl+shift+f It freezes everytime for me...and thread dump is simillar as yours...(the last PHP "touch" is in TokenFormatter.replaceSimpleString()) But when you paste it, save it, close NB, open it again with the pasted code in a file, run Format...and magically, it works?
CCing Mila, because he made some changes in BaseDocument.insertString()/remove() in parts, where problem "freezes" so maybe he could know more about it.
This issue is not exclusive to PHP and seems to be more general. Sadly is hard to reproduce. Maybe scanning/editing at the same time might corrupt part of cache?
Can you make a thread dump when it happens in another module than php? Thanks.
(In reply to comment #12) > Can you try to reproduce it with the piece of code from this issue #154019 ? > > In the first comment, there is a class Form inside <??>...select it with your > mouse (including <??>) ctrl+c then open NB, with some opened PHP file, press > ctrl+a (select all) press ctrl+v (to paste) and right after the pasting, press > ctrl+shift+f > > It freezes everytime for me...and thread dump is simillar as yours...(the last > PHP "touch" is in TokenFormatter.replaceSimpleString()) > > But when you paste it, save it, close NB, open it again with the pasted code in > a file, run Format...and magically, it works? Yup. That will be it. The only difference is that in my case saving and restarting IDE does not help: After hitting alt+shift+f IDE will freeze.
Created attachment 115885 [details] PHP thread dump Dump created while following Onderj's example
(In reply to comment #15) > Can you make a thread dump when it happens in another module than php? Thanks. I created HelloWorld Java project (tutorial). Copy/pasting and formatting worked correctly. I am not working on Java projects. Perhaps Javier will be able to reproduce the problem and create thread dump.
(In reply to comment #16) > Yup. That will be it. The only difference is that in my case saving and > restarting IDE does not help: After hitting alt+shift+f IDE will freeze. It doesn't work for me either now. Don't know how I forced it to work properly :)
(In reply to comment #19) > (In reply to comment #16) > > Yup. That will be it. The only difference is that in my case saving and > > restarting IDE does not help: After hitting alt+shift+f IDE will freeze. > > It doesn't work for me either now. Don't know how I forced it to work properly > :) On the good side you have found a reliable way how to reproduce the problem.
I will add it if it happens again. I was testing 7.1.1 the whole morning so I can get back to this. Can you point me on the process to generate the thread dump just in case?
(In reply to comment #21) > I will add it if it happens again. I was testing 7.1.1 the whole morning so I > can get back to this. Can you point me on the process to generate the thread > dump just in case? use visualvm: http://visualvm.java.net/
Exactly as schkovich said, use Visual VM. It's a great tool for profiling.
There was a problem in DirectMergeContainer that I've fixed. *** This bug has been marked as a duplicate of bug 208652 ***
Great, thanks!