Issue 31722 — Changing the index of a Struct node can cause crash
Status: Planned for resolution in 10.4.01
Solution available in patch(es): 10.3.02.031 9.7.05.044
Description:
Summary: Changing the index of a Struct node can cause a crash when querying the different nodes afterwards. Environment: +Uniface: * Version 9.5.01 (and higher) +Operating System: * OS independent +Database: * DBMS independent Symptoms: Consider the following scenario: a struct is created with two members. These are then re-ordered, and examined - the first one shows as the second one, and examining the second one will crash Uniface. Here's the corresponding code: variables numeric nVarCount, nVarTotal struct stVarMyStruct, stVarMyTest1, stVarMyTest2 endvariables stVarMyStruct = $newstruct stVarMyStruct->"test1" = $newstruct stVarMyStruct->"test1"->"1" = 1 stVarMyStruct->"test1"->"2" = 2 stVarMyStruct->"test1"->"3" = 3 stVarMyStruct->"test2" = $newstruct stVarMyStruct->"test2"->"1" = 4 stVarMyStruct->"test2"->"2" = 5 stVarMyStruct->"test2"->"3" = 6 nVarCount = 1 nVarTotal = stVarMyStruct->$membercount nVarTotal = nVarTotal - 1 while ( nVarCount <= nVarTotal ) stVarMyStruct->*{nVarCount}->$index = -1 nVarCount = nVarCount + 1 endwhile stVarMyTest1 = stVarMyStruct->*{1} ;should be test2 but is test1 stVarMyTest2 = stVarMyStruct->*{2} ;should be test1 but will have crashed on this line of code
Workaround:
There is no known workaround for this problem.
Notes: