-
Notifications
You must be signed in to change notification settings - Fork 72
Segmentation fault #154
Comments
Stack is corrupted. Can you explain how to reproduce? |
I cannot explain it, but I have the saved game. It segfaults almost
immediately.
…On Sun, Jun 23, 2019 at 10:55 PM the3dfxdude ***@***.***> wrote:
Stack is corrupted. Can you explain how to reproduce?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#154?email_source=notifications&email_token=AG7OEIZH4B5TVPVX4G4ZUP3P4BAU5A5CNFSM4H22OLPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYLV2SA#issuecomment-504847688>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AG7OEIZD4PYKCDORAL4NUPLP4BAU5ANCNFSM4H22OLPA>
.
--
Timothy Rink: 6462CD04
<https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C7780B26462CD04> @
https://keyserver.ubuntu.com/ for PGP key.
|
(gdb) bt |
Send me the save file. |
What OS ? Looks 64-bit so I guess linux. |
Yes, Linux. Debian 9 Stable to be exact.
…On Mon, Jun 24, 2019 at 11:20 AM the3dfxdude ***@***.***> wrote:
What OS ? Looks 64-bit so I guess linux.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#154?email_source=notifications&email_token=AG7OEI4BUZTVARY766LNVGLP4DX3VA5CNFSM4H22OLPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYNOTKI#issuecomment-505080233>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AG7OEI4UE6OEOASXUHYTUCDP4DX3VANCNFSM4H22OLPA>
.
--
Timothy Rink: 6462CD04
<https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0C7780B26462CD04> @
https://keyserver.ubuntu.com/ for PGP key.
|
I've tracked it down, and this needs to be fixed. It shows machine dependent execution through a certain situation which will be crashes / desync, etc. Actually a whole class of potential problems really, so a project in itself to track down the bugs caused from the implementation. |
This is fixed, but I should explain this some. The problem is the Spy class eventually calls spy_array.resize (DynArray managed), while having Spy pointers stored, including on the call stack. This is bad, and likely never worked. A Spy class method cannot cause spy_array to resize. There are three ways I considered fixing this:
With these series of commits, you can see option #1 looks the easiest and cleanest without triggering a massive rewrite. The issue found here does apply in other places. I was able to trigger a crash in Unit after building an improvised static call tree looking for problems. So there probably will be more changes later. |
Thread 1 "7kaa" received signal SIGSEGV, Segmentation fault.
Spy::capture_firm (this=this@entry=0x5555586f696c) at OSPY.cpp:923
923 int nationReputation = (int) nation_array[true_nation_recno]->reputation;
(gdb) bt
#0 Spy::capture_firm (this=this@entry=0x5555586f696c) at OSPY.cpp:923
#1 0x0000555555626fd6 in Spy::think_bribe (this=)
at OSPY2.cpp:228
Backtrace stopped: Cannot access memory at address 0x7fffffffdd68
The text was updated successfully, but these errors were encountered: