OpenTTD/src/network
Jonathan G Rennison 01f957c51f Fix: Crash due to use of invalid iterator in ClientNetworkContentSocketHandler
In particular this crash can be observed when using the
bootstrap GUI to download the base graphics.

In ClientNetworkContentSocketHandler::OnReceiveContentInfo
ClientNetworkContentSocketHandler::callbacks is iterated, using an iterator
cb->OnReceiveContentInfo() is called (cb is of type BootstrapAskForDownloadWindow)
This calls new BootstrapContentDownloadStatusWindow()
This inherits from BaseNetworkContentDownloadStatusWindow
The constructor of which calls _network_content_client.AddCallback(this)
This reallocates the std::vector which is being iterated in ClientNetworkContentSocketHandler::OnReceiveContentInfo
This results in iter being invalid, and an assertion failure occurs shortly
afterwards due to its use in the next iteration of cb->OnReceiveContentInfo()

Adjust all locations where ClientNetworkContentSocketHandler::callbacks
is iterated to avoid problematic behaviour
2019-04-09 22:56:23 +02:00
..
core Codechange: If something is a vector of strings, use a vector of strings instead of an AutoFreeSmallVector. 2019-04-09 22:45:15 +02:00
network.cpp Codechange: If something is a vector of strings, use a vector of strings instead of an AutoFreeSmallVector. 2019-04-09 22:45:15 +02:00
network.h Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00
network_admin.cpp Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00
network_admin.h Codechange: Use override keyword in networking classes. 2019-03-24 17:38:42 +00:00
network_base.h Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00
network_chat_gui.cpp Codechange: Use override specifier in Window-derived classes. 2019-03-24 16:10:04 +01:00
network_client.cpp Remove: AutoFreeSmallVector. 2019-04-09 22:45:15 +02:00
network_client.h Codechange: Use override keyword in networking classes. 2019-03-24 17:38:42 +00:00
network_command.cpp Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00
network_content.cpp Fix: Crash due to use of invalid iterator in ClientNetworkContentSocketHandler 2019-04-09 22:56:23 +02:00
network_content.h Fix: MSVC warnings (#7423) 2019-03-28 00:09:33 +01:00
network_content_gui.cpp Fix #7434: Incorrect use of vector iterator. (#7437) 2019-03-29 17:42:32 +00:00
network_content_gui.h Codechange: Use override specifier in Window-derived classes. 2019-03-24 16:10:04 +01:00
network_func.h Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00
network_gamelist.cpp Codechange: Use atomic variables for thread synchronization where useful. 2019-04-06 11:27:39 +02:00
network_gamelist.h (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
network_gui.cpp Codechange: If something is a vector of strings, use a vector of strings instead of an AutoFreeSmallVector. 2019-04-09 22:45:15 +02:00
network_gui.h Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00
network_internal.h Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00
network_server.cpp Codechange: If something is a vector of strings, use a vector of strings instead of an AutoFreeSmallVector. 2019-04-09 22:45:15 +02:00
network_server.h Codechange: Replace custom thread code with C++11 thread objects. 2019-04-06 11:27:39 +02:00
network_type.h Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00
network_udp.cpp Codechange: Replace custom thread code with C++11 thread objects. 2019-04-06 11:27:39 +02:00
network_udp.h Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00