omecra / de.omecra.oedt.updatesite

OEDT Plug-in Updatesite - Issue Repository for OEDT
12 stars 0 forks source link

Oedt Dependency Build begin . end. length. #191

Closed ccecvb closed 1 month ago

ccecvb commented 1 month ago

Workspace was working without issues Now I get

An internal error occurred during: "Oedt Dependency Build for Project: CceFramework".
begin 516, end 199, length 747

.log contains

!ENTRY org.eclipse.core.jobs 4 2 2024-07-28 08:41:41.759
!MESSAGE An internal error occurred during: "Oedt Dependency Build for Project: CceFramework".
!STACK 0
java.lang.StringIndexOutOfBoundsException: begin 516, end 199, length 747
    at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4606)
    at java.base/java.lang.String.substring(String.java:2709)
    at de.omecra.oedt.internal.core.project.model.builder.OedtSourceCompilationUnitBuilder.getPreprocValue(OedtSourceCompilationUnitBuilder.java:1698)
    at de.omecra.oedt.internal.core.project.model.builder.OedtSourceCompilationUnitBuilder.getIncludeParameterMap(OedtSourceCompilationUnitBuilder.java:1682)
    at de.omecra.oedt.internal.core.project.model.builder.OedtSourceCompilationUnitBuilder.updateIncludes(OedtSourceCompilationUnitBuilder.java:788)
    at de.omecra.oedt.internal.core.project.model.builder.OedtSourceCompilationUnitBuilder.updateProcedures(OedtSourceCompilationUnitBuilder.java:1093)
    at de.omecra.oedt.internal.core.project.model.builder.OedtSourceCompilationUnitBuilder.createMembers(OedtSourceCompilationUnitBuilder.java:501)
    at de.omecra.oedt.internal.core.project.model.builder.OedtSourceCompilationUnitBuilder.buildCompilationUnit(OedtSourceCompilationUnitBuilder.java:134)
    at de.omecra.oedt.internal.core.project.model.builder.OedtSourceFileParser.parseFile(OedtSourceFileParser.java:81)
    at de.omecra.oedt.internal.core.project.model.builder.OedtSourceFileParser.parseFile(OedtSourceFileParser.java:60)
    at de.omecra.oedt.internal.core.project.builder.OedtDeltaBuild.checkChanges(OedtDeltaBuild.java:112)
    at de.omecra.oedt.internal.core.project.builder.OedtDependencyBuild.getDeltaBuild(OedtDependencyBuild.java:257)
    at de.omecra.oedt.internal.core.project.builder.OedtDependencyBuild$1.run(OedtDependencyBuild.java:173)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
ccecvb commented 1 month ago

Update the above error disappeared by closing all files and closing the project.

During Compile missing rcode I now get errors on refresh, but the "Suspend native refresh hook during compilation" is active

!ENTRY org.eclipse.core.resources 4 1 2024-07-28 09:02:02.780
!MESSAGE Problems occurred refreshing resources
!SUBENTRY 1 org.eclipse.core.resources 4 1 2024-07-28 09:02:02.780
!MESSAGE Problem occurred in auto-refresh native code: 5.
ccecvb commented 1 month ago

A colleague had the same issue

ccecvb commented 1 month ago

@lneumeier I have the issue again, none of the steps above seem to help. I deleted all .metadata/plugin/oedt/ files related to this project but I still get the error.

Any ideas where I should look ?

ccecvb commented 1 month ago

@lneumeier I found the culprit in a particular source.

The issue is caused by includes containing includes in it's parameters (not the nicest construct)

        { cceinc/waitforframe.i
            &frame=F-PASSWORD
            &title=L-TITLE
            &block=PASSWORD:
            &condition="while true"
            &init_frame="
                L-COMMIT = no.
                display newpswd1 newpswd2.
                disable all.
                enable NEWPSWD1 NEWPSWD2 B-PASSW-OK B-PASSW-CANCEL.
                "
            &after_waitfor="
                L-COMMIT = yes.
                assign newpswd1 newpswd2.
                if newpswd1 <> newpswd2
                then do:
// include inside include
                    ~{ cceinc/alert.i &mesid=PWD-02 ~}
                    assign
                        newpswd1 = ''
                        newpswd2 = ''.
                    next PASSWORD.
                end.
                L-CREDENTIALS = new Consultingwerk.Framework.UserCredentials().
                assign
                    L-CREDENTIALS:UserName = {&file}.XU-N
                    L-CREDENTIALS:Password = newpswd1.
                run ccetools/xus_setpassword-b.p (L-CREDENTIALS).
                leave PASSWORD.
// include inside include
                ~{ cceinc/catchmessage.i ~}
                "
            &before_hide="disable all."
        }
lneumeier commented 1 month ago

Fixed in OEDT 9.5.5.