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 155147 - NullPointerException at org.netbeans.modules.mercurial.ui.log.HgLogMessage.<init>
Summary: NullPointerException at org.netbeans.modules.mercurial.ui.log.HgLogMessage.<i...
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@versioncontrol
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-10 15:14 UTC by johnsonlau
Modified: 2010-06-23 03:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 144197


Attachments
stacktrace (1.03 KB, text/plain)
2008-12-10 15:14 UTC, johnsonlau
Details
stacktrace (1.03 KB, text/plain)
2008-12-10 15:15 UTC, johnsonlau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description johnsonlau 2008-12-10 15:14:04 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Windows Vista, 6.0, x86

User Comments:
johnsonlau: Search all available history log on a project managed by Mercurial

johnsonlau: Search all available history log on a project managed by Mercurial

johnsonlau: Search all available history log on a project managed by Mercurial



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.mercurial.ui.log.HgLogMessage.<init>(HgLogMessage.java:122)
        at org.netbeans.modules.mercurial.util.HgCommand.processLogMessages(HgCommand.java:879)
        at org.netbeans.modules.mercurial.util.HgCommand.getLogMessages(HgCommand.java:975)
        at org.netbeans.modules.mercurial.util.HgCommand.getLogMessages(HgCommand.java:930)
        at org.netbeans.modules.mercurial.ui.log.SearchExecutor.search(SearchExecutor.java:149)
        at org.netbeans.modules.mercurial.ui.log.SearchExecutor.access$100(SearchExecutor.java:60)
Comment 1 johnsonlau 2008-12-10 15:14:11 UTC
Created attachment 74808 [details]
stacktrace
Comment 2 johnsonlau 2008-12-10 15:15:11 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Windows Vista, 6.0, x86

User Comments: 
Search all available history log on a project managed by Mercurial

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.mercurial.ui.log.HgLogMessage.<init>(HgLogMessage.java:122)
        at org.netbeans.modules.mercurial.util.HgCommand.processLogMessages(HgCommand.java:879)
        at org.netbeans.modules.mercurial.util.HgCommand.getLogMessages(HgCommand.java:975)
        at org.netbeans.modules.mercurial.util.HgCommand.getLogMessages(HgCommand.java:930)
        at org.netbeans.modules.mercurial.ui.log.SearchExecutor.search(SearchExecutor.java:149)
        at org.netbeans.modules.mercurial.ui.log.SearchExecutor.access$100(SearchExecutor.java:60)
Comment 3 johnsonlau 2008-12-10 15:15:20 UTC
Created attachment 74809 [details]
stacktrace
Comment 4 johnsonlau 2008-12-10 15:24:32 UTC
It appears that the issue only occurs when the locale Mercurial uses is different from system locale.
When I set HGENCODING to UTF-8 to force Mercurial using UTF-8 charset, it appears.
And I unset the system-wide variable, it disappears.
On a Windows Vista platform.
I guess it might meet some unpreditable characters and parse uncorrectly.

Additionally, it seems that NetBeans uses system locale to parse Mercurial's output.
It certainly will get a wrong output in a situation as above.
Comment 5 Ondrej Vrabec 2010-03-23 11:31:20 UTC
fix: http://hg.netbeans.org/cdev/rev/f40985d7eeea
Comment 6 Quality Engineering 2010-03-24 05:21:29 UTC
Integrated into 'main-golden', will be available in build *201003240200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f40985d7eeea
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #155147 - NullPointerException at org.netbeans.modules.mercurial.ui.log.HgLogMessage.<init>
using utf encoding wherever possible
Comment 7 Ondrej Vrabec 2010-06-22 09:33:26 UTC
Had to revert the fix (see bug #187725). In order to get over this issue, you should start the IDE with -J-Dmercurial.encoding=UTF-8
Comment 8 Quality Engineering 2010-06-23 03:27:42 UTC
Integrated into 'main-golden', will be available in build *201006230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/ab3c08ed488a
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #187725 - I18N : regression : Japanese filename can not be used on Windows
reverting fix for #155147, #177575. Using a default encoding and introducing a switch overriding it.