curiousdannii-testing / inform7-imported-bugs

0 stars 0 forks source link

[I7-1635] [Mantis 1671] Cyclic assemblies involving values allowed #449

Closed curiousdannii-testing closed 2 years ago

curiousdannii-testing commented 2 years ago

Reported by : dfremont

Description :

While cyclic assemblies of objects are rejected with a Problem message, those involving values are allowed (at least in some cases). In the example below, the first assembly creates a color for the player, the second assembly creates a person liking that color, the first assembly creates another color for that person, and then the process stops. Presumably we should instead get a Problem message about infinite regress, as we do if we replace colors by things (actually we get issue #0001665, but Inform tries to issue the error).

Steps to reproduce :

Foo is a room.
A color is a kind of value.
Liking relates various things to various colors.
The verb to like means the liking relation.
Every person likes a color.
A person likes every color.

Additional information :

The result at runtime:

>relations
liking:
person >=> color 1
person >=> your color
yourself >=> your color

imported from: [Mantis 1671] Cyclic assemblies involving values allowed
  • status: Closed
  • resolution: Resolved
  • resolved: 2022-04-07T04:59:53+10:00
  • imported: 2022/01/10
curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by graham :
Fixed.

curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by dfremont :
I'm not going to submit a separate issue for this unless requested, since I think it only occurs in cases which should be caught by the cyclic assembly check, but changing the second-to-last line of the example to "Every person likes a color (called it)." produces a code 11 crash:

Exception Type:EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000038

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 ni 0x0005dcfd Vocabulary__get_ntb + 13
1 ni 0x00071a42 Preform__nt_bitmap_violates + 82
2 ni 0x0003142e Preform__parse_nt_against_word_range + 1118
3 ni 0x000325fd Preform__parse_nt_against_word_range + 5677
4 ni 0x000325fd Preform__parse_nt_against_word_range + 5677
5 ni 0x000d6ff0 Assertions_Creator_convert_instance_to_nounphrase + 2208
6 ni 0x000e542a Assertions_Maker_instantiate_related_common_nouns_r + 90
7 ni 0x000e42c1 Assertions_Maker_instantiate_related_common_nouns + 33
8 ni 0x000e00ae Assertions_Maker_make_assertion_recursive_inner + 10158
9 ni 0x000d737b Assertions_Maker_make_assertion_recursive + 59
10 ni 0x000d5d65 Assertions_Copular_make_assertion + 613
11 ni 0x000d5af4 Assertions_Copular_to_be + 212
12 ni 0x000d51d7 Assertions_Traverse_handle_sentence_with_primary_verb + 1063
13 ni 0x000d3995 Assertions_Traverse_traverse + 805
14 ni 0x0019bea7 TemplateFiles__interpret + 27463
15 ni 0x001f223d Main__core_inform_main + 1421
16 ni 0x001f1cab main + 43
17 ni 0x00001faa _start + 209
18 ni 0x00001ed8 start + 40

Instead changing the line to "Every person likes a color (called their)." produces an internal error:

Problem. An internal error has occurred: tried to register excerpt meaning out of range. The current sentence is 'A person likes every color' ; the error was detected at line 517 of "inform7/Chapter 10/Excerpt Meanings.w". This should never happen, and I am now halting in abject failure.