Any idea where I might have made a mistake?Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at GPBinFiles.GPBinFiles.findOnPath(Char[] pathName, Char[]
fileName) in
c:\Users\xxxx\CurrentProjects\CVS-GPCP-NET\sources\libs\csharp\GPBinFiles.cs:line
95
at NewSymFileRW.SymFileReader.Parse(BlkId scope) in NewSymFileRW.cp:line 1162 at NewSymFileRW.ImpResScope.ReadThisImport(BlkId imp) in NewSymFileRW.cp:line 2147 at NewSymFileRW.NewSymFileRW.WalkImports(ScpSeq& imps, BlkId modI) in NewSymFileRW.cp:line 2182 at CPascalP.CPascalP.ImportList(BlkId modScope) in CPascalP.cp:line 467 at CPascalP.CPascalP.CPmodule() in CPascalP.cp:line 235 at CPascalP.CPascalP.Module() in CPascalP.cp:line 3437 at CPascalP.CPascalP.Parse() in CPascalP.cp:line 3457 at CPascal.CPascal.Compile(Char[] nam, Int32& retVal) in CPascal.cp:line 138 at gpcp.gpcp..CPmain(String[] A_0) in gpcp.cp:line 42
GPCP Unhandled Exception
GPCP Unhandled Exception
I have installed Component Pascal and CPIde on my Windows 10 laptop. When I try to compile the simple "Hello World" example within CPIde I see:
-
- Site Admin
- Posts: 525
- Joined: Fri Dec 31, 2010 12:30 pm
- Contact:
Re: GPCP Unhandled Exception
The clues in the exception traceback report are the procedure calls GPBinFiles.findOnPath and NewSymFileRW.SymFileReader.Parse.
This indicates to me that it is in the process of looking for symbol files on your path. As this is a new installation I suspect that the CPSYM environment variable required by GPCP has not been setup properly, or is not visible to your current Windows user when you are running the compiler. Refer to Section 2 in the GPCP Getting Started documentation.
You can check the value of CPSYM by starting a command prompt (e.g. by running cmd, or Start > All Programs > Accessories > Command Prompt)
In the command window type:
On my system the command and resulting response looks like:
This indicates to me that it is in the process of looking for symbol files on your path. As this is a new installation I suspect that the CPSYM environment variable required by GPCP has not been setup properly, or is not visible to your current Windows user when you are running the compiler. Refer to Section 2 in the GPCP Getting Started documentation.
You can check the value of CPSYM by starting a command prompt (e.g. by running cmd, or Start > All Programs > Accessories > Command Prompt)
In the command window type:
Code: Select all
echo %CPSYM%
Code: Select all
C:\Users\CFB Software> echo %CPSYM%
.;C:\GPCPx\symfiles\NetSystem\;C:\GPCPx\symfiles\;
-
- Posts: 1
- Joined: Wed Oct 04, 2023 7:35 pm
Re: GPCP Unhandled Exception
I just installed CP and CPIde 8.1 and I am having the same issue, as well as a couple others when compiling the example projects.
I verified that CPSYM is set and that the dirs/folders in CPSYM are correct.
I can compile Hello.cp using gpcp at the command line without errors:
But attempting to compile with CPIde results in this exception:
I verified that CPSYM is set and that the dirs/folders in CPSYM are correct.
Code: Select all
echo %CPSYM%
.;C:\Users\jonro\gpcp-NET\symfiles;C:\Users\jonro\gpcp-NET\symfiles\NetSystem
Code: Select all
C:\Prj\CP\Hello>gpcp Hello.cp
#gpcp: Created Hello.exe
#gpcp: <Hello> No errors
Code: Select all
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at GPBinFiles.GPBinFiles.findOnPath(Char[] pathName, Char[] fileName) in c:\Users\john\CurrentProjects\CVS-GPCP-NET\sources\libs\csharp\GPBinFiles.cs:line 95
at NewSymFileRW.SymFileReader.Parse(BlkId scope) in NewSymFileRW.cp:line 1162
at NewSymFileRW.ImpResScope.ReadThisImport(BlkId imp) in NewSymFileRW.cp:line 2147
at NewSymFileRW.NewSymFileRW.WalkImports(ScpSeq& imps, BlkId modI) in NewSymFileRW.cp:line 2182
at CPascalP.CPascalP.ImportList(BlkId modScope) in CPascalP.cp:line 467
at CPascalP.CPascalP.CPmodule() in CPascalP.cp:line 235
at CPascalP.CPascalP.Module() in CPascalP.cp:line 3437
at CPascalP.CPascalP.Parse() in CPascalP.cp:line 3457
at CPascal.CPascal.Compile(Char[] nam, Int32& retVal) in CPascal.cp:line 138
at gpcp.gpcp..CPmain(String[] A_0) in gpcp.cp:line 42
-
- Site Admin
- Posts: 525
- Joined: Fri Dec 31, 2010 12:30 pm
- Contact:
Re: GPCP Unhandled Exception
Maybe because you are using two different user names: john and jonro?