Issue 31862  —   An Application hang or an Application error occurs after using $ude to export .

Status:   Planned for resolution in 10.3.01

Solution available in patch(es):      10.3.01.009    9.7.05.009

Description:

 Summary:
 Uniface:
 An Application hang or an Application error occurs after using $ude to export
 to zip archive.
 Example statement after which this problem occurs:
 $1 = $ude("export", "component", V_NAME, "xml:exp.zip:%%V_NAME%%%.xml")
 Exporting to xml there is no problem:
 $1 = $ude("export", "component", V_NAME, "xml:exp.xml")
 works fine.

 Environment:
 +Uniface Version  : 9.7.05 / 10.3.01
 +Operating System : OS independent
 +Database         : DBMS independent
 +Browsers         : Browser independent

 Reproduction scenario
 1a. Start form executing the following script:
 variables
     string V_NAME
 endvariables

 if ($lfileexists("exp.zip") = 1)
     lfiledelete "exp.zip"
 endif
 V_NAME = "MYCOMPONENT"
 $1 = $ude("export", "component", V_NAME, "xml:exp.zip:%%V_NAME%%%.xml")
 if ($status < 0)
     putmess "%%$datim error exporting %%V_NAME%%% %%^procerror %%$procerror
 %%^procerrorcontext %%$procerrorcontext"
     message/error "%%$datim error exporting %%V_NAME%%% %%^procerror
 %%$procerror %%^procerrorcontext %%$procerrorcontext"
 endif
 or
 1b. Start the standard form in idf to export (Utilities -> Export)
    Fill in componentname MYCOMPONENT and Filename using zip
 exp.zip:mycomponent.xml

 2. Import this zip or xml in the zip in a new environment

 Expected Result
 Valid archive exp.zip created with xml export for component MYCOMPONENT
 Same form in available in the new environment.

 Actual Result
 In Uniface 9.7.05 an Application hang occurs
 In Uniface 10.3.01 an Application error occurs
 In both cases no valid archive is created.
 In Uniface 9.7.04 the result is a correct valid archive.

Workaround:

 There is a workaround by not using zip.
 
 For example:
 variables
     string V_NAME
 endvariables
 
 if ($lfileexists("custexp.xml") = 1)
     lfiledelete "custexp.xml"
 endif
 V_NAME = "MYCOMPONENT"
 $1 = $ude("export", "component", V_NAME, "xml:custexp.xml")
 if ($status < 0)
     putmess "%%$datim error exporting %%V_NAME%%% %%^procerror %%$procerror
 %%^procerrorcontext %%$procerrorcontext"
     message/error "%%$datim error exporting %%V_NAME%%% %%^procerror
 %%$procerror %%^procerrorcontext %%$procerrorcontext"
 endif

Notes: