Author |
Topic: Internal Error 15 (Read 1472 times) |
|
JLThompson
New Member
member is offline
Posts: 6
|
|
Internal Error 15
« Thread started on: Sep 9th, 2014, 4:18pm » |
|
My first try at using this resulted in an "Internal Error 15." No explanation anywhere I can find. What is this?
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Internal Error 15
« Reply #1 on: Sep 9th, 2014, 5:40pm » |
|
on Sep 9th, 2014, 4:18pm, JLThompson wrote:My first try at using this resulted in an "Internal Error 15." No explanation anywhere I can find. What is this? |
|
That is an internal 'Bad subscript' error. The most likely cause would be that you have exceeded the maximum allowed number of objects of a given type. The limits in LBB are currently set as follows:
Number of program lines: 65535 Number of labels: 10000 Number of FUNCTIONs: 1000 Number of SUBs: 1000 Number of GLOBALs: 1000 Number of STRUCTs: 1000 Number of arrays: 1000 Number of handles: 1000 Number of string variables: 1000 Number of FUNCTION or SUB parameters: 100 Does your program exceed any of these limits? If you don't think so, send me a copy (or a link) so I can try it for myself.
Richard.
|
|
Logged
|
|
|
|
JLThompson
New Member
member is offline
Posts: 6
|
|
Re: Internal Error 15
« Reply #2 on: Sep 9th, 2014, 5:44pm » |
|
I am sure that it exceeds several of these limits. I had hoped that this would save me from having to build a massive network to get the speeds I need. No way I can make my program so small, though, as to let it use this.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Internal Error 15
« Reply #3 on: Sep 9th, 2014, 6:42pm » |
|
on Sep 9th, 2014, 5:44pm, JLThompson wrote:No way I can make my program so small, though, as to let it use this. |
|
Those limits aren't "small"! LBB is used to compile what, as far as I know, is the largest program ever written in Liberty BASIC, Cabinet Planner, with about 100,000 lines in three modules:
http://www.cabinetplanner.com/
The current limits, whilst generous, are in most cases arbitrary so if you need any of them increased just let me know and I will release an updated version.
Richard.
|
|
Logged
|
|
|
|
JLThompson
New Member
member is offline
Posts: 6
|
|
Re: Internal Error 15
« Reply #4 on: Sep 9th, 2014, 7:05pm » |
|
Well, this is an AI experiment 10 years in the writing. It has to be large. I have well over 1,000 string variables, well over 1,000 arrays, could be over 1,000 handles, the lines might be over 65,535 too, I would have to check. Could all of these limits be increased?
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Internal Error 15
« Reply #5 on: Sep 9th, 2014, 8:02pm » |
|
on Sep 9th, 2014, 7:05pm, JLThompson wrote:Could all of these limits be increased? |
|
They can all be increased, but there's an issue as far as the total line count is concerned. If an error occurs at run-time the line number is reported, but that can only be a 16-bit number so in the event of there being more than 65535 lines in total the reported line number would be evaluated 'MOD 65536'.
A program of that size is always going to be difficult to maintain. Have you considered the possibility of splitting it into multiple modules, which you can develop and test separately? If each module can run as a separate process that would also have a performance benefit, because on a multi-core PC the load could be spread across multiple CPUs.
Richard.
|
|
Logged
|
|
|
|
JLThompson
New Member
member is offline
Posts: 6
|
|
Re: Internal Error 15
« Reply #6 on: Sep 9th, 2014, 9:22pm » |
|
I can see how to split it into 2-3 separate modules running on 2-3 networked computers, with 30,000 lines each, or so. I seem to have 3,000 to 4,000 arrays, as an estimate. String variables? Hard to estimate. Same with handles, presuming you are referring to [placeMarkersOfThisSort]. If these three settings could all be increased to 5,000, though, it would likely encompass my program.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Internal Error 15
« Reply #7 on: Sep 9th, 2014, 9:40pm » |
|
on Sep 9th, 2014, 9:22pm, JLThompson wrote:I can see how to split it into 2-3 separate modules running on 2-3 networked computers, with 30,000 lines each, or so. |
|
With a careful choice of inter-process communication (IPC) you should be able to arrange that the modules can run either on separate computers or on separate cores/CPUs on the same PC.
Quote:I seem to have 3,000 to 4,000 arrays, as an estimate. |
|
It seems likely that this is the main limiting factor then. Incidentally LBB's arrays, unlike LB4's arrays, are not limited to two dimensions so I wonder if you can take advantage of that to reduce the total number:
Code: dim array$(3,4,5,6)
array$(1,2,3,4) = "Hello world!"
print array$(1,2,3,4)
Quote:Same with handles, presuming you are referring to [placeMarkersOfThisSort]. |
|
No, they are labels, for which the current limit is 10,000. Handles are prefixed by # (e.g. #file, #dll or #window).
Richard.
|
|
Logged
|
|
|
|
JLThompson
New Member
member is offline
Posts: 6
|
|
Re: Internal Error 15
« Reply #8 on: Sep 9th, 2014, 9:51pm » |
|
OK then, I would only need the array and string limits increased. I see what you mean about rewriting for different dimensions, but that would take far too much time at this stage.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Internal Error 15
« Reply #9 on: Sep 10th, 2014, 11:11am » |
|
on Sep 9th, 2014, 9:51pm, JLThompson wrote:OK then, I would only need the array and string limits increased. |
|
I have updated LBB to version 2.71 in which the maximum number of arrays and (non-local) string variables has been increased to 5000. There are no other changes.
Richard.
|
|
Logged
|
|
|
|
JLThompson
New Member
member is offline
Posts: 6
|
|
Re: Internal Error 15
« Reply #10 on: Sep 10th, 2014, 7:00pm » |
|
Thank you very much, that is very generous of you. I tested it on my previous prototype, which has similar parameters, and it worked this time. Even found a number of bugs that Just Basic didn't catch. Hard to tell on a program with a variable run time, but it looks like it runs 2 to 6 times faster on this. This jumps my project ahead by months or even years, and saves me several hundred dollars to boot. Once again, thank you!
|
|
Logged
|
|
|
|
|