Closed curiousdannii-testing closed 2 years ago
557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:
Comment by zarf :
By all means consider changing the CM code back once this compiler bug is fixed.
557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:
Comment by dfremont :
As suggested by the note above, this happens whenever a various-to-various relation of things is asserted to relate a thing to a non-thing (e.g. rooms, directions, and regions). Interestingly, the reverse doesn't cause the crash. Small test case:
Foo is a room.
Quoggle relates various things to various things.
The verb to quog means the quoggle relation.
The player quogs Foo.
[Foo quogs the player.]
557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:
Comment by Angstsmurf :
The crash on Linux was fixed by commit https://github.com/i7/counterfeit-monkey/commit/8516b4b1e29de7302da0a75317e817cfdd93c1b5 . It is a single line changing "A subject is a kind of object" to "A subject is a kind of thing".
See also https://github.com/i7/counterfeit-monkey/issues/58#issuecomment-257094097 .
The mentioning relation in CM relates quips to things. While subjects were objects, all subjects listed in mentioning relations were silently ignored by the compiler on OS X and Windows, just like rooms in #1921 . Occasionally, it would also crash just like on Linux.
Duplicate of Mantis 1921.
Reported by : zarf
Description :
This error is silently ignored on MacOS and Windows in the normal configuration, but it causes a ni crash on Linux. The error can be uncovered on MacOS by running ni from the command line with debugging malloc active:
setenv DYLD_INSERT_LIBRARIES /usr/lib/libgmalloc.dylib
setenv MALLOC_STRICT_SIZE 1
setenv MALLOC_PROTECT_BEFORE 1
Steps to reproduce :
Additional information :
The stack trace at the point of the crash:
0 ni 0x000a9778 Relations__compile_vtov_storage + 1224
imported from: [Mantis 1948] Buffer underrun error in ni1 ni 0x000a916c BinaryPredicates__SUBJ_compile + 508
2 ni 0x00158a8d InferenceSubjects__compile_all + 413
3 ni 0x0015b57c World_Compile_compile + 172
4 ni 0x001a4885 TemplateFiles__interpret + 38821
5 ni 0x001a0cb2 TemplateFiles__interpret + 23506
6 ni 0x001fa820 Main__core_inform_main + 1568
7 ni 0x001fa1fb main + 43
8 ni 0x00001bfd _start + 212
9 ni 0x00001b28 start + 40