Proxygen hangs

Posted by Admin on 05-Feb-2008 01:57

Hello,

I'm having a problem with Proxygen in OpenEdge 10.1A. Some (not all) .p's seem to hang the dll generation process. I haven't figured out what is causing this, since it seems to happen with really simple procedures like the one below:

ttCustomer.p:

DEFINE TEMP-TABLE ttCustomer NO-UNDO

FIELD CustId AS CHARACTER

FIELD CustName AS CHARACTER

INDEX idxPrim CustId.

DEFINE INPUT-OUTPUT PARAMETER TABLE FOR ttCustomer.

CREATE ttCustomer.

ASSIGN ttCustomer.CustId = "1":U

ttCustomer.CustName = "John Doe":U.

CREATE ttCustomer.

ASSIGN ttCustomer.CustId = "2":U

ttCustomer.CustName = "Joe Smith":U

When I start the generation, Proxygen seems to hang. When I go and look at the destination folder, all temporary generated source .cs files seem to be there while the log file is in use and still empty. When killing the csc.exe process in the taskmanager, Proxygen stops waiting for it and returns the error that the dll generation did not succeed. The temporary .cs files disappear and the logfile gets released. This is its contents:

    • ProxyGen, Progress Version 10.1A

    • Checking for existence of .r files ...

    • Processing non-persistent procedures ...

    • Processing: C:\ProxyGen\ttCustomer.r ...

-- Parsing r-code ...

MAIN C:\ProxyGen\ttCustomer.p

INPUT-OUTPUT ttCustomer TABLE

TABLE: ttCustomer

CustId character

CustName character

-- No customizations; Validation not necessary

    • Processing persistent procedures ...

    • Checking method and parameter names ...

    • Generating .NET proxies ...

Creating AssemblyInfo.cs ...

Creating ttCustomerSchema.cs ...

Creating ttAppObject.cs ...

Creating strongly typed datatable classes ...

c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe /t:exe /out:C:\ProxyGen\StrongTypesNS\ttCustomer.exe C:\ProxyGen\StrongTypesNS\ttCustomerSchema.cs

>>ERROR compiling .NET classes

Deleting intermediate files ...

>>WARNING: Could not delete temporary file or directory - it may be in use by another application. C:\ProxyGen\StrongTypesNS\ttCustomer.cs

>>WARNING: Could not delete temporary file or directory - it may be in use by another application. C:\ProxyGen\StrongTypesNS\ttCustomer.xsd

>>WARNING: Could not delete temporary file or directory - it may be in use by another application. C:\ProxyGen\StrongTypesNS

    • Generation failed

Search for '>>ERROR' and '>>WARNING' in this log to find any problems.

I've tried this on a colleague's pc but it has the same result.

Any ideas?

Thanx in advance,

Lieven

All Replies

Posted by Admin on 05-Feb-2008 02:04

"Hanging" is a strange result - I've never seen this with ProxyGen at all - I might consider reporting that to tech support.

Never the less, I've notieced that you build the Proxy with a .NET 2.0 SDK. I'm not sure if that has already been possible/supported in 10.1A. You might try to build the Proxy with the .NET 1.1 SDK.

Mike

Posted by Admin on 05-Feb-2008 02:24

Thanks for the info, I'll try that in a second.

Although for other simple procedures it seems to work. (sometime without hanging, sometimes with hanging but with a valid dll generated).

edit: Same result:

    • ProxyGen, Progress Version 10.1A

    • Checking for existence of .r files ...

    • Processing non-persistent procedures ...

    • Processing: C:\ProxyGen\ttCustomer.r ...

-- Parsing r-code ...

MAIN C:\ProxyGen\ttCustomer.p

INPUT-OUTPUT ttCustomer TABLE

TABLE: ttCustomer

CustId character

CustName character

-- No customizations; Validation not necessary

    • Processing persistent procedures ...

    • Checking method and parameter names ...

    • Generating .NET proxies ...

Creating AssemblyInfo.cs ...

Creating ttCustomerSchema.cs ...

Creating ttAppObject.cs ...

Creating strongly typed datatable classes ...

c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc.exe /t:exe /out:C:\ProxyGen\StrongTypesNS\ttCustomer.exe C:\ProxyGen\StrongTypesNS\ttCustomerSchema.cs

