AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Crash with large top file
 
 

Hi,
I have a large top file (~60mb) with a large number of topics and rules.
The compilation completes as expected, but on the first interaction ChatScript crashes.
No logs are generated, just crash.

I tried to use some larger values for buffer and cache, but it didn’t make any difference.

Running on Windows 10.

Any suggestions on how to identify the source of the crash?

Thanks

 

 
  [ # 1 ]

One thing to try is to try to “compartmentalize” your top file, breaking it into smaller chunks (say, 5 or so) and only load one at a time to see if something specific is causing CS to crash. If none of the parts cause the crash, then it’s likely that it’s the size of the file itself that’s causing it, and I don’t know what to say at that point. If one portion crashes, but not the others, try combining the other files that didn’t trigger a crash and test that combined file to make sure IT won’t cause a crash, then continue splitting and testing the suspect top file (from this point just splitting it in half) until you have a file that’s of a manageable size, then go through it to find the cause. This is how I would address a problem of this sort.

 

 
  [ # 2 ]

First question is is it a crash or a controlled abort.  If the latter, there will be an entry in LOGS/bugs.txt

Otherwise, you could send me the topic folder via something like transferbigfiles or whatever and then I could load it and debug the crashs.

 

 
  [ # 3 ]

Thanks for the replies.

Bruce, the crash is not leaving any logs.

I followed Dave’s suggestion to split the file.
1. Running original file - 2M lines. Crash without any information or log files.
2. When reduced from 2M lines to 1M lines, instead of simply getting a notification about crash, started getting “Debug Error!”
“Run-Time Check Failure #2 - S”
3. When reduced to 500K lines - all works fine (tried both halves).

Hope the error message can help to understand the source of the issue, but I’m pretty sure it is related to the size limitation.
Is there anything that can be done about that?

Thanks!

 

 
  [ # 4 ]

I can fix it if i can find it. I will survey the code as is, and see if I can create a 2m line file to crash

 

 
  [ # 5 ]

Died running out of transient heap space.  I dont know the minimal setting needed, but I put this in my cs_init.txt file and it loaded.

text=10000000

 

 
  [ # 6 ]

Out of curiosity, what is the default setting there, Bruce?

 

 
  [ # 7 ]

varies on linux vs windows.


In windows, the param text which allocates the space, defaults to 100MB


after booting up the dictionary, std world data and a small program, the system has 85MB left in its stack/heap

 

 
  [ # 8 ]

When I try it, the response takes a long time, and it crashes anyhow.

I do: chatscript.exe local text=10000000

Anything else I’m missing?

Thanks

 

 
  [ # 9 ]

I think that at this point, if you haven’t done so already, it may be wise to send your top file to Bruce to see what he can make of the actual file, rather than an artificially large version that he’s made.

Or, if you prefer, you can attempt the arduously long process of compartmentalizing the file again, splitting it in half and trying each part separately to see if CS crashes, but this time with a twist. Let’s say that you split the file more or less in half (file A and file B), and both work by themselves. You then cut one page of code from file B, paste it into file A, then test file A again. Repeat the process until CS crashes again, then work backwards, this time taking a half page of code from file A and pasting it into file B for safe keeping, then test file A once more, this time looking for CS to NOT crash. At this point you know what whatever offending code is within that most recent half page of code, and you can continue the process either one line of code at a time (again, arduous), or by taking ever smaller portions of the suspect code until you find the culprit (or the offending file size). Just a suggestion. smile

[edit]
Is there any reason why it has to be in a single file? Can’t you just use multiple top files? Just curious. wink
[/edit]

 

 
  [ # 10 ]

Are you windows or linux?
and you can try text= triple your current value

 

 
  [ # 11 ]

Hey,
Dave, the splitting is not doing any good as of now.
Bruce, I’m on Windows.
I tried various values of text, but no luck yet.
My default value is 100000k
I tried: 300000, 1000000

Do I need to recompile each time I run with different argument?

Are there any other things I can do?

p.s. by the way I used an outputmacro per your advice to reduce the top file size, but I don’t think this makes the script use less resources or run any faster, just makes it more readable.

 

 
  [ # 12 ]

Of course it uses less resources, size of the TOPIC files built will be smaller using shared code.
I will try your files again…

 

 
  [ # 13 ]

Ok, thanks Bruce
Will be waiting for an update from you.

 

 
  [ # 14 ]

Windows is sensitive allocating large blocks of contiguous memory.
text=90000000   fails to allocate space for me
text=100000000 allocates and loads your program
but I was using int for byte count, which will also go negative for larger numbers so I fixed that (to release shortly).

In all failure instances I saw, there was a bug report generated (bottom of bugs.txt file).

 

 

 
  [ # 15 ]
Bruce Wilcox - Nov 10, 2017:

In all failure instances I saw, there was a bug report generated (bottom of bugs.txt file).

No matter what I do, no bugs are created. Is it possible that you have bugs because you are missing my dictionary?

Anyhow, will be waiting for the next release to check if can overcome this issue.

Thank you very much for all the support!!!

 

 1 2 > 
1 of 2
 
  login or register to react