I started using a slightly different area of my major test program - which doesn't do anything unusual.
It crashed with the following error: Assertion failed: str, file ../pdcurses/addstr.c, line 74
This was using the absolute latest 3.2 together with the latest pdc431 built this morning.
I tried again with same result.
I rebuilt pdc 430 & the latest 3.2 and got the same error.
I then went back to an older compiler version 3.1 built back in early 2020 which used pdc 3.9 and of course this worked perfectly.
I have attached screen copies of my program (about to crash) running under 3.2 with pdc430 and 3.2 with pdc431 and finally running perfectly well under 3.1 with pdc 3,9.
You will notice the screens are different - I'm not dummying this up.
The error message does seem to point to pdc - however the particular file it complains about is identical in 430 & 431.
I just can't see where anything I'm doing is causing this - same source code - same compile batch file - all I do is point my batch to the relevant compiler & press enter - the program runs perfectly well 90% of the time but when I select this particular option it crashes part way thru.
I'll see if I can narrow it down to a particular place.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think I've got it - the field I'm displaying when it crashes is sometimes nul ie: hex 00 hex 00 and whilst 3.1 & pdc 3.9 & 420 seem to accept it - 3.2 & pdc430 & 431 obviously do not.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Are you sure you display a field with the content low-value? That should work completely fine.
Or do you display a field or LINKAGE item which is for example BASED and does not have any data assigned?
Is the "offending" program compiled with --debug? If not: Does the behaviour change if it is?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's code i've inherited & don't quite understand the ramifications of it - basically there is a x(100) field which is 'based' (whatever that means). - I can't change that - it caused further complaints.
This field is then partially displayed ie: field(1:5) which appears to be causing the problem when it is null. This didn't happen in 3.1 only in 3.2 or 4.x. I've sorta coded round it (again).
Probably this can be bit bucketed as can most of my problems. :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please see the programmer's guide about BASED.
Instead of asserting in PDCurses it should raise a nice abort when compiled with --debug - please recheck. If that isn't the case then there would be a bug in cobc. If it is the case you can fix the program (or at least not have it asserting without --debug, not abending with it [in that place]) by applying the following change:
- DISPLAY var+ IF ADDRESS OF var NOT = NULL+ DISPLAY var+ END-IF
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK so everything is fine on the GnuCOBOL side and also on the PDCurses side.
You may want to keep that option to let GnuCOBOL check for this program error and may want to apply change(s) like the one above in the program.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I started using a slightly different area of my major test program - which doesn't do anything unusual.
It crashed with the following error:
Assertion failed: str, file ../pdcurses/addstr.c, line 74
This was using the absolute latest 3.2 together with the latest pdc431 built this morning.
I tried again with same result.
I rebuilt pdc 430 & the latest 3.2 and got the same error.
I then went back to an older compiler version 3.1 built back in early 2020 which used pdc 3.9 and of course this worked perfectly.
I have attached screen copies of my program (about to crash) running under 3.2 with pdc430 and 3.2 with pdc431 and finally running perfectly well under 3.1 with pdc 3,9.
You will notice the screens are different - I'm not dummying this up.
The error message does seem to point to pdc - however the particular file it complains about is identical in 430 & 431.
I also downloaded Arnold T's 3.1 with vbisam & pdc420 & it worked fine. ???
I just can't see where anything I'm doing is causing this - same source code - same compile batch file - all I do is point my batch to the relevant compiler & press enter - the program runs perfectly well 90% of the time but when I select this particular option it crashes part way thru.
I'll see if I can narrow it down to a particular place.
I think I've got it - the field I'm displaying when it crashes is sometimes nul ie: hex 00 hex 00 and whilst 3.1 & pdc 3.9 & 420 seem to accept it - 3.2 & pdc430 & 431 obviously do not.
The analysis about the version is correct. The change was implemented in https://github.com/Bill-Gray/PDCursesMod/commit/96f4984f9fb76a0546b71e3018e441224fe747ed#diff-e0a7461708027686ffaf0bc372f77e2d73dd0e2f96a51d31f7610b4fad98e30a
Are you sure you display a field with the content low-value? That should work completely fine.
Or do you display a field or
LINKAGE
item which is for exampleBASED
and does not have any data assigned?Is the "offending" program compiled with
--debug
? If not: Does the behaviour change if it is?Yes - it's a 'based' field.
It's code i've inherited & don't quite understand the ramifications of it - basically there is a x(100) field which is 'based' (whatever that means). - I can't change that - it caused further complaints.
This field is then partially displayed ie: field(1:5) which appears to be causing the problem when it is null. This didn't happen in 3.1 only in 3.2 or 4.x. I've sorta coded round it (again).
Probably this can be bit bucketed as can most of my problems. :)
Please see the programmer's guide about
BASED
.Instead of asserting in PDCurses it should raise a nice abort when compiled with
--debug
- please recheck. If that isn't the case then there would be a bug incobc
. If it is the case you can fix the program (or at least not have it asserting without --debug, not abending with it [in that place]) by applying the following change:I've recompiled with --debug & get the error - see attached - many thanks.
OK so everything is fine on the GnuCOBOL side and also on the PDCurses side.
You may want to keep that option to let GnuCOBOL check for this program error and may want to apply change(s) like the one above in the program.