edo9300 / ygopro-core

ygopro script engine.
Other
45 stars 31 forks source link

Copies of "Appropriate" crashing the game #75

Closed NaimSantos closed 3 years ago

NaimSantos commented 5 years ago

When each player controls 1 "Appropriate" and you activate something like Pot of Greed, the client will crash. Puzzle mode will not crash, only lan/server.When something like Star Seraph Scepter is activated, it doesn't crash. Commenting EFFECT_FLAG_DELAY out of "Appropriate" removes crash.

It looks like a core issue with EFFECT_FLAG_DELAY and continuous effects vs mandatory effects.

edo9300 commented 5 years ago

This crash from the above scenario isn't happening

kevinlul commented 5 years ago

Inconsistent in reproduction

kevinlul commented 4 years ago

After 8849820d0b31bf099ab0cc021e29d16abea7178e

Thread 18 Crashed:
0   libocgcore.dylib                0x0000000106890071 card::is_affected_by_effect(int) + 1009 (card.cpp:2993)
1   libocgcore.dylib                0x000000010694291d field::adjust_step(unsigned short) + 237 (processor.cpp:5341)
2   libocgcore.dylib                0x0000000106940271 field::process() + 2209
3   libocgcore.dylib                0x00000001068fd48c OCG_DuelProcess + 44 (ocgapi.cpp:143)
4   io.github.edo9300.ygoprodll     0x00000001013dc75f ygo::ReplayMode::OldReplayThread() + 1055
5   io.github.edo9300.ygoprodll     0x00000001012ce767 decltype(std::__1::forward<int (*)()>(fp)()) std::__1::__invoke<int (*)()>(int (*&&)()) + 23
6   io.github.edo9300.ygoprodll     0x00000001012ce6d5 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, int (*)()>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, int (*)()>&, std::__1::__tuple_indices<>) + 37
7   io.github.edo9300.ygoprodll     0x00000001012cdf66 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, int (*)()> >(void*) + 118
8   libsystem_pthread.dylib         0x00007fff5eef52eb _pthread_body + 126
9   libsystem_pthread.dylib         0x00007fff5eef8249 _pthread_start + 66
10  libsystem_pthread.dylib         0x00007fff5eef440d thread_start + 13
edo9300 commented 3 years ago

Fixed in https://github.com/edo9300/ygopro-core/commit/eb3d83ab880a9c137d318742be0b781066870079