>>ERROR compiling .NET classes

Deleting intermediate files ...

>>WARNING: Could not delete temporary file or directory - it may be in use by another application. C:\ProxyGen\StrongTypesNS\ttCustomer.cs

>>WARNING: Could not delete temporary file or directory - it may be in use by another application. C:\ProxyGen\StrongTypesNS\ttCustomer.xsd

    • Generation failed

Search for '>>ERROR' and '>>WARNING' in this log to find any problems.

Message was edited by:

lieven

Posted by Admin on 05-Feb-2008 02:38

I'm not sure, how you categorize "simple". It makes a difference if you have temp-table or prodataset parameters. That requires the xsd generator from the .NET sdk. Procedures without these types of parameters just need the C# compiler (csc).

Posted by Admin on 05-Feb-2008 02:51

Hmmm...

I have installed the .NET framework 2.0 plus the SDK, and the framework of 1.1 without the SDK.

I'll get the 1.1 SDK and try again.

I'll keep you informed, thanks!

edit: It just won't work. I've installed the .NET 1.1 SDK and configured ProxyGen to use both csc.exe and xsd.exe from .NET 1.1 but keep getting the result as explained above...

Message was edited by:

lieven

Posted by Admin on 05-Feb-2008 03:28

It's seems like simple .p's containing no temp-tables succeed.

.p's containing a temp-table (not as parameter), hang the csc process BUT result in a usable dll.

.p's with a temp-table as parameter hang csc without resulting in anything usable...

Could anyone try to generate a dll using the above code?

Thanks.

Posted by Admin on 05-Feb-2008 03:53

Works for me. Using 10.1B and .NET SDK 1.1

Sorry. That's two changes to your environment, but I don't have a 10.1A installed anymore.


** ProxyGen, Progress Version 10.1B

** Checking for existence of .r files ...

** Processing non-persistent procedures ...

** Processing: C:\work\OpenEdge101B\project\test-lieven\updateCustomer.r ...
-- Parsing r-code ...
MAIN C:\work\OpenEdge101B\project\test-lieven\updateCustomer.p
INPUT-OUTPUT ttCustomer TABLE
TABLE: ttCustomer
CustId character
CustName character
-- No customizations; Validation not necessary

** Processing persistent procedures ...

** Checking method and parameter names ...

** Generating .NET proxies ...
Creating AssemblyInfo.cs ...
Creating ttCustomerSchema.cs ...
Creating Proxy.cs ...
Creating strongly typed datatable classes ...
C:\Progress\OpenEdge101B\dotnet\bin\PathFinder /csc
C:\Windows\Microsoft.NET\Framework\v1.1.4322\csc /t:exe /out:C:\work\OpenEdge101B\project\test-lieven\Test\PSDN\StrongTypesNS\ttCustomer.exe C:\work\OpenEdge101B\project\test-lieven\Test\PSDN\StrongTypesNS\ttCustomerSchema.cs
C:\work\OpenEdge101B\project\test-lieven\Test\PSDN\StrongTypesNS\ttCustomer.exe
C:\Progress\OpenEdge101B\dotnet\bin\PathFinder /xsd
C:\Program Files\Microsoft.NET\SDK\v1.1\Bin\xsd /d /n:Test.PSDN.StrongTypesNS C:\work\OpenEdge101B\project\test-lieven\Test\PSDN\StrongTypesNS\ttCustomer.xsd
Compiling .NET proxies and creating .dll ...
C:\Progress\OpenEdge101B\dotnet\bin\PathFinder /csc
C:\Windows\Microsoft.NET\Framework\v1.1.4322\csc /t:library "/r:C:\Progress\OpenEdge101B\dotnet\deploy\signed\Progress.o4glrt.dll" /out:C:\work\OpenEdge101B\project\test-lieven\Test\PSDN\Proxy.dll C:\work\OpenEdge101B\project\test-lieven\Test\PSDN\StrongTypesNS\ttCustomer.cs C:\work\OpenEdge101B\project\test-lieven\Test\PSDN\Proxy.cs C:\work\OpenEdge101B\project\test-lieven\Test\PSDN\AssemblyInfo.cs
Deleting intermediate files ...

** Generation complete

Posted by Admin on 05-Feb-2008 04:40

