GPCP Unhandled Exception

General discussions about working with the Component Pascal IDE and programming .NET using Gardens Point Component Pascal (GPCP)
Post Reply
Helpdesk
Posts: 26
Joined: Sat Jan 01, 2011 5:43 am
Contact:

GPCP Unhandled Exception

Post by Helpdesk » Tue Feb 22, 2022 11:02 pm

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:
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
Any idea where I might have made a mistake?

cfbsoftware
Site Admin
Posts: 457
Joined: Fri Dec 31, 2010 12:30 pm
Contact:

Re: GPCP Unhandled Exception

Post by cfbsoftware » Tue Feb 22, 2022 11:09 pm

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:

Code: Select all

echo %CPSYM%
On my system the command and resulting response looks like:

Code: Select all

C:\Users\CFB Software>  echo %CPSYM%
.;C:\GPCPx\symfiles\NetSystem\;C:\GPCPx\symfiles\;

Post Reply