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 on disabling animation #6510

Closed
DorpsGek opened this issue Sep 16, 2016 · 4 comments
Closed

Crash on disabling animation #6510

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

Comments

@DorpsGek
Copy link
Member

Kogut opened the ticket and wrote:

Encountered in 1.6.1, reproduced in trunk (openttd-trunk-r27655-linux-generic-i686).

Ubuntu 14.04 32 bit.

Started appearing after resetting my settings to default.

*** OpenTTD Crash Report ***

Crash at: Fri Sep 16 21:33:41 2016
In game date: 1950-01-19 (45)

Crash reason:
Signal: Segmentation fault (11)
Message:

OpenTTD version:
Version: r27655 (0)
NewGRF ver: 17006c07
Bits: 32
Endian: little
Dedicated: no
Build date: Sep 6 2016 18:02:55

Stacktrace:
[00] /home/mateusz/Downloads/openttd-trunk-r27655-linux-generic-i686/openttd(_ZNK12CrashLogUnix13LogStacktraceEPcPKc+0x43) [0x83a7263]
[01] /home/mateusz/Downloads/openttd-trunk-r27655-linux-generic-i686/openttd(_ZNK8CrashLog12FillCrashLogEPcPKc+0x102) [0x8238ff2]
[02] /home/mateusz/Downloads/openttd-trunk-r27655-linux-generic-i686/openttd(_ZNK8CrashLog12MakeCrashLogEv+0xa4) [0x8239124]
[03] /home/mateusz/Downloads/openttd-trunk-r27655-linux-generic-i686/openttd() [0x83a718e]
[04] [0xb77ab404]
[05] /home/mateusz/Downloads/openttd-trunk-r27655-linux-generic-i686/openttd(_ZN17Blitter_32bppAnim14PaletteAnimateERK7Palette+0x94) [0x81f28e4]
[06] /home/mateusz/Downloads/openttd-trunk-r27655-linux-generic-i686/openttd() [0x8529130]
[07] /home/mateusz/Downloads/openttd-trunk-r27655-linux-generic-i686/openttd() [0x852926d]
[08] /home/mateusz/Downloads/openttd-trunk-r27655-linux-generic-i686/openttd(_ZN20ThreadObject_pthread12stThreadProcEPv+0x11) [0x84ca851]
[09] /lib/i386-linux-gnu/libpthread.so.0(+0x6f72) [0xb7686f72]
[10] /lib/i386-linux-gnu/libc.so.6(clone+0x5e) [0xb7482f8e]

Operating system:
Name: Linux
Release: 3.13.0-95-generic
Version: # 142-Ubuntu SMP Fri Aug 12 17:05:16 UTC 2016
Machine: i686
Compiler: GCC 4.4.5 "4.4.5"

Configuration:
Blitter: 32bpp-optimized
Graphics set: original_dos (1)
Language: /home/mateusz/Downloads/openttd-trunk-r27655-linux-generic-i686/lang/english_US.lng
Music driver: extmidi
Music set: NoMusic (0)
Network: no
Sound driver: sdl
Sound set: NoSound (2)
Video driver: sdl

Fonts:
Small: sprite
Medium: sprite
Large: sprite
Mono: sprite

AI Configuration (local: 0):
0: Human
1: AIAI (v96)
2: ChooChoo (v409)
3: CluelessPlus (v37)
4: Convoy (v11)
5: CPU (v5)
6: DictatorAI (v183)
7: EpicTrans (v1)
8: FastPTPAI (v4)
9: gelignAIte (v1)
10: MailAI (v20110726)
11: MogulAI (v5900)
12: NoNoCAB (v3)
13: Rondje (v384)
14: RoadRunner (v9)

Libraries:
FontConfig: 2.11.0
FreeType: 2.4.2
ICU i18n: 4.4.1
ICU lx: 4.4.1
LZMA: 5.0.3
LZO: 2.03
PNG: 1.2.44
SDL: 1.2.15
Zlib: 1.2.8

---- gamelog start ----
Tick 0: new game started
Revision text changed to r27655, savegame version 195, not modified, _openttd_newgrf_version = 0x17006c07
New game mode: 1 landscape: 0
---- gamelog end ----

*** End of OpenTTD Crash Report ***

Attachments

Reported version: trunk
Operating system: All


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

Kogut wrote:

I wanted to test it further (for exammple, whatever "blitter = "8bpp-optimized"" will fix issue but bug stopped appearing :( )


This comment was imported from FlySpray: https://bugs.openttd.org/task/6510#comment14269

@DorpsGek
Copy link
Member Author

frosch wrote:

Possible reason:

SwitchNewGRFBlitter() calls
* BlitterFactory::SelectBlitter
* VideoDriver::AfterBlitterChange

The drawing is done threaded and switching screen buffers requires synchronisation.
However, the synchronisation is only within AfterBlitterChange, while it should include both SelectBlitter+AfterBlitterChange.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6510#comment14274

@DorpsGek
Copy link
Member Author

DorpsGek commented Mar 8, 2017

JGR wrote:

The attached patch fixes this issue, which is a use after free of the animation buffer which can occur when switching away from an animated blitter in win32 or SDL mode.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/6510#comment14354

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Fixed

in r27775. Thanks JGR!


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

@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