Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in LoadUnloadVehicle() #6437

Closed
DorpsGek opened this issue Apr 3, 2016 · 3 comments
Closed

Crash in LoadUnloadVehicle() #6437

DorpsGek opened this issue Apr 3, 2016 · 3 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Apr 3, 2016

pelya opened the ticket and wrote:

To reproduce, open the savegame attached, download all NewGRFs it uses, load savegame, ignore AI script error, and fast-forward to the next month. Reproduces on official 1.6.0 Linux-64 release. Here's a stack trace of debug build:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000793997 in CargoPayment::SetCargo (this=0x0, ct=0 '\000') at /home/pelya/caught/openttd-1.6.0/src/economy_base.h:49
49 void SetCargo(CargoID ct) { this->ct = ct; }
(gdb) bt full
# 0 0x0000000000793997 in CargoPayment::SetCargo (this=0x0, ct=0 '\000') at /home/pelya/caught/openttd-1.6.0/src/economy_base.h:49
No locals.
# 1 0x0000000000790888 in LoadUnloadVehicle (front=0x1cad7a0) at /home/pelya/caught/openttd-1.6.0/src/economy.cpp:1654
cargo_count = 12
amount_unloaded = 0
remaining = false
load_amount = 0
ge = 0x2845ff0
t = 100
cap_left = 8
v = 0x1cad970
next_station = {<SmallStackItem<unsigned short, unsigned short>> = {next = 65533, value = 132}, static _pool = }
last_visited = 133
st = 0x2845f20
anything_loaded = true
full_load_amount = 1
payment = 0x0
artic_part = 2
use_autorefit = false
consist_capleft = {amount = {0 <repeats 32 times>}}
dirty_vehicle = true
dirty_station = true
anything_unloaded = false
cargo_not_full = 1
cargo_full = 0
reservation_left = 1
new_load_unload_ticks = 8
completely_emptied = false
# 2 0x00000000007916ae in LoadUnloadStation (st=0x2845f20) at /home/pelya/caught/openttd-1.6.0/src/economy.cpp:1929
v = 0x1cad7a0
last_loading = 0x1cad7a0
iter =
isend = 0xc00000080
# 3 0x0000000000ab16ff in CallVehicleTicks () at /home/pelya/caught/openttd-1.6.0/src/vehicle.cpp:884
station_index = 133
st = 0x2845f20
v = 0xb
cur_company = {original = @0x7fffffffc140, valid = 208, original_value = {static begin = , static end = , static invalid = ,
m_val = 57 '9'}, file = 0x7f0400000000 <error: Cannot access memory at address 0x7f0400000000>, line = -15876}
# 4 0x000000000090d45d in StateGameLoop () at /home/pelya/caught/openttd-1.6.0/src/openttd.cpp:1383
cur_company = {original = @0x1201bc1, valid = true, original_value = {static begin = , static end = , static invalid = ,
m_val = 0 '\000'}, file = 0xcaa138 "/home/pelya/caught/openttd-1.6.0/src/openttd.cpp", line = 1377}
# 5 0x000000000090d78b in GameLoop () at /home/pelya/caught/openttd-1.6.0/src/openttd.cpp:1479
check_message = 7
# 6 0x0000000000ac7a49 in VideoDriver_SDL::MainLoop (this=0x187e280) at /home/pelya/caught/openttd-1.6.0/src/video/sdl_v.cpp:766
old_ctrl_pressed = false
prev_cur_ticks = 51745
cur_ticks = 51782
last_cur_ticks = 51782
next_tick = 51812
keys = 0x7ffff75712c0 ""
mod = 0
numkeys = 323
# 7 0x000000000090bbf6 in openttd_main (argc=1, argv=0x7fffffffd8c8) at /home/pelya/caught/openttd-1.6.0/src/openttd.cpp:863
musicdriver = 0x0
resolution = {width = 0, height = 0}
mgo = {opt = 0x0, numleft = 0, argv = 0x7fffffffd8d0, options = 0xcadc40 <_options>, cont = 0x0}
ret = 0
i = -1
scanner = 0x0
debuglog_conn = 0x0
sounddriver = 0x0
videodriver = 0x0
graphics_set = 0x0
dedicated = false
blitter = 0x0
sounds_set = 0x18d85c0 "application.process.id"
music_set = 0x0
save_config = true
# 8 0x0000000000921dd2 in main (argc=1, argv=0x7fffffffd8c8) at /home/pelya/caught/openttd-1.6.0/src/os/unix/unix.cpp:279
ret = 0

Attachments

Reported version: 1.6.0
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/6437
@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 3, 2016

pelya wrote:

Lazy patch for this bug (just a NULL check)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/6437#comment14143

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 4, 2016

pelya wrote:

My previous lazy patch breaks things, please use this new, better patch.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/6437#comment14145

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Fixed

in r27585


This comment was imported from FlySpray: https://bugs.openttd.org/task/6437

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant