Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dealing with "Out of Memory" errors
Thanks. I've so far been unable to use --debug-array, as it throws a Python error during compilation, which I suspected was because I'd downloaded the platform-independent version and used a separate Python installation. So, I have been trying to check array bounds by hand.

However, fuelled by your feedback, I tried installing a self-contained version of ZXBasic, pre-packaged with Python, on a different computer. Oddly enough I got the same error message, which makes me wonder if it is a problem in my code after all. So, I tried building a simple test program with --debug-array and it worked.

So, now I need to work out why my program can't be compiled with --debug-array. It throws the following error:

Traceback (most recent call last):
  File "/home/gb/zxbasic/zxbasic/", line 10, in <module>
    sys.exit(libzxbc.main())  # Exit
  File "/home/gb/zxbasic/zxbasic/src/libzxbc/", line 246, in main
  File "/home/gb/zxbasic/zxbasic/src/arch/zx48k/", line 1401, in start
  File "/home/gb/zxbasic/zxbasic/src/ast/", line 35, in visit
  File "/home/gb/zxbasic/zxbasic/src/arch/zx48k/", line 196, in visit_ARGLIST
    upper = node.parent.entry.bounds[i].upper
  File "/home/gb/zxbasic/zxbasic/src/symbols/", line 29, in __getitem__
    return self.children[key]
  File "/home/gb/zxbasic/zxbasic/src/ast/", line 40, in __getitem__
    return self._children[key]
IndexError: list index out of range

--though I don't know exactly where this happens in my code.

I'll keep digging. Thanks again,

Messages In This Thread
Dealing with "Out of Memory" errors - by georgeo - 03-08-2021, 01:09 PM
RE: Dealing with "Out of Memory" errors - by georgeo - 03-09-2021, 08:47 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)