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 85316 - NPE when opening subversion Diff with GTKLookAndFeel
Summary: NPE when opening subversion Diff with GTKLookAndFeel
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Subversion (show other bugs)
Version: 6.x
Hardware: All Linux
: P1 blocker with 1 vote (vote)
Assignee: issues@versioncontrol
URL:
Keywords: GTK
: 88226 96794 103815 122946 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-20 09:41 UTC by lkishalmi
Modified: 2007-12-12 13:55 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Simple patch to prevent NPE (1.18 KB, patch)
2006-09-22 13:08 UTC, lkishalmi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lkishalmi 2006-09-20 09:41:54 UTC
Using GTKLookAndFeel from JDK 1.6.0 (b99) causes NPE when opening subversion Diff.

The stack trace:
java.lang.NullPointerException
	at
org.netbeans.modules.subversion.ui.diff.MultiDiffView.addPropertyChangeListener(MultiDiffView.java:277)
	at javax.swing.plaf.synth.SynthPanelUI.installListeners(SynthPanelUI.java:49)
	at javax.swing.plaf.synth.SynthPanelUI.installUI(SynthPanelUI.java:38)
	at javax.swing.JComponent.setUI(JComponent.java:668)
	at javax.swing.JPanel.setUI(JPanel.java:136)
	at javax.swing.JPanel.updateUI(JPanel.java:109)
	at javax.swing.JPanel.<init>(JPanel.java:69)
	at javax.swing.JPanel.<init>(JPanel.java:92)
	at javax.swing.JPanel.<init>(JPanel.java:100)
	at
org.netbeans.modules.subversion.ui.diff.MultiDiffView.<init>(MultiDiffView.java:95)
	at
org.netbeans.modules.subversion.ui.diff.DiffMainPanel$DiffPrepareTask.run(DiffMainPanel.java:654)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:541)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:963)
Comment 1 lkishalmi 2006-09-22 13:08:33 UTC
Created attachment 34370 [details]
Simple patch to prevent NPE
Comment 2 lkishalmi 2006-09-22 13:11:39 UTC
The main problem is that GTK LAF overrides the standard Panel and try to
initialize the listeners. As the initialization sequence is called from the
ancestor constructors the support variable hasn't been initialized yet.
Comment 3 lkishalmi 2006-09-22 14:06:14 UTC
Changed the defect type to PATCH
Comment 4 ahagopian 2006-10-09 17:54:36 UTC
I'm having the same problem, can we expect to see this fixed before 5.5 final?
Comment 5 Maros Sandor 2006-10-10 09:38:35 UTC
It will most probably not make it into 5.5, please use JDK 1.5. We will fix it
until 1.6 FCS.
Comment 6 lkishalmi 2006-10-10 20:41:35 UTC
FYI: This bug can be reproduced using 1.5.0 Java as well.
Comment 7 ahagopian 2006-10-10 20:51:38 UTC
Yep same here, 1.5 and 1.6, can't use GTKLookAndFeel with the diff tool in
subversion.

I realize that since Netbeans 5.5 is in RC its hard to fix a bug like this but
this module isn't packaged with 5.5, its from the update source, can't it be
fixed for an update?

Comment 8 Tomas Stupka 2006-10-30 13:05:14 UTC
*** Issue 88226 has been marked as a duplicate of this issue. ***
Comment 9 Peter Pis 2006-11-05 09:00:46 UTC
*** Issue 88226 has been marked as a duplicate of this issue. ***
Comment 10 Peter Pis 2006-11-06 12:08:59 UTC
Many complaining users. P2.
Comment 11 Martin Krauskopf 2006-12-19 12:30:37 UTC
GTK is supposed to be turned on by default in NB 6.0. I think this is P1 then.
Since I can't use at all svn diff in NB, i.e. missing major IDE feature. Until
then I'll stick with command line.
Comment 12 Tomas Stupka 2007-01-05 15:18:33 UTC
fixed

Checking in MultiDiffView.java;
/cvs/subversion/main/src/org/netbeans/modules/subversion/ui/diff/MultiDiffView.java,v
 <--  MultiDiffView.java
new revision: 1.18; previous revision: 1.17
done
Comment 13 _ rkubacki 2007-01-08 09:54:32 UTC
Both original code and fix are wrong (see my post to dev mailing lists). Please
correct it.
Comment 14 Tomas Stupka 2007-01-08 14:07:59 UTC
ok, thanks.

so one more try - the main problem was in the MultiDiffView extending JPanel,
where there is no reason to do this. I separeted the implementation for the
MultiDiffView componnnt (JPanel) and the DiffView part.


Checking in MultiDiffView.java;
/cvs/subversion/main/src/org/netbeans/modules/subversion/ui/diff/MultiDiffView.java,v
 <--  MultiDiffView.java
new revision: 1.19; previous revision: 1.18
done
Comment 15 Peter Pis 2007-02-28 16:08:38 UTC
*** Issue 96794 has been marked as a duplicate of this issue. ***
Comment 16 Tomas Stupka 2007-05-12 11:07:21 UTC
*** Issue 103815 has been marked as a duplicate of this issue. ***
Comment 17 Maros Sandor 2007-12-12 13:55:29 UTC
*** Issue 122946 has been marked as a duplicate of this issue. ***