Hi Guys,
I can't send all code because my client want confidentiality, but a bit of code that throws segmentation fault is:
OPEN "S32342323.DAT" FOR RANDOM AS #21 LEN = 58
FIELD #21, 4 AS I1$, 4 AS I2$, 21 AS I3$, 21 AS I4$, 1 AS I5$, 3 AS I6$, 4 AS I7$
FIELD #21, 2 AS J1$, 4 AS J2$, 2 AS J3$, 4 AS J4$, 4 AS J5$, 2 AS J6$, 2 AS J7$, 2 AS J8$, 2 AS J9$, 4 AS J10$, 4 AS J11$, 4 AS J12$, 4 AS J13$, 4 AS J14$, 4 AS J15$, 2 AS J16$, 4 AS J17$, 4 AS J18$
1210 KK = 0: I = 0: QTOT = 0
1220 FOR I = 1 TO NT
PRINT "ACESSANDO LINHA-> " + STR$(I):
1230 GET #21, I + 1: SINIC = J2$: IFIM = CVI(J3$): VAZAO1 = CVS(J4$): C1 = CVS(J5$)
'NUM30 = CVI(J6$)
'NUM45 = CVI(J7$): NUM60 = CVI(J8$): NUM90 = CVI(J9$)
PRINT "DADOS: ["; SINIC; " - "; IFIM; " - "; VAZAO1; " - "; C1; " - "; NUM30; " - "; NUM45; " - "; NUM60; " - "; NUM90; "]";
PRINT "DADOS"
1240 IF C1 = 0 THEN 1400
1250 COIFA = CVS(J10$): COTU30 = CVS(J11$): COTU45 = CVS(J12$): COTU60 = CVS(J13$): COTU90 = CVS(J14$): ENTRA = CVS(J15$): KSOMA = CVI(J16$): TEMP = CVS(J17$)
PRINT "DADOS: ["; COIFA; " - "; CUTU30; " - "; COTU45; " - "; COTU60; " - "; COTU90; " - "; ENTRA; " - "; KSOMA; " - "; TEMP; "]";
1260 IF COIFA <> 0 THEN ACEL = 1 ELSE ACEL = 0
NEXT I
This issue is random. The code runs fine in first run, but in next attempts i get segmentation fault: 11 our bus error: 10