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..

[Raspberry Pi] Segmentation Fault on :build 0 (Finally..)
 
 

Two issues with version 11.1 Compiled for Raspberry Pi (armvl7):
1) Only responds with “Welcome”
2) “Build 0” causes Segmentation Fault
(TOPIC/ has github cloned BUILD0 and BUILD1 - same behavior if first clear TOPIC/)

ChatScript EVSERVER Version 11.1 pid24618 32 bit LINUX compiled Feb 28 2021 12:43:46 host=local
Params
:   dict:2097151 fact:800000 text:100000kb hash:215127 
          buffer
:80x80kb cache:1x5000kb userfacts:100 outputlimit:80000 loglimit:80000
WordNet
dict=201193  fact=86286  heap=11082372 Feb06 21-11:58:54
Build0
:  dict=8116  fact=59579  heap=108600 Compiled:Jan23 21-13:22:51 by version 11.0  0
Build1
:  dict=11  fact=1  heap=4296 Compiled:Feb08 21-09:47:11 by version 11.0 test
Used 46MB
dict 209,321 (16745kbhashdepths 3150.13356.27948.38876.40920.33588.23681.14472.7479.3660.1386.504.182.56.30.16.17words 209321 unusedbuckets 777 fact 145,866 (7001kbheap 11318kb
           buffer 
(6400kbcache (5000Wkb)
Free 120MBdict 1,887,829 fact 654,134 stack/heap 88,681KB 


System created in 2559 ms

Enter user name
user1

TEST
:   Welcome
user1
:  What is your name?
TEST:   Welcome                             ----    REPEATED WELCOME
user1
:  :build 0                               ----    SEGMENTATION FAULT
 0  ChatScript Version 11.1  compiled Feb 28 2021 12
:43:46
./cs.shline 324618 Segmentation fault       
/home/pi/Carl/Examples/Chatbots/ChatScript/active/BINARIES/ChatScript local 

 

 

 
  [ # 1 ]

Also happens on MacOS Big Sur on Mac mini 2018.  Submitted issue on github:

https://github.com/ChatScript/ChatScript/issues/60

 

 
  [ # 2 ]

Managed to fix it.

1) Recompiled with symbols:  make clean debugserver
2) set ulimit -c unlimited to generate core file
3) Ran program from inside gdb (otherwise “no stack” if “gdb -c core, file ChatScriptDebug”):

gdb --args ChatScriptDebug local
(gdbrun
...
user7: :build 0
...
Program received signal SIGSEGVSegmentation fault.
0x0017d388 in BugBacktrace (out=0x8a5a58at os.cpp:1732
1732         
if (frame->rulestrncpy(rule,frame->rule,50);
(
gdbwhere
#0  0x0017d388 in BugBacktrace (out=0x8a5a58) at os.cpp:1732
#1  0x0017f090 in BugLog (name=0x7eff0568 "LOGS/bugs.txt", folder=0x885fcc <logsfolder> "LOGS", bug=0x8a5a58, located=0x7efef9b0 "") at os.cpp:2153
#2  0x0017fb90 in Log (channel=10, fmt=0x26e2d8 "No such directory %s\r\n") at os.cpp:2330
#3  0x0017b98c in getdir (dir="VERIFY", files=std::vector of length 0, capacity 0) at os.cpp:1203
#4  0x0017bc18 in WalkDirectory (directory=0x26f6b8 "VERIFY", function=0x1b5e80 <EmptyVerify(char*, uint64)>, flags=0, recursive=false) at os.cpp:1307
...

(
gdbquit


mkdir 
../VERIFY 

And the build succeeded.

 

 

 
  [ # 3 ]

And to fix issue 1 (for Raspberry Pi and Mac builds), “introduction keeps repeating” see:

https://www.chatbots.org/ai_zone/viewreply/27712/

 

 
  login or register to react