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 115722 - Current position is not highlighted in source if project created in localizated home dir
Summary: Current position is not highlighted in source if project created in localizat...
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: _ gordonp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-17 16:10 UTC by Alexander Pepin
Modified: 2009-06-25 10:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
gdb log (3.41 KB, text/plain)
2007-09-21 19:57 UTC, soldatov
Details
gdb log on Linux (UTF8) (3.04 KB, text/plain)
2007-09-21 20:13 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2007-09-17 16:10:34 UTC
Steps to reproduce:
- install IDE with C/C++ pack
- create Welcome sample application in the default location (in my case
C:/Documents%20and%20Settings/ap153252/Мои%20документы/NetBeansProjects/Welcome_1)
- do Step into
Result: Debugger starts but current position in source code is not highlighted (no green line). If source code was not
opened before starting debugger it does not appear in the editor when a breakpoint is reached. 

- set a breakpoint at line 23
- do Continue
Result: Debugger stops at line 23 with a message in GDB console:
User program running
Breakpoint hit at line 23 in file
/C:/Documents%20and%20Settings/ap153252/Мои%20документы/NetBeansProjects/Welcome_1/welcome.cc.
User program stopped

The position is not highlighted.
Comment 1 _ gordonp 2007-09-17 16:27:16 UTC
Please try a related experiment for me. Edit a source file (in a localized home directory) and
put in a compile-time syntax error. Then close the file in the editor and try building it. You
may need to try building it with a fresh userdir as location information may be stored in your
userdir, even though you've closed the file.

When you get the build error, does the output window hyperlink work correctly? Or does it have
the same problem gdb does?
Comment 2 avp 2007-09-17 17:52:20 UTC
I suggest apepin has problem which I has too(Issue #:  	115090). In my case when I run debugger session I become
java.util.EmptyStackException 
Comment 3 avp 2007-09-17 18:24:45 UTC
Sorry, forgot. My project is in C:\NB\Test
Comment 4 Alexander Pepin 2007-09-18 11:04:46 UTC
No problem with compilation of the file in localized directory occur. Please keep in mind that gdb also has no problem
with a such file (see GDB console message). Only GDB-lite can not show current position in sources. The same situation
also occurs on a Linux machine where a localized folder was created so the problem only in folder's name. 
Comment 5 _ gordonp 2007-09-18 14:29:25 UTC
Please attach gdb log
Comment 6 avp 2007-09-19 17:17:47 UTC
I would like to specify. I have the same the problems, but a folder in which is project is C:\NB\Test, and problem is
the same - I don't see current position in debugger session (Win XP)
Comment 7 soldatov 2007-09-21 19:57:17 UTC
Created attachment 49267 [details]
gdb log
Comment 8 soldatov 2007-09-21 20:13:51 UTC
Created attachment 49269 [details]
gdb log on Linux (UTF8)
Comment 9 Alexander Pepin 2007-09-24 15:05:22 UTC
on Solaris (sqa42) a debug session starts with exception:
java.lang.IllegalArgumentException: Illegal character in path at index 25:
file:/export/home/tester/\320\242\320\265\321\201\321\202/Welcome_1/welcome.cc
[file:/export/home/tester/\320\242\320\265\321\201\321\202/Welcome_1/welcome.cc]
	at org.netbeans.modules.masterfs.MasterURLMapper.getFileObjects(MasterURLMapper.java:56)
	at org.openide.filesystems.URLMapper.findFileObject(URLMapper.java:188)
	at org.netbeans.modules.cnd.debugger.gdb.EditorContextImpl.getDataObject(EditorContextImpl.java:708)
	at org.netbeans.modules.cnd.debugger.gdb.EditorContextImpl.getLineSet(EditorContextImpl.java:657)
	at org.netbeans.modules.cnd.debugger.gdb.EditorContextImpl.getLine(EditorContextImpl.java:688)
	at org.netbeans.modules.cnd.debugger.gdb.EditorContextImpl.annotate(EditorContextImpl.java:162)
	at org.netbeans.modules.cnd.debugger.gdb.EditorContextBridge.annotate(EditorContextBridge.java:120)
	at org.netbeans.modules.cnd.debugger.gdb.EditorContextBridge.annotate(EditorContextBridge.java:334)
	at
org.netbeans.modules.cnd.debugger.gdb.breakpoints.BreakpointAnnotationListener.annotate(BreakpointAnnotationListener.java:169)
	at
org.netbeans.modules.cnd.debugger.gdb.breakpoints.BreakpointAnnotationListener.propertyChange(BreakpointAnnotationListener.java:82)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
	at org.netbeans.api.debugger.Breakpoint.firePropertyChange(Breakpoint.java:234)
	at org.netbeans.modules.cnd.debugger.gdb.breakpoints.GdbBreakpoint.setLineNumber(GdbBreakpoint.java:96)
	at org.netbeans.modules.cnd.debugger.gdb.breakpoints.BreakpointImpl.completeValidation(BreakpointImpl.java:72)
	at org.netbeans.modules.cnd.debugger.gdb.GdbDebugger.breakpointValidation(GdbDebugger.java:1429)
	at org.netbeans.modules.cnd.debugger.gdb.GdbDebugger.resultRecord(GdbDebugger.java:409)
	at org.netbeans.modules.cnd.debugger.gdb.proxy.GdbProxyEngine.processMessage(GdbProxyEngine.java:192)
	at org.netbeans.modules.cnd.debugger.gdb.proxy.GdbProxyEngine.access$000(GdbProxyEngine.java:49)
	at org.netbeans.modules.cnd.debugger.gdb.proxy.GdbProxyEngine$1.run(GdbProxyEngine.java:116)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964)


Comment 10 _ gordonp 2007-09-29 03:50:10 UTC
Fixed (only tested with 2-byte filenames).
Comment 11 Alexander Pepin 2007-10-01 13:56:10 UTC
Verified on Linux and Solaris (where UTF-8 is used by default). Because the fix does not work on Windows (with default
Cp1251) the issue can not be considered as RESOLVED FIXED so I reopen it. 
Comment 12 _ gordonp 2007-10-02 00:30:25 UTC
I've put your code into GdbUtils.gdbToUTF and renamed the method gdbToUserEncoding.
Since I couldn't open the project you sent me nor its source file, all I've verified
is that this code compiles and doesn't break non-cp12151 users.

Please test once tonights nightly. If it doesn't build you can either build your own
or take mine from /net/pucci.sfbay/export/pucci2/nbdev/nbbuild/netbeans/cnd1/modules
(org-netbeans-modules-cnd-debugger-gdb.jar).

If it doesn't work I'll probably ask Vladimir for help in SPB. It doesn't seem like
it would be time well spent when I can't run in this encoding.
Comment 13 _ gordonp 2007-10-06 20:28:22 UTC
Marking as fixed after email discussion with Alexander

>Yes, that's OK.
>
>>>    P1  115722    Current position is not highlighted in source if
>>>  project created in localizated home dir
>>> - works fine on Windows (have no possibility to check on Linux for now).  Breakpoint's bug fixed.
>>
>> I verified it on Solaris, which should be much closer to Linux than the Windows solution. I'm
>> going to mark this fixed and you can reopen if it fails on Linux. Is that OK with you?
Comment 14 Alexander Pepin 2007-10-10 11:08:14 UTC
verified on Windows, Linux, and Solaris in build 20071010