Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid 'buffer' parameter used in WRITE method #443

Closed
alexwiese opened this issue Feb 16, 2021 · 7 comments
Closed

Invalid 'buffer' parameter used in WRITE method #443

alexwiese opened this issue Feb 16, 2021 · 7 comments

Comments

@alexwiese
Copy link

Describe the bug

When there is a compilation warning and then a compilation error the Progress application compiler gives the correct error and warning messages, however PCT does not.

From Progress application compiler:

Compiling C:\git\pulse-staging\Explorer\src\servers\test-file.p
** WARNING--TRANSACTION keyword given within actual transaction level. (214)
** Field abc does not exist in table _File. (442)
** C:\git\pulse-staging\Explorer\src\servers\test-file.p Could not understand line 18. (196)

Using PCT the following message is displayed, but the script continues without error, causing our build process to report success incorrectly.

Invalid 'buffer' parameter used in WRITE method

If I fix the issue that causes the WARNING then PCT reports the error and fails correctly, so the warning appears to be what causes the issue.

[PCTCompile] PCTCompile - Progress Code Compiler
[PCTCompile] Error compiling file 'C:/git/pulse-staging/Explorer/src/servers/test-file.p' ...
[PCTCompile]  ... in main file at line 18 column 5
[PCTCompile]      FOR EACH _File FIELDS (abc) NO-LOCK:
[PCTCompile] -----^
[PCTCompile] ** Field abc does not exist in table _File. (442)
[PCTCompile]
[PCTCompile] 0 file(s) compiled
[PCTCompile] Failed to compile 1 file(s)

To Reproduce

Here is the minimal reproduction:

DEF TEMP-TABLE tt-test
    FIELD id AS CHAR.

PROCEDURE A:

    FOR EACH tt-test:
        DO TRANSACTION: 
            DO TRANSACTION: 
                DISPLAY id.
            END.
        END. 
    END.

END PROCEDURE.

PROCEDURE B:

    FOR EACH _File FIELDS (abc) NO-LOCK:
        DISPLAY "Test".
    END.    

END PROCEDURE.

Expected behavior
I expect the PCT tools to report the compilation error and for the build to fail, not silently succeed.

Environment

  • Windows 10 - 1909
  • OpenEdge 11.7.5
  • Ant 1.9.7
  • [PCTVersion] PCT Version : pct-217-master-76991b4f4ca4e07b8f0e75695d783ca43cbe204c

Additional context

@gquerret
Copy link
Contributor

Do you use any callback ? This line seems weird:

Invalid 'buffer' parameter used in WRITE method

No 11.7.5 available on the computer I'm currently using, just 12.2, but I can't reproduce the issue.

@alexwiese
Copy link
Author

@gquerret not using any callback.

		<echo message="Compiling procedures..."/>
		<PCTCompile destDir="${explorer.build.dir}\src" 
			stackSize="256" graphicalMode="true" numThreads="8" tempDir="${temp.dir}"> 					
			<PCTConnection dbName="${db.name}" logicalName="plswms" dbDir="${db.dir}" singleUser="${db.offline}" readOnly="true"/>

			<fileset dir="${explorer.src.dir}\src">
				<include name="**\*.p"/>
				<include name="**\*.w"/>
				<exclude name="support\**"/>
			</fileset>

			<propath>
				<pathelement location="${explorer.src.dir}"/>
				<pathelement location="${explorer.src.dir}\trig"/>
				<pathelement location="${explorer.src.dir}\src"/>
				<pathelement location="${common.src.dir}"/>
				<pathelement location="${dlc}\gui"/>
				<pathelement location="${dlc}\gui\adecomm.pl"/>
				<pathelement location="${dlc}\gui\adecomp.pl"/>
				<pathelement location="${dlc}\gui\adedict.pl"/>
				<pathelement location="${dlc}\gui\adeedit.pl"/>
				<pathelement location="${dlc}\gui\adeicon.pl"/>
				<pathelement location="${dlc}\gui\adeshar.pl"/>
				<pathelement location="${dlc}\gui\adeuib.pl"/>
				<pathelement location="${dlc}\gui\adeweb.pl"/>
				<pathelement location="${dlc}\gui\adexml.pl"/>
				<pathelement location="${dlc}\gui\dataadmin.pl"/>
				<pathelement location="${dlc}\gui\prodict.pl"/>
				<pathelement location="${dlc}\gui\protools.pl"/>
				<pathelement location="${dlc}\gui\OpenEdge.Core.pl"/>
				<pathelement location="${dlc}\gui\OpenEdge.BusinessLogic.pl"/>
				<pathelement location="${dlc}\gui\netlib\OpenEdge.Net.pl"/>
				<pathelement location="${dlc}"/>
				<pathelement location="${dlc}\bin"/>
				<pathelement location="${dlc}\src"/>
			</propath>
		</PCTCompile>

@gquerret
Copy link
Contributor

This comes from the multithreaded compiler, I now also have the error message. But I end up with a socket error which at least fails the build. In both cases, this is not the expected behavior, I'll fix that.

@gquerret
Copy link
Contributor

This comes from how the warning TRANSACTION keyword given within actual transaction level. (214) is handled. This specific message contains unknown values in its description, and that's incorrectly handled by the code sending information back to the Java process.
Fix will come soon.

@gquerret
Copy link
Contributor

This branch contains the fix: https://ci.rssw.eu/job/PCT/job/bugfix%252FPCT-443/9/
Can you try it before I merge it in the main branch ?

@alexwiese
Copy link
Author

@gquerret thanks for the quick response and fix.

I just tested it and it correctly fails as expected. All looks OK.

@gquerret
Copy link
Contributor

gquerret commented Feb 19, 2021

Merged in master. Release will happen later, the issue is less critical than I thought it was at the beginning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants