Open BlueCat0 opened 1 year ago
When I build sre from my laptop, it crash when load rule file. I checked it and found the action file load earlier than base file, which will cause crash here. https://github.com/Speech-Rule-Engine/speech-rule-engine/blob/cc46b71d739bc0104c36e8147e0d91a5acffa06d/ts/rule_engine/speech_rule_engine.ts#L820-L826
I found lib/mathmaps was createad by makefiles https://github.com/Speech-Rule-Engine/speech-rule-engine/blob/cc46b71d739bc0104c36e8147e0d91a5acffa06d/Makefile#L71-L86 it should be noticed that for in loop in bash not guarantee alphabetical order, it depends on locale.
lib/mathmaps
for in
in my case, when LANG was set to zh_CN.UTF-8, the merged json file order will cause crash.
LANG
zh_CN.UTF-8
"base/rules/clearspeak_base_actions.min" "base/rules/clearspeak_base.min"
and when set LC_COLLATE to C, it will has same order with released file.
LC_COLLATE
C
"base/rules/clearspeak_base.min" "base/rules/clearspeak_base_actions.min"
add this env to makefile will help.
Thanks for reporting this. I was not aware of the bash feature.
bash
When I build sre from my laptop, it crash when load rule file. I checked it and found the action file load earlier than base file, which will cause crash here. https://github.com/Speech-Rule-Engine/speech-rule-engine/blob/cc46b71d739bc0104c36e8147e0d91a5acffa06d/ts/rule_engine/speech_rule_engine.ts#L820-L826
I found
lib/mathmaps
was createad by makefiles https://github.com/Speech-Rule-Engine/speech-rule-engine/blob/cc46b71d739bc0104c36e8147e0d91a5acffa06d/Makefile#L71-L86 it should be noticed thatfor in
loop in bash not guarantee alphabetical order, it depends on locale.in my case, when
LANG
was set tozh_CN.UTF-8
, the merged json file order will cause crash.and when set
LC_COLLATE
toC
, it will has same order with released file.add this env to makefile will help.