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 194242 - fatal: Not a git repository (or any of the parent directories): .git
Summary: fatal: Not a git repository (or any of the parent directories): .git
Status: RESOLVED FIXED
Alias: None
Product: installer
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1
Hardware: PC Windows XP
: P3 normal with 2 votes (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
: 197820 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-12 08:22 UTC by Marian Petras
Modified: 2012-04-11 12:27 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot of the installer's error message (6.05 KB, image/png)
2011-01-12 08:22 UTC, Marian Petras
Details
verbose output of the installer (2.30 MB, text/plain)
2011-01-12 12:57 UTC, Marian Petras
Details
list of executables on PATH installed by the Git installer (677 bytes, text/plain)
2011-01-12 14:04 UTC, Marian Petras
Details
output of "java.exe -jar bundle.jar" (2.28 MB, text/plain)
2011-01-13 06:50 UTC, Marian Petras
Details
Screenshot of Far Manager with same error message (10.08 KB, image/png)
2011-06-10 15:51 UTC, StChamond
Details
Example case of JFileChooser and Git interaction (896 bytes, application/octet-stream)
2011-06-27 16:47 UTC, DYarb
Details
Patch for nbi/engine/native/launcher/windows/src/Launcher.c (1.28 KB, patch)
2011-12-08 21:42 UTC, dlipin
Details | Diff
Rebuilt nbi/engine/native/launcher/windows/dist/nlw.exe with patch to Launcher.c applied (352.00 KB, application/octet-stream)
2011-12-08 21:47 UTC, dlipin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Petras 2011-01-12 08:22:59 UTC
Created attachment 104901 [details]
screenshot of the installer's error message

I ran the installer of NetBeans 6.9.1 for Windows. I customized the intallation configuration by unchecking options Java ME, Groovy and Glassfish. The installation seems to have been successful, just that the installer displayed an error message at the end (see the attachment).

I have had Git installed before I started the NetBeans installer but I do not see why the installer should be affected by this fact.

I have administration rights on the PC and I installed NetBeans to the default location (C:\Program Files\NetBeans 6.9.1).

--
NetBeans 6.9.1 (Java pack), installed without Java ME, Groovy and Glassfish
JDK 6u23 (Windows, 32-bit)
Windows XP Professional, 32-bit
Intel quad-core PC
Comment 1 Ondrej Vrabec 2011-01-12 08:37:29 UTC
ugh, i have no idea why the installer is interested in git. Please, Marian, could you start the installer with '--verbose > out.txt', go through the installation process again and attach the output (out.txt)?
Comment 2 Marian Petras 2011-01-12 12:57:48 UTC
Created attachment 104918 [details]
verbose output of the installer
Comment 3 Marian Petras 2011-01-12 14:04:13 UTC
Created attachment 104919 [details]
list of executables on PATH installed by the Git installer
Comment 4 Marian Petras 2011-01-12 14:07:47 UTC
My guess is that the NetBeans installer tried to execute some utility whose name matched some Git-specific utility on PATH. Attached is the list of executables installed and added to PATH by the Git installer.
Comment 5 dlipin 2011-01-12 14:21:28 UTC
Please run
netbeans-6.9.1-ml-windows.exe --extract
then
"C:\Program Files\Java\jdk1.6.0_23\bin\java.exe" -jar bundle.jar > out.txt 2>&1

And attach resulting out.txt. That would clarify at which point that error message is produced.
Comment 6 Marian Petras 2011-01-13 06:50:23 UTC
Created attachment 104946 [details]
output of "java.exe -jar bundle.jar"

I did not see the message this time (with installer launched with "java -jar bundle.jar").

That seemed interesting to me so I uninstalled NetBeans again and installed it the common way - and this time I did see the message.

I forgot to say that the message is always displayed at the end of uninstallation process, too.
Comment 7 Ondrej Vrabec 2011-04-17 16:58:27 UTC
*** Bug 197820 has been marked as a duplicate of this bug. ***
Comment 8 Ondrej Vrabec 2011-04-22 09:49:34 UTC
(In reply to comment #6)
> Created an attachment (id=104946) [details]
> output of "java.exe -jar bundle.jar"
> 
> I did not see the message this time (with installer launched with "java -jar
> bundle.jar").

The message is yet logged:
> [2011-01-13 07:31:08.993]:         ... creating JFileChooser object to check possible issues with UI
> fatal: Not a git repository (or any of the parent directories): .git
> [2011-01-13 07:31:09.196]:         ... getting default Toolkit to check possible issues with UI

I tried to reproduce (installed Git, added Git\cmd and Git\bin onto PATH) but was unsuccessful. Marian, can you run the installer several times in a row (using java.exe -jar bundle.jar) and check if the message is still logged on the same place (after 'creating JFileChooser object to check possible issues with UI')? Since the message is logged during the installer startup, you don't need to go through the whole installation process, just wait for the installer to initialize and check the output.
Because looking at the relevant code, there's no external process called (http://hg.netbeans.org/core-main/file/tip/nbi/engine/src/org/netbeans/installer/utils/UiUtils.java#l274).
Comment 9 StChamond 2011-06-10 15:48:48 UTC
Hello.

Now I've installed NetBeans 7.0 (jdk-6u26-nb-7_0-windows-ml.exe) and got the same error message.
Git-1.7.4-preview20110204 is installed on my computer with "Git Cheetah" Explorer extension.
When I disabled Git Cheetah using ShellExtView (http://www.nirsoft.net/utils/shexview.html) and repeated NetBeans installation, "not a git repository" error message gone.

BTW, same error appears in Far Manager, version 2.0 (build 1807) x86 when I trying to open files or folders context menu using EMenu plugin. Error message is appeared not in command prompt, but in background of console window.

Therefore this is Git Cheetah problem, I think.
Comment 10 StChamond 2011-06-10 15:51:32 UTC
Created attachment 108843 [details]
Screenshot of Far Manager with same error message
Comment 11 Marian Petras 2011-06-11 10:50:26 UTC
I think I have TortoiseGit installed at work (where I observed the bug). Uninstalling it might help. But I do not want to risk breaking my development environment by reinstalling Git and NetBeans so I will not try it.
Comment 12 DYarb 2011-06-27 16:47:20 UTC
Created attachment 109135 [details]
Example case of JFileChooser and Git interaction

Hi, 

I'm new here, so I hope I'm doing this correctly.  

I found this bug report while searching for a solution to this same problem, but that was occurring in one of my own applications.

I isolated to problem to a call to the JFileChooser constructor.

I have attached a simple test case which illustrates the problem.  I included a non-GIT directory (c:\) and a git directory ('c:\gittest').  The former reports the fatal not a git repository error, while the latter does not.

output:
c:\workspace> java GitAndJFileChooser
Before JFileChooser constructor
fatal: Not a git repository (or any of the parent directories): .git
Before showOpenDialog
After showOpentDialog
Now trying on a Git repository directory
Before JFileChooser constructor [git directory]
Before showOpenDialog  [git directory]
After showOpentDialog  [git directory]

My JRE version is:
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

git was installed from Git-1.7.4-preview20110204.exe

The only git directory in my path is c:\program files\git\cmd, and the git command is git.cmd from that directory.

I hope this is helpful.
Comment 13 ssanders 2011-10-05 14:20:33 UTC
I am getting this with same specs and Git installed but with NetBeans 7.1 beta.
Comment 14 dlipin 2011-12-08 21:41:36 UTC
The idea is any *stderr* caught during installer run is shown after installer is fininished. 

That usually helps to catch mysterious issues and show them to user, mostly in case when main installer window was not shown at all. So, at least, we show some this message and user got a feeling that something got bad rather than not to show anything.

But some programs (and even java itself) dump unnecessary staff to stderr see e.g. Bug 105165. Sometimes it is just diagnostic message, sometimes it is a real error and thus should be reported somehow.

Let me propose a patch to fix this issue. In 2 words, we would filter known diagnostic messages (as of now - this git one and another from java launcher) and show error message with stderr after installer is finished with non-zero exit code (i.e. something went wrong during installation).
Comment 15 dlipin 2011-12-08 21:42:26 UTC
Created attachment 113980 [details]
Patch for nbi/engine/native/launcher/windows/src/Launcher.c
Comment 16 dlipin 2011-12-08 21:47:19 UTC
Created attachment 113981 [details]
Rebuilt nbi/engine/native/launcher/windows/dist/nlw.exe with patch to Launcher.c applied

NB: nlw.exe should be rebuilt using Microsoft Platform SDK tooling and not cygwin one.
http://wiki.netbeans.org/NBIBuildRequiredSoftware

E.g. I have always used the following command on my system with Microsoft tools installed:
"C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\nmake.exe" /f Makefile-vc-wo-crt
Comment 17 Libor Fischmeistr 2012-04-11 11:52:19 UTC
(In reply to comment #16)
> Created attachment 113981 [details]
> Rebuilt nbi/engine/native/launcher/windows/dist/nlw.exe with patch to
> Launcher.c applied
> 
> NB: nlw.exe should be rebuilt using Microsoft Platform SDK tooling and not
> cygwin one.
> http://wiki.netbeans.org/NBIBuildRequiredSoftware
> 
> E.g. I have always used the following command on my system with Microsoft tools
> installed:
> "C:\Program Files\Microsoft Platform SDK for Windows Server 2003
> R2\Bin\nmake.exe" /f Makefile-vc-wo-crt

Thank you very much. I have fixed this exactly as you described.

Fixed in changeset: core-main/rev/fd9a226b315e
Comment 18 dlipin 2012-04-11 12:16:32 UTC
I hope you've rebuild nlw.exe by yourself :) The one that I've attached to this issue was created a few months ago, and after that I already have changed.

See history:
http://hg.netbeans.org/core-main/log/tip/nbi/engine/native/launcher/windows/dist/nlw.exe

If haven't do that, and don't have environment set up for that (and Jirka does not have it as well) as in Commnent 16, please let me know - I can re-build nlw.exe again with the fresh sources.
http://netbeans.org/bugzilla/show_bug.cgi?id=194242#c16
Comment 19 Libor Fischmeistr 2012-04-11 12:27:29 UTC
Yes, I have built it by myself using MS Visual Studio 2010. I was fighting a little bit with it, but I hope the final nlw.exe is fine.

I also made some test on Win7 and WinXP and it seem's everything is ok...

Thanks