|
|
Experienced member
Total posts: 43
Joined: Apr 9, 2017
|
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
|
|
|
|
|
Posted: Nov 8, 2017 |
[ # 1 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
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.
|
|
|
|
|
Posted: Nov 8, 2017 |
[ # 2 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
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.
|
|
|
|
|
Posted: Nov 8, 2017 |
[ # 3 ]
|
|
Experienced member
Total posts: 43
Joined: Apr 9, 2017
|
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!
|
|
|
|
|
Posted: Nov 8, 2017 |
[ # 4 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
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
|
|
|
|
|
Posted: Nov 9, 2017 |
[ # 5 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
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
|
|
|
|
|
Posted: Nov 9, 2017 |
[ # 6 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
Out of curiosity, what is the default setting there, Bruce?
|
|
|
|
|
Posted: Nov 9, 2017 |
[ # 7 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
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
|
|
|
|
|
Posted: Nov 9, 2017 |
[ # 8 ]
|
|
Experienced member
Total posts: 43
Joined: Apr 9, 2017
|
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
|
|
|
|
|
Posted: Nov 9, 2017 |
[ # 9 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
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.
[edit]
Is there any reason why it has to be in a single file? Can’t you just use multiple top files? Just curious.
[/edit]
|
|
|
|
|
Posted: Nov 9, 2017 |
[ # 10 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
Are you windows or linux?
and you can try text= triple your current value
|
|
|
|
|
Posted: Nov 9, 2017 |
[ # 11 ]
|
|
Experienced member
Total posts: 43
Joined: Apr 9, 2017
|
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.
|
|
|
|
|
Posted: Nov 9, 2017 |
[ # 12 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
Of course it uses less resources, size of the TOPIC files built will be smaller using shared code.
I will try your files again…
|
|
|
|
|
Posted: Nov 9, 2017 |
[ # 13 ]
|
|
Experienced member
Total posts: 43
Joined: Apr 9, 2017
|
Ok, thanks Bruce
Will be waiting for an update from you.
|
|
|
|
|
Posted: Nov 10, 2017 |
[ # 14 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
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).
|
|
|
|
|
Posted: Nov 12, 2017 |
[ # 15 ]
|
|
Experienced member
Total posts: 43
Joined: Apr 9, 2017
|
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!!!
|
|
|
|