codefori / vscode-rpgle

RPGLE language tools for VS Code
MIT License
39 stars 20 forks source link

Some problem The RPGLE language client server crashed 5 times in the last 3 minutes. The server will not be restarted. #244

Closed ibmiiste closed 1 year ago

ibmiiste commented 1 year ago

Hi,

I got this problem (see in the text file). Do you know what is it? And could you please help me?

proble rpg server.txt

Regards,

Olivier.

worksofliam commented 1 year ago

Are you using Code for IBM i 2.1.0 and vscode-rpgle 0.21.0?

ibmiiste commented 1 year ago

Yes I am.

worksofliam commented 1 year ago

@ibmiiste Have you restarted VS Code since updating the extensions?

ibmiiste commented 1 year ago

Yes I have, several times.

worksofliam commented 1 year ago

@ibmiiste Are you able to share some code that is causing the crash?

ibmiiste commented 1 year ago

It is for all cases however this is an example of code:

**FREE
// >>PRE-COMPILER<<
//   >>CRTCMD<<  CRTRPGMOD MODULE(&LI/&OB) SRCFILE(&SL/&SF) +
//                 SRCMBR(&SM);
//   >>IMPORTANT<<
//     >>PARM<<  OPTION(*EVENTF);
//     >>PARM<<  DBGVIEW(*LIST);
//     >>PARM<<  TRUNCNBR(*NO);
//   >>END-IMPORTANT<<
//   >>CMD<<  CRTSRCPF FILE(QTEMP/FTPCMD) RCDLEN(240);
//   >>EXECUTE<<
//   >>CMD<<  DLTF FILE(QTEMP/FTPCMD);
// >>END-PRE-COMPILER<<
/copy qcpysrc,cpyctlstm

dcl-f ftpcmd usage(*output) rename(ftpcmd:ftpcmdf) usropn;
/copy qcpysrc,inhbuilder

/Copy Qcpysrc,prtbuilder

dcl-proc ECRITURE_SCRIPT_FTP export;
  dcl-pi ECRITURE_SCRIPT_FTP;
    l_USER like(r_profil);
    l_MDP like(r_profil);
    l_Nom_Objet char(128);
    l_chemin_origine like(r_chemin);
    l_CHEMIN_destination like(r_chemin);
  End-Pi;

  dcl-s l_seq packed(6:2) inz(1);

  Monitor;
    open ftpcmd;

    srcseq=l_seq;
    srcdat=*zero;
    srcdta = %trimr(l_USER) + ' ' + l_MDP;

    write ftpcmdf;

    l_seq+=1;
    srcseq=l_seq;
    srcdat=*zero;
    srcdta='NAMEFMT 1';

    write ftpcmdf;

    l_seq+=1;
    srcseq=l_seq;
    srcdat=*zero;
    srcdta='bin';

    write ftpcmdf;

    l_seq+=1;
    srcseq=l_seq;
    srcdat=*zero;
    srcdta='cd ' + %trim( l_CHEMIN_destination);

    write ftpcmdf;

    l_seq+=1;
    srcseq=l_seq;
    srcdat=*zero;
    srcdta='lcd ' + %trim( l_chemin_origine);

    write ftpcmdf;

    l_seq+=1;
    srcseq=l_seq;
    srcdat=*zero;
    srcdta='put ' + %trim( l_Nom_Objet) + '.FILE';

    write ftpcmdf;

    l_seq+=1;
    srcseq=l_seq;
    srcdat=*zero;
    srcdta='quit';

    write ftpcmdf;

    close ftpcmd;

  On-error;
    Dump(a);
    Gest_erreur();
  Endmon;

  return;
end-proc;
worksofliam commented 1 year ago

When it crashes, can you share the contents of the RPGLE language client output?

image
ibmiiste commented 1 year ago

You will find it in the text file:

RPG crash log.txt

worksofliam commented 1 year ago

Oh, this sticks out to me:

Project Mode enabled: true
Starting search of: d:\Data\OneDrive - ista\Documents\git\I_builder
Found RPGLE files: 40

This is a local project I take it?

worksofliam commented 1 year ago

I have managed to recreate it - looking into it.

worksofliam commented 1 year ago

@ibmiiste I found the issue. As of 0.21.0, we finally added include/copy member resolving, but since your source was local and you weren't connected it was just crashing. 0.21.1 will fix this issue.

ibmiiste commented 1 year ago

Great job! Thanks!