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.

Bug 223267 - NullPointerException at com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$XPDefaultRenderer.paint
Summary: NullPointerException at com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$...
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-04 16:29 UTC by padraigdoran
Modified: 2012-12-08 02:57 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 196086


Attachments
stacktrace (2.43 KB, text/plain)
2012-12-04 16:29 UTC, padraigdoran
Details

Note You need to log in before you can comment on or make changes to this bug.
Description padraigdoran 2012-12-04 16:29:38 UTC
Build: NetBeans IDE Dev (Build 201212040001)
VM: Java HotSpot(TM) Client VM, 23.5-b02, Java(TM) SE Runtime Environment, 1.7.0_09-b05
OS: Windows 7

User Comments:
padraigdoran: Diff a file using KDiff: kept calling kdiff.exe




Stacktrace: 
java.lang.NullPointerException
   at com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$XPDefaultRenderer.paint(WindowsTableHeaderUI.java:170)
   at javax.swing.CellRendererPane.paintComponent(CellRendererPane.java:151)
   at javax.swing.plaf.basic.BasicTableHeaderUI.paintCell(BasicTableHeaderUI.java:710)
   at javax.swing.plaf.basic.BasicTableHeaderUI.paint(BasicTableHeaderUI.java:652)
   at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
   at javax.swing.JComponent.paintComponent(JComponent.java:778)
Comment 1 padraigdoran 2012-12-04 16:29:41 UTC
Created attachment 128849 [details]
stacktrace
Comment 2 Marian Mirilovic 2012-12-06 09:07:26 UTC
resolver ... see http://netbeans.org/bugzilla/show_bug.cgi?id=216005#c3
Comment 3 Ondrej Vrabec 2012-12-06 09:45:15 UTC
> Diff a file using KDiff: kept calling kdiff.exe
How? In the IDE? What were you exactly doing?
There's an ISE preceding this, so i guess i can fix at least that one.
java.lang.IllegalStateException
[catch] at org.netbeans.modules.versioning.util.TableSorter.clearSortingState(TableSorter.java:165)
	at org.netbeans.modules.versioning.util.TableSorter.access$800(TableSorter.java:112)
	at org.netbeans.modules.versioning.util.TableSorter$TableModelHandler.tableChanged(TableSorter.java:454)
	at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:296)
	at javax.swing.table.AbstractTableModel.fireTableDataChanged(AbstractTableModel.java:198)
	at org.netbeans.modules.mercurial.options.PropertiesTableModel.setNodes(PropertiesTableModel.java:89)
	at org.netbeans.modules.mercurial.options.PropertiesTable.setNodes(PropertiesTable.java:181)
	at org.netbeans.modules.mercurial.options.HgExtProperties$1.perform(HgExtProperties.java:169)
Comment 4 Ondrej Vrabec 2012-12-06 09:54:49 UTC
fix: http://hg.netbeans.org/core-main/rev/46ce07169da4
Comment 5 padraigdoran 2012-12-06 10:13:32 UTC
I can't remember exactly what I was doing but essentially it was diffing a file by right-clicking on it and hitting diff.

Diff program:
Tools -> Options -> Misc -> Diff -> Click on External Diff -> enter: "C:\Program Files\TortoiseHg\kdiff3.exe {0} {1}" and save

This particular issue I can't replicate but there are other issues:

#1 Wherever I call a diff from, the internal Netbeans diff opens up. This could be in the Editor tabs, the project browser, or the Mercurial Status window. It shouldn't open up if another diff program is specified

#2 Three diffs of the file is ran/opened when I run a diff with an external, in this order:
   (a) Netbeans internal diff opens up
   (b) at the same time as (a), kdiff opens up with the diff
   (c) when I close the kdiff window from (b) another kdiff window opens up

The paths to the diff files in (b) and (c) respectfully are:

C:\Users\Padraig\AppData\Local\Temp\TempDiff1937846912675029552.tmp
C:\Users\Padraig\AppData\Local\Temp\TempDiff8595617456189534236.tmp

C:\Users\Padraig\AppData\Local\Temp\TempDiff7542575236280570032.tmp
C:\Users\Padraig\AppData\Local\Temp\TempDiff3327571548940980591.tmp

So, as you see the temp files are different which makes it seem like an extra diff call is being made for kdiff.

Any thing you need me to try? Should another issue be opened up just for what I described above?
Comment 6 Ondrej Vrabec 2012-12-06 10:25:38 UTC
> Should another issue be opened up just for what I described above?
No need, i would immediately close it as INVALID. You misunderstand the option in Tools -> Options -> Diff. If you specify an external diff toll, it doesn't mean a diff would be opened in the external tool but that the external tool would be used to generate textual diff output that would be subsequently parsed and displayed in the IDE. So entering a command that does not print the diff to stdout will not work (or will work in a completely unexpected way). Thanks for understanding
Comment 7 padraigdoran 2012-12-06 10:48:45 UTC
(In reply to comment #6)
> > Should another issue be opened up just for what I described above?
> No need, i would immediately close it as INVALID. You misunderstand the option
> in Tools -> Options -> Diff. If you specify an external diff toll, it doesn't
> mean a diff would be opened in the external tool but that the external tool
> would be used to generate textual diff output that would be subsequently parsed
> and displayed in the IDE. So entering a command that does not print the diff to
> stdout will not work (or will work in a completely unexpected way). Thanks for
> understanding

Ah I see, perhaps a little description in that window would help other people in future. I assumed it was to open the external program and essentially just show the changes (which it does but in a strange manor). Is there an option to do what I want it to do, i.e. use kdiff to see the differences only?
Comment 8 Ondrej Vrabec 2012-12-06 11:01:54 UTC
> Is there an option to do what I want it to do, i.e. use kdiff to see the differences only?
I don't think so. You can file an enhancement request on Utilities/Diff component.
Comment 9 padraigdoran 2012-12-06 11:26:10 UTC
(In reply to comment #8)
> > Is there an option to do what I want it to do, i.e. use kdiff to see the differences only?
> I don't think so. You can file an enhancement request on Utilities/Diff
> component.

Okay, I'll do that. Thanks for clearing things up for me.
Comment 10 Quality Engineering 2012-12-08 02:57:37 UTC
Integrated into 'main-golden', will be available in build *201212080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/46ce07169da4
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #223267 - NullPointerException at com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$XPDefaultRenderer.paint
fixing a preceding ISE that might cause some troubles