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.
Build: NetBeans IDE Dev (Build 20130708-b54b07514cda) VM: Java HotSpot(TM) 64-Bit Server VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b15 OS: Linux User Comments: tmysik: - start ide with html5 project opened - open php project -> NPE Stacktrace: java.lang.NullPointerException at org.netbeans.modules.web.clientproject.browser.ActiveBrowserAction.updateButton(ActiveBrowserAction.java:352) at org.netbeans.modules.web.clientproject.browser.ActiveBrowserAction.activeProjectChanged(ActiveBrowserAction.java:321) at org.netbeans.modules.web.clientproject.browser.ActiveBrowserAction.refreshView(ActiveBrowserAction.java:296) at org.netbeans.modules.web.clientproject.browser.ActiveBrowserAction.access$500(ActiveBrowserAction.java:106) at org.netbeans.modules.web.clientproject.browser.ActiveBrowserAction$6.run(ActiveBrowserAction.java:288) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
Created attachment 136849 [details] stacktrace
Created attachment 136850 [details] fix I introduced this recently via issue 231455. Tomas could you please push the fix (and review it) if you can - I'm in the middle of a big refactoring and will need half a day more to finish it. Depending on how often this bug happens QA may want us to fix this for Beta - the fix is trivial. Thanks.
Taking over, will do that (the patch seems fine to me, of course). Láďo, please check whether this fix should be transplanted to Beta branch. Thanks.
Fixed. http://hg.netbeans.org/web-main/rev/c95b20f796a7
OK, the fix looks safe. musilt2: Tomasi, is there still a time to transplant it to Beta? I could verify it in web-main build (eta around noon) so we don't have to wait for trunk.
Fix can technically go to beta, question is: why P3 with just one report? How often this can happend? (In reply to comment #5) > OK, the fix looks safe. > > musilt2: Tomasi, is there still a time to transplant it to Beta? I could verify > it in web-main build (eta around noon) so we don't have to wait for trunk.
(In reply to comment #6) > Fix can technically go to beta, question is: why P3 with just one report? How > often this can happend? Question for David.
Finally I managed to reproduce it with some older PHP project. If you have say 2 projects A and B (the "older" in my case), then it pops out whenever browser picker should be updated to reflect browser of the B (so e.g. if you focus file/folder/project node in Projects from B when something from project A was focused prior this change). I didn't reproduce it with other PHP projects though.
(In reply to comment #8) > Finally I managed to reproduce it with some older PHP project. So every our PHP user will be able to reproduce this issue with Beta? Láďo, please create a PHP project in NB 7.3 and then open it in Beta and we will see. Thanks.
As I wrote, I reproduced it with only one particular project, I'm not sure in which version it was created (folder's timestamp points to March 2013). I tried to create project in 7.3, 7.3.1 and some June trunk build and if I opened them in [1], I didn't reproduce it. Product Version: NetBeans IDE Dev (Build 201307082300)
In such case, let's wait for David. Thanks.
Note for reproducing: - PHP project, no mention about browser in nbproject/private/private.properties and in nbproject/project.properties, add following: browser.id=SL[/Browsers/ChromeBrowser.INTEGRATED browser.reload.on.save=true
I tried web-main build with the fix and the I cannot reproduce it the way I described in previous comment. Also nothing happens with projects from 7.3/7.3.1. If I now run the project, IDE's default browser is used. So I think it is OK => verified However once I click on browser picker in main toolbar, I get issue 231194 (I guess it's not in web-main yet). The workaround is easy, use Project Properties to change browser and it is less intrusive than this issue so not a stopper. I'm just wondering how come the browser.id has incorrect (or maybe obsolote) value in project.properties? Product Version: NetBeans IDE Dev (Build web-main-11010-on-20130709) Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15 System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
(In reply to comment #13) > I'm just wondering how come the browser.id has incorrect (or maybe obsolote) > value in project.properties? Add a browser in Tools > Options, select it for project and then remove it from Tools > Options?
Yes, these steps does something similar, I'm just not sure I've ever done it :) Anyway, Tomasi, please transplant to Beta. Thank you
(In reply to comment #15) > Anyway, Tomasi, please transplant to Beta. Thank you Done. Thanks. http://hg.netbeans.org/releases/rev/913ef516d4f4
Thanks guys! RE. how to reproduce - I wouldn't know. From code it looks that project's ProjectBrowserProvider.getActiveBrowser() returns null. Perhaps changing value of browser.id property to some non-existent browser like "blabla" could trigger this? There were times in the past when browser IDs got renamed little bit and I wonder whether that old PHP project was using this obsolete renamed browser ID and consequently project's active browser become "null".
Integrated into 'releases/release74_beta1', will be available in build *201307092200* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/913ef516d4f4 User: Tomas Mysik <tmysik@netbeans.org> Log: #232416 - NullPointerException at org.netbeans.modules.web.clientproject.browser.ActiveBrowserAction.updateButton (transplanted from c95b20f796a793512bd5caf6bf159589900a82dd)
Integrated into 'main-silver', will be available in build *201307100049* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/c95b20f796a7 User: Tomas Mysik <tmysik@netbeans.org> Log: #232416 - NullPointerException at org.netbeans.modules.web.clientproject.browser.ActiveBrowserAction.updateButton
verified in Beta Product Version: NetBeans IDE 7.4 Beta (Build 201307092200) Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15 System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)