davewx7 / citadel

A turn based strategy game based on the Anura engine
Other
97 stars 25 forks source link

Unknown card (Moment of Weakness), Crash on opening card pack #239

Open Fealthas opened 5 years ago

Fealthas commented 5 years ago

I sometimes crash when I open a card pack and it gives me an error about trying to open a non-existent card called "moment of weakness".

ghost commented 5 years ago

Is that a custom built client? What rev? Or is it the auto updated version?

Fealthas commented 5 years ago

Steam version

ghost commented 5 years ago

I think I know what is happening to you. If my suspicion is correct, your issue will just go away with the next server update.

Either the Steam client is somehow set after b73d4093e6 while the server being before it, or both are after b73d4093e6 but a server restart is pending.

pshem commented 5 years ago

I can confirm the bug on the non-Steam version

CRITICAL: formula.cpp:230 ASSERTION FAILED: formula_vm.cpp:457 ASSERTION FAILED: Assertion failed: (info is string|map) message: ["Unknown card","Moment of Weakness"] at in Virtual Machine: At modules/citadel/data/classes/citadel.cfg 92:
...fo is string|map) | ['Unknown card', name]
                                        ^

---VM:
   0: OP_CONSTANT 0 ( "@eval (UNSERIALIZABLE_OBJECT N10game_logic12_GLOBAL__N_121get_document_function... )
   2: OP_CONSTANT 1 ( "data/cards.cfg" )
   4: OP_CALL_BUILTIN 1
   6: OP_DUP
   7: OP_CONSTANT 2 ( "@eval (UNSERIALIZABLE_OBJECT N12_GLOBAL__N_119variant_type_simpleE)" )
   9: OP_IS
   10: OP_POP_JMP_IF 7 ( -> 18)
   12: OP_CONSTANT 3 ( "Type mis-match. Expected map found " )
   14: OP_SWAP
   15: OP_ADD
   16: OP_PUSH_NULL
   17: OP_ASSERT
   18: OP_LOOKUP 101
   20: OP_INDEX
   21: OP_WHERE 102
   23: OP_LOOKUP 102
   25: OP_CONSTANT 4 ( "@eval (UNSERIALIZABLE_OBJECT N12_GLOBAL__N_118variant_type_unionE)" )
   27: OP_IS
   28: OP_JMP_IF 11 ( -> 40)
   30: OP_CONSTANT 5 ( "(info is string|map)" )
   32: OP_CONSTANT 6 ( "Unknown card" )
   34: OP_LOOKUP 101
   36: OP_PUSH_INT 2
   38: OP_LIST
-->39: OP_ASSERT
   40: OP_POP
   41: OP_LOOKUP 102
   43: OP_CONSTANT 7 ( "@eval (UNSERIALIZABLE_OBJECT N12_GLOBAL__N_119variant_type_simpleE)" )
   45: OP_IS
   46: OP_JMP_UNLESS 18 ( -> 65)
   48: OP_POP
   49: OP_LOOKUP 7
   51: OP_PUSH_SCOPE
   52: OP_LOOKUP 39
   54: OP_POP_SCOPE
   55: OP_PUSH_SCOPE
   56: OP_LOOKUP 50
   58: OP_POP_SCOPE
   59: OP_LOOKUP 102
   61: OP_CALL 1
   63: OP_JMP 49 ( -> 113)
   65: OP_POP
   66: OP_CONSTANT 8 ( "@eval (UNSERIALIZABLE_OBJECT N10game_logic12_GLOBAL__N_115strstr_functionE)" )
   68: OP_LOOKUP 101
   70: OP_CONSTANT 9 ( "#" )
   72: OP_CALL_BUILTIN 2
   74: OP_PUSH_0
   75: OP_NEQ
   76: OP_JMP_UNLESS 33 ( -> 110)
   78: OP_POP
   79: OP_LOOKUP 7
   81: OP_PUSH_SCOPE
   82: OP_LOOKUP 39
   84: OP_POP_SCOPE
   85: OP_PUSH_SCOPE
   86: OP_LOOKUP 50
   88: OP_POP_SCOPE
   89: OP_LOOKUP 7
   91: OP_PUSH_SCOPE
   92: OP_LOOKUP 39
   94: OP_POP_SCOPE
   95: OP_PUSH_SCOPE
   96: OP_CONSTANT 10 ( "@eval def(name) regex_replace(name, '#.*', '')" )
   98: OP_POP_SCOPE
   99: OP_LOOKUP 101
   101: OP_CALL 1
   103: OP_CALL 1
   105: OP_LOOKUP 102
   107: OP_ADD
   108: OP_JMP 4 ( -> 113)
   110: OP_POP
   111: OP_LOOKUP 102
   113: OP_POP_SCOPE

---STACK---
  --TOS+0--
['Unknown card', 'Moment of Weakness']
  --TOS+1--
'(info is string|map)'
  --TOS+2--
false

ERROR ENCOUNTERED WHILE RUNNING COMMAND GENERATED BY THIS EXPRESSION:
Unknown Location ()

CRITICAL: 
---
CRITICAL: stack trace:
CRITICAL:   ./anura : game_logic::CommandCallable::runCommand(game_logic::FormulaCallable&) const+0x1ff
CRITICAL:   ./anura : CustomObject::executeCommand(variant const&)+0x61
CRITICAL:   ./anura() [0xcb4e8d]
CRITICAL:   ./anura : game_logic::CommandCallable::runCommand(game_logic::FormulaCallable&) const+0x59
CRITICAL:   ./anura : CustomObject::executeCommand(variant const&)+0x61
CRITICAL:   ./anura : CustomObject::handleEventInternal(int, game_logic::FormulaCallable const*, bool)+0x2c9
CRITICAL:   ./anura : CustomObject::handleEvent(int, game_logic::FormulaCallable const*)+0x18d
CRITICAL:   ./anura : CustomObject::staticProcess(Level&)+0x4fd
CRITICAL:   ./anura : CustomObject::process(Level&)+0x2469
CRITICAL:   ./anura : PlayableCustomObject::process(Level&)+0x1f5
CRITICAL:   ./anura : Level::do_processing()+0x28e
CRITICAL:   ./anura : Level::process()+0x12f
CRITICAL:   ./anura : LevelRunner::play_cycle()+0x3367
CRITICAL:   ./anura : LevelRunner::play_level()+0x174
CRITICAL:   ./anura : main()+0x68b1
CRITICAL:   /lib/x86_64-linux-gnu/libc.so.6 : __libc_start_main()+0xf0
CRITICAL:   ./anura() [0x6ad3b5]
CRITICAL: ---
INFO: asserts.cpp:85 : ATTEMPTING TO SEND CRASH REPORT...
./anura.sh: line 3: 26664 Aborted                 LD_LIBRARY_PATH=./runtime:$LD_LIBRARY_PATH ./anura "$@"
ghost commented 5 years ago

I think this belongs to a class of issues that go away simply by handling updates with care from the developer side, both if caused by server-client content unsync, or if caused by the need of a server restart.

Server-client sync is a must have we should take care of.

If this is caused by the need of a server restart, then some development could help avoid it, but is it worth the effort? Even if it was worth it, would it really be desirable? Abort early after weird or unexpected stuff seems like the plan here; can't tell is a bad idea.

Can we close this as wontfix for now?

pshem commented 5 years ago

Closing for the same reason as #235 seems entirely appropriate - this bug doesn't happen in the Steam version