Large SQLite database and appstudioFunctions.js

Hey guys,

An existing project that has been running for years,is all-of-a-sudden throwing an exception on startup which is preventing further execution. The exception error:

“appstudioFunctions.js / RangeError: Maximum call stack size exceeded. line 2246 column 76.”

Nothing about the project has been changed except an update made to the tools from BS3 to BS4 using your utility. The project seems to run better in Chrome on the development machine; the error is taking place from the deployed project when running on my target (iPhone 11 Pro Max - ioS 14.4.2. I had previously noted that a label field update was not taking place any longer - a simple label.Text assignment made in sub Main(). Could this be related?

Thanks …

Are you running on the device as a web app or compiled with VoltBuilder?

It’s running as a web app.

  • Sent from my iPhone -

I don’t see any obvious reason why this could be happening. You’ll have to dig for more information.

Is there any other information on the Safari Remote Console?

Can you put some console.log("Here I am") statements in your code to figure out what operation is triggering this?

Never mind, I’ll just retire the project. I have made no modifications to it for years and now it’s throwing an exception. Why this is my problem I’m not sure I understand. I don’t care to get into a debugging session with it at this point, it’s not that important.

Thanks for your time,


Sorry if you found me busybody.My wild guess is you are calling nested function .so the stack can no longer handle it.

You’re not being a “busybody”.

The thing that’s funny is that the NSBasic code in the project hasn’t been changed in 5 years. There’s no doubt in my mind that something about the platform (where this is concerned) has changed. I understand what stack errors are but nothing the source code (again written in BASIC) hasn’t changed for years. Something in the way the product is emitting the underlying Javascript has changed. I don’t see this as my responsibility to debug. Now, had this happened as the result of some code change that I had made I’d pursue the matter myself.

If NSBasic would like a copy of the project so they can debug the lower levels of what the compiler/interpreter is emitting, then I’ll be glad to send it.

I’m not trying to be difficult, simply that I don’t see this in any way the fault of the NSBasic code which, again, has been completely functional for years.

  • bruce

We’d love to have a look at it. The first thing I would have to do here is to make the smallest program which reproduces the issue. Since you know your program inside out, you would be able to do this step in a fraction of the time. It would be a big help if you could simplify the issue as much as possible.

I just tried to attach a ZIP file with the project in it and went through a lengthy description of what was wrong – you server rejected the email and Google didn’t even care to keep a copy for me so I wouldn’t have to recompose it. Let me know where I can send a copy of the project, I’m not going to go through that long description again … the project just ain’t that important.

It wouldn’t have been our server rejecting it - but Gmail likely would have.

Try using a service like WeTransfer or Dropbox Transfer.


Sorry if I’ve seemed impatient here, I’ve just been impatient! :wink:

Anyway, I just sent you a link to WWFHelper.ZIP which contains the project.

On the latest NSBasic it runs fine in Chrome but never reaches Sub Main() in the deployed version. I’ve put a msgBox() as the first line of Main() and it never reaches this.



Thanks. Got your project and was able to reproduce the issue. I’ll let you know what we find.

Excellent. Thanks.

Found the problem - and it was worth finding.

Your app has a SQLite database with 178,000 English words. There’s nothing wrong with that in itself - but the method we recently started to use to evaluate it can’t handle a database that big. It runs fine on the desktop, but the more limited memory on an iOS device limits it.

We’ll fix it - thanks for helping us find this.

That’s good news. I’ll look forward to the fix. Thanks.

Do you still have the BS3 version of your project? I’d like to try that one on iOS as well and compare the results.

Sorry … don’t think I have that any longer.

Let me know you find it. I thought the problem might be due to recent changes, but instead there seems to be a limit on the size of database which can be imported. Did the database change at all?

Nope. Nothing about the project changed, it was only updated to the latest GUI controls using the Framework Converter.

Any news on the SQLite fix? Howz it going?