Because I have both 1.1 and 2.0 of the .NET framework installed, I have to use the absolute path to csc.exe and xsd.exe. When leaving the default setting I immediately get an Exception on PathFinder.exe, which I assume should return where csc.exe and xsd.exe are located.

I'll remove .NET 2.0 completely and try again.

Thanks for the support!

    • ProxyGen, Progress Version 10.1A

    • Checking for existence of .r files ...

>>WARNING The following .r was removed from AppObject ttAppObject since it could not be found: C:\appserver\ttCustomer.r

    • Processing non-persistent procedures ...

    • Processing persistent procedures ...

    • Checking method and parameter names ...

    • Generating .NET proxies ...

Creating AssemblyInfo.cs ...

Creating ttAppObject.cs ...

Compiling .NET proxies and creating .dll ...

C:\Progress\OpenEdge\dotnet\bin\PathFinder /csc

Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.

at Progress.PathFinder.GetCSCDir()

at Progress.PathFinder.Main(String[] args)

csc /t:library "/r:C:\Progress\OpenEdge\dotnet\deploy\signed\Progress.o4glrt.dll" /out:C:\appserver\ttAppObject.dll C:\appserver\ttAppObject.cs C:\appserver\AssemblyInfo.cs

Uitzondering tijdens uitvoering

Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.

at Progress.PathFinder.GetCSCDir()

at Progress.PathFinder.Main(String[] args)

csc //CreateProcess: "

Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.

at Progress.PathFinder.GetCSCDir()

at Progress.PathFinder.Main(String[] args) error=2. (7246)

>>ERROR occurred trying to start executable. Its specified path is probably not correct, or its default path cannot be determined.

Deleting intermediate files ...

    • Generation failed

Search for '>>ERROR' and '>>WARNING' in this log to find any problems.

Posted by Admin on 05-Feb-2008 04:50

Removing the V2 SDK is a rather hard measure. I'd use the absolute paths using the custom compiler options in ProxyGen instead.

Posted by Admin on 05-Feb-2008 06:04

I know it's a hard measure, but .NET 2.0 was only installed for testing purposes so it's no big deal. Meanwhile the problem isn't solved. Using the default setting I keep getting an Exception in "PathFinder" (also for other .p's that worked before, both on 1.1 and 2.0 framework), and when using the hardcoded path to the exe's I keep getting the hanging csc.exe...

Posted by Admin on 06-Feb-2008 08:29

I've installed service pack 2 of OE 10.1A but this hasn't resolved the problem...

Posted by Admin on 06-Feb-2008 11:48

You still get the PathFinder exceptions? Does it work with hardcoding the path to csc and xsd?

Posted by Admin on 07-Feb-2008 05:06

When using the hardcoded path I don't get PathFinder errors, but it still doesn't work.

I've set up a virtual XP installation on vmware with nothing but OE 10.1A installed and there it works, so there's nothing wrong with my .p's or .r's

I'm mailing with someone from PSC support and we got a little further already. It seems like the generated ttCustomerSchema.cs, which compiles to ttCustomer.exe does not get executed automatically (which ProxyGen commands it to do I guess). The exe should produce ttCustomer.xsd, which is used later on. Manually executing the exe works, but ProxyGen seems to hang on it. (Also manually executing it while Proxygen is hanging doesn't help, I thought that maybe it would pick up the generated file and continue but that's not the case).

greets

Lieven

Posted by Admin on 07-Feb-2008 13:34

I remember similar issues, years and years ago. There is a switch which keeps the generated files, I don't remember the flag. I twas something you had to change in one of the batch files in the $DLC-bin directory. You want want to query the knowledge base for that.

Than you will see where the generation stops...

You might want to start a DOS-box with the proper environment variables set. Than start proxygen.

Posted by Admin on 08-Feb-2008 00:05

That's the -leaveproxyfiles option to the runbproxygen.bat script stored in the directory where the xpxg file is stored. Additional flags are documented in $DLC/bin/bproxygen.bat

Posted by Admin on 18-Feb-2008 04:17

Problem solved.

There was an extra space at the end of the path for the csc.exe file, removing the space solved the problem.

I've proposed an extra TRIM() of the csc path for a next version of ProxyGen.

Greets

Lieven

This thread is closed