LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Open Source Code Control Project - Perforce

I'm having a problem getting access to SCC (Perforce) from within LabWindows.  Everything works fine through the Perforce P4V graphical interface, where I can check-in / out , etc...  but when I try to set it up from within the LabWindow Environment (Options-->Environment--> Source Code Control),  I get an error pop-up saying that it is "Unable to Open Source Code Control Project".

In the "Source Control" debug window, I get the following message: "ERROR: Path 'C:\Program Files\National Instruments\CVI80/*' is not under client's root 'C:\Program Files\Sandbox'."

I also tried to set up the error log through Perforce, and get the following:
...
10:26:57 1: OpenProject(bd354f0)
10:26:57 1:   User:
10:26:57 1:   ProjName:
10:26:57 1:   LocalProjPath: c:\Program Files\National Instruments\CVI80\
10:26:57 1:   AuxProjPath:
10:26:57 1:   Comment:
10:26:57 1:   TextOutProc: 1032b4c5
10:26:57 1:   Flags: 2
10:26:57 2:   AuxProjPath empty; showing config dialog.
10:27:05 C:   p4 users andern4
10:27:05 C:   p4 job -o
10:27:05 C:   p4 info
10:27:06 C:   p4 job -o
10:27:06 1:   AuxProjPath changed to: P4SCC#gustav:1818##andern4##njaLP15_Powerage
10:27:06 1:   Client root: C:\Program Files\Sandbox
10:27:06 C:   p4 client -o njaLP15_Powerage
10:27:07 E:   Path 'C:\Program Files\National Instruments\CVI80/*' is not under client's root 'C:\Program Files\Sandbox'.
10:27:07 2:   Running p4 where on local project path returned no depot path
10:27:07 1:   Result: SCC_E_INVALIDFILEPATH, elapsed time=9542/9542ms
10:27:09 1: GetCommandOptions(bd354f0)
...

Unfortunatley, I am neither a Perforce nor a CVI expert, so am at a bit of a loss for how to troubleshoot this ??   any perforce / CVI users out there that can give me some help !?

0 Kudos
Message 1 of 13
(9,594 Views)
Hi NJA,
 
LabWindows/CVI uses the P4CLIENT Perforce environment variable to determine what client workspace to use. Thus you need to make sure that the P4CLIENT environment variable is set to the name of the client workspace that is intended to be used by CVI.  The P4CLIENT variable should already be set up as your workspace when you install perforce. If not, then you can just set it up once and then be done with it.  If you are not pointing to the correct workspace, then you will get the "path is not under the client's root" error message.
 
To set the P4CLIENT variable, you can launch the command prompt and say
 
set p4CLIENT workspacename   ''' where workspacename is the name of your workspace"
 
Hope this helps!
 
Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 2 of 13
(9,589 Views)
That DID help!   I'm still trying to get my arms around the client configuration in Perforce, but using p4 set P4CLIENT=//mycomputername/myworkspace
along with p4 set P4PORT=server:port#     seemed to do the trick!

oh, and I had to apply the source control info to both the CVI enviroment and the project .  maybe just restarting CVI would have been effective!?

Thank\s,
0 Kudos
Message 3 of 13
(9,580 Views)
Okay, it seems to have broken again.  I just keep getting an "Unable to Open Source Code Control Project" pop-up again. 

When I check p4 info from the cmd prompt, here's what I get...  looks okay to me.

C:\>p4 info
User name: andern4
Client name: njaLP15_Powerage
Client host: MAKELR1-D4
Client root: C:\Sandbox
Current directory: c:\
Client address: 172.23.43.109:1696
Server address: gustav:1818
Server root: /projects/codebase/perforce/source
Server date: 2007/09/27 17:51:55 -0700 PDT
Server version: P4D/SOLARIS8SPARC/2006.2/113956 (2007/01/09)
Server license: Medtronic Emergency Response Systems 30 users (support ends 2008
/02/01)

I tried to redo the p4 set P4CLIENT=njaLP15_Powerage  as well as  p4 set P4PORT=gustav:1818,   but unlike last time, this didn't seem to fix my problem??

any thoughts?
0 Kudos
Message 4 of 13
(9,398 Views)

HI NJA,

Well that should have worked as I have perforce on my own dev machine and it works fine.  When you attempt to connect to Perforce via CVI, does the Source Control window show any errors (i.e. like ERROR: Path xxxx is no under client's root xxx)?

You said it worked in an earlier post so did this just start happening? What changed between then and now?

In the Source Code Control Options dialog, there is an Advanced button that you can select. This will open a Preferences dialog which allows you to select the "Enable logging to a file" option. This file shows all the steps Perforce is taking and hopefully why it’s failing.  See if that gives you any relevant information.

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 5 of 13
(9,390 Views)
If I just open CVI by itself (vs. launching a .prj from P4V),  I first get an error telling me that

"LabWindows/CVI has detected that the Perforce Command Line Client is not installed or configured correctly on this computer.   National Instruments recommends that you install this component from the Perforce installer in order for the Source Code Control integration in LabWindows/CVI to work correctly."

Then I get the "Unable to Open Source Code Control Project" message

Then, in the Source Control Debug window (tab) I get the following.
 ERROR: Connect to server failed; check $P4PORT.
 ERROR: TCP connect to 1666 failed.
 ERROR: connect: 1666: WSAECONNREFUSED


The log shows the following:
08:06:09 1: Initialize(b3432c0)
08:06:09 1:   CallerName: LabWindows/CVI
08:06:09 1:   SccName set to: Perforce
08:06:09 1:   SccCaps set to: 107e1db8
08:06:09 1:   AuxPathLabel set to: Perforce Project
08:06:09 1:   CheckoutCommentLen set to: 0
08:06:09 1:   CommentLen set to: 1024
08:06:09 1:   Result: SCC_OK, elapsed time=1/1ms
08:06:20 1: OpenProject(b3432c0)
08:06:20 1:   User:
08:06:20 1:   ProjName:
08:06:20 1:   LocalProjPath: c:\Program Files\National Instruments\CVI80\
08:06:20 1:   AuxProjPath: P4SCC#1666##user1##LP15
08:06:20 1:   Comment:
08:06:20 1:   TextOutProc: 1032b4c5
08:06:20 1:   Flags: 2
08:06:21 E:   Connect to server failed; check $P4PORT.
08:06:21 E:   TCP connect to 1666 failed.
08:06:21 E:   connect: 1666: WSAECONNREFUSED
08:06:21 2:   Unable to open workspace
08:06:21 1:   Result: SCC_E_INITIALIZEFAILED, elapsed time=1113/1114ms
08:09:09 1: Initialize(b342b20)
08:09:09 1:   CallerName: LabWindows/CVI
08:09:09 1:   SccName set to: Perforce
08:09:09 1:   SccCaps set to: 107e1dbc
08:09:09 1:   AuxPathLabel set to: Perforce Project
08:09:09 1:   CheckoutCommentLen set to: 0
08:09:09 1:   CommentLen set to: 1024
08:09:09 1:   Result: SCC_OK, elapsed time=1/1ms
08:09:10 1: OpenProject(b342b20)
08:09:10 1:   User:
08:09:10 1:   ProjName:
08:09:10 1:   LocalProjPath: c:\program files\national instruments\cvi80\
08:09:10 1:   AuxProjPath:
08:09:10 1:   Comment:
08:09:10 1:   TextOutProc: 1032b4c5
08:09:10 1:   Flags: 2
08:09:10 2:   AuxProjPath empty; showing config dialog.
08:09:13 2:   User canceled config dialog
08:09:13 1:   Result: SCC_I_OPERATIONCANCELED, elapsed time=3008/3009ms
08:09:14 1: GetCommandOptions(b342b20)
08:09:14 1:   Command: 10
08:09:14 1:   Options: 0 -> 0
08:09:14 1:   Result: SCC_I_ADV_SUPPORT, elapsed time=1/3010ms
08:09:16 1: GetCommandOptions(b342b20)
08:09:16 1:   Command: 10
08:09:16 1:   Options: 107e1510 -> 0
08:09:19 1:   Result: SCC_I_OPERATIONCANCELED, elapsed time=2993/6003ms


... basically, it looks like the port is not getting set properly ?   Why is it trying to connect to 1666?


Then ... I tried to uninstall, and reinstall Perforce, and I don't get the initial error message, but it still fails to Open Source Code Control Project.

here is the error log on the second attempt (after re-installing Perforce)

08:24:51 1:   Result: SCC_OK, elapsed time=7408/10966ms
08:24:53 1: Uninitialize(bb41348)
08:24:53 1:   Total elapsed time on context: 10966
08:25:17 1: Initialize(bb033a8)
08:25:17 1:   CallerName: LabWindows/CVI
08:25:17 1:   SccName set to: Perforce
08:25:17 1:   SccCaps set to: 107e1dbc
08:25:17 1:   AuxPathLabel set to: Perforce Project
08:25:17 1:   CheckoutCommentLen set to: 0
08:25:17 1:   CommentLen set to: 1024
08:25:17 1:   Result: SCC_OK, elapsed time=1/1ms
08:25:17 1: OpenProject(bb033a8)
08:25:17 1:   User:
08:25:17 1:   ProjName:
08:25:17 1:   LocalProjPath: C:\Sandbox\
08:25:17 1:   AuxProjPath:
08:25:17 1:   Comment:
08:25:17 1:   TextOutProc: 1032b4c5
08:25:17 1:   Flags: 2
08:25:17 2:   AuxProjPath empty; showing config dialog.
08:25:19 C:   p4 users andern4
08:25:20 C:   p4 job -o
08:25:20 C:   p4 info
08:25:21 C:   p4 job -o
08:25:22 1:   AuxProjPath changed to: P4SCC#gustav:1818##andern4##njaLP15_Powerage
08:25:22 1:   Client root: C:\Sandbox
08:25:22 C:   p4 client -o njaLP15_Powerage
08:25:22 2:   Running p4 where on local project path returned no depot path
08:25:22 1:   Result: SCC_E_INVALIDFILEPATH, elapsed time=4758/4759ms
08:25:23 1: GetCommandOptions(bb033a8)
08:25:23 1:   Command: 10
08:25:23 1:   Options: 0 -> 0
08:25:23 1:   Result: SCC_I_ADV_SUPPORT, elapsed time=1/4760ms
08:25:25 1: GetCommandOptions(bb033a8)
08:25:25 1:   Command: 10
08:25:25 1:   Options: 107e1510 -> 0
08:25:28 1:   Result: SCC_OK, elapsed time=3071/7831ms
08:25:28 1: Uninitialize(bb033a8)
08:25:28 1:   Total elapsed time on context: 7831
0 Kudos
Message 6 of 13
(9,385 Views)
Hi NJA,

That error message basically means that your environment variables are not configured correctly for CVI to read. The Perforce log clearly indicates that there is a problem with the variables, specificallyt he P4PORT variable. I'm not sure what changed on your machine but it looks like something did.

You need to open the command prompt and call p4 set to see what the variables are set to. Then you need to set the variables P4PORT, P4CLIENT, P4USER, and maybe P4ROOT. 

For example calling p4 set on my machine produces

P4CLIENT=JNEWTON (set)
P4EDITOR=C:\WINDOWS\system32\notepad.exe (set)
P4PORT=perforce:1666 (set -s)
P4USER=jnewton (set)

Try setting up those variables

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 7 of 13
(9,373 Views)
I've set all of these variable through a cmd prompt to no avail.  It's almost as though something is stuck or pointing somewhere else to get the P4PORT and P4CLIENT information?  I've even tried using a .p4config file to see if I could get past this.

here's what I see when I do p4 info:
H:\>p4 info
User name: andern4
Client name: njaLP15_Powerage
Client host: MAKELR1-D4
Client root: C:\Sandbox
Current directory: h:\
Client address: 172.23.43.109:3990
Server address: gustav:1818
Server root: /projects/codebase/perforce/source
Server date: 2007/09/28 14:52:46 -0700 PDT
Server version: P4D/SOLARIS8SPARC/2006.2/113956 (2007/01/09)

here's what I see when I do p4 set:
H:\>p4 set
P4CLIENT=njaLP15_Powerage (set)
P4EDITOR=C:\winnt\system32\notepad.exe (set)
P4PORT=gustav:1818 (set)
P4ROOT=C:\Sandbox (set)
P4USER=andern4 (set)

still unable to attach. 

Here is the log.txt info:
14:49:37 1: Uninitialize(3f8a510)
14:49:37 1:   Total elapsed time on context: 13256
14:49:40 1: Initialize(3fd7e20)
14:49:40 1:   CallerName: LabWindows/CVI
14:49:40 1:   SccName set to: Perforce
14:49:40 1:   SccCaps set to: 107e1dbc
14:49:40 1:   AuxPathLabel set to: Perforce Project
14:49:40 1:   CheckoutCommentLen set to: 0
14:49:40 1:   CommentLen set to: 1024
14:49:40 1:   Result: SCC_OK, elapsed time=1/1ms
14:49:40 1: OpenProject(3fd7e20)
14:49:40 1:   User:
14:49:40 1:   ProjName:
14:49:40 1:   LocalProjPath: C:\Sandbox\
14:49:40 1:   AuxProjPath:
14:49:40 1:   Comment:
14:49:40 1:   TextOutProc: 1032b4c5
14:49:40 1:   Flags: 2
14:49:40 2:   AuxProjPath empty; showing config dialog.
14:49:42 C:   p4 users andern4
14:49:42 C:   p4 job -o
14:49:42 C:   p4 info
14:49:43 C:   p4 job -o
14:49:43 1:   AuxProjPath changed to: P4SCC#gustav:1818##andern4##njaLP15_Powerage
14:49:43 1:   Client root: C:\Sandbox
14:49:43 C:   p4 client -o njaLP15_Powerage
14:49:44 2:   Running p4 where on local project path returned no depot path
14:49:44 1:   Result: SCC_E_INVALIDFILEPATH, elapsed time=3519/3520ms
14:49:46 1: GetCommandOptions(3fd7e20)
14:49:46 1:   Command: 10
14:49:46 1:   Options: 0 -> 0
14:49:46 1:   Result: SCC_I_ADV_SUPPORT, elapsed time=0/3520ms
14:50:09 1: Uninitialize(3fd7e20)
14:50:09 1:   Total elapsed time on context: 3520
14:53:32 1: Initialize(bb933a8)
14:53:32 1:   CallerName: LabWindows/CVI
14:53:32 1:   SccName set to: Perforce
14:53:32 1:   SccCaps set to: 107e1dbc
14:53:32 1:   AuxPathLabel set to: Perforce Project
14:53:32 1:   CheckoutCommentLen set to: 0
14:53:32 1:   CommentLen set to: 1024
14:53:32 1:   Result: SCC_OK, elapsed time=0/0ms
14:53:33 1: OpenProject(bb933a8)
14:53:33 1:   User:
14:53:33 1:   ProjName:
14:53:33 1:   LocalProjPath: C:\Sandbox\
14:53:33 1:   AuxProjPath:
14:53:33 1:   Comment:
14:53:33 1:   TextOutProc: 1032b4c5
14:53:33 1:   Flags: 2
14:53:33 2:   AuxProjPath empty; showing config dialog.
14:53:38 C:   p4 users andern4
14:53:38 C:   p4 job -o
14:53:38 C:   p4 info
14:53:39 C:   p4 job -o
14:53:39 1:   AuxProjPath changed to: P4SCC#gustav:1818##andern4##njaLP15_Powerage
14:53:39 1:   Client root: C:\Sandbox
14:53:39 C:   p4 client -o njaLP15_Powerage
14:53:40 2:   Running p4 where on local project path returned no depot path
14:53:40 1:   Result: SCC_E_INVALIDFILEPATH, elapsed time=7140/7140ms
14:53:41 1: GetCommandOptions(bb933a8)
14:53:41 1:   Command: 10
14:53:41 1:   Options: 0 -> 0
14:53:41 1:   Result: SCC_I_ADV_SUPPORT, elapsed time=1/7141ms
14:53:42 1: Uninitialize(bb933a8)
14:53:42 1:   Total elapsed time on context: 7141

0 Kudos
Message 8 of 13
(9,368 Views)
Hi NJA,

Can you post your clientspec from Perforce? From the error log, it looks like your passing in your client root as the path which I don't believe is legal.  Hopefully your client spec and the error log you sent us will provide us with some more insight.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 9 of 13
(9,337 Views)
# A Perforce Client Specification.
#
#  Client:      The client name.
#  Update:      The date this specification was last modified.
#  Access:      The date this client was last used in any way.
#  Owner:       The user who created this client.
#  Host:        If set, restricts access to the named host.
#  Description: A short description of the client (optional).
#  Root:        The base directory of the client workspace.
#  AltRoots:    Up to two alternate client workspace roots.
#  Options:     Client options:
#                      [no]allwrite [no]clobber [no]compress
#                      [un]locked [no]modtime [no]rmdir
#  SubmitOptions:
#                      submitunchanged/submitunchanged+reopen
#                      revertunchanged/revertunchanged+reopen
#                      leaveunchanged/leaveunchanged+reopen
#  LineEnd:     Text file line endings on client: local/unix/mac/win/share.
#  View:        Lines to map depot files into the client workspace.
#
# Use 'p4 help client' to see more about client views and options.

Client:    njaLP15_Powerage

Update:    2007/10/01 08:30:35

Access:    2007/10/01 08:27:21

Owner:    andern4

Host:    MAKELR1-D4

Description:
    Created by andern4.

Root:    C:\Sandbox\

Options:    noallwrite noclobber nocompress unlocked nomodtime normdir

SubmitOptions:    submitunchanged

LineEnd:    local

View:
    -//depot/... //njaLP15_Powerage/...
    //depot/TestEngineering/... //njaLP15_Powerage/TestEngineering/...

0 Kudos
Message 10 of 13
(9,329 Views)