Page 1 of 1

[Oxyd] [0.17.4] Crash when cancelling research queue: "ResearchManager::cancelResearch" (MR)

Posted: Fri Mar 01, 2019 7:34 pm
by Syhn
My server was crashing some reason when cancelling the queue, then I notice that somehow the wrong levels of mining production were queued somehow. I have no idea how that happened in the first place. The log is what happens when mining prod 44 is cancelled (though that's not surprising considering it's in an invalid state in the first place.)

Re: [0.17.4] Invalid research queue state

Posted: Fri Mar 01, 2019 7:47 pm
by Syhn
Seems like this is the cause: viewtopic.php?f=7&t=66144

Re: [0.17.4] Invalid research queue state

Posted: Sat Mar 02, 2019 4:14 pm
by Loewchen

Code: Select all

   0.014 2019-03-01 13:19:02; Factorio 0.17.4 (build 43174, linux64, alpha)
   0.014 Operating system: Linux
   0.014 Program arguments: "./bin/x64/factorio" 
   0.014 Read data path: /home/trumank/Downloads/factorio/data
   0.014 Write data path: /home/trumank/Downloads/factorio [804001/937871MB]
   0.014 Binaries path: /home/trumank/Downloads/factorio/bin
   0.024 System info: [CPU:         Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz, 4 cores, RAM: 7946 MB]
   0.024 Environment: DISPLAY=:0, WAYLAND_DISPLAY=<unset>
   0.024 Display options: [FullScreen: 0] [VSync: 1] [UIScale: automatic (100.0%)] [MultiSampling: OFF] [Screen: 255] [Lang: en]
   0.180 Available displays: 2
   0.180  [0]: U27 32" - {[0,0], 3840x2160, SDL_PIXELFORMAT_RGB888, 60Hz}
   0.180  [1]: K272HUL 27" - {[3840,720], 2560x1440, SDL_PIXELFORMAT_RGB888, 60Hz}
   0.198 Initialised OpenGL:[0] Radeon RX 550 Series (POLARIS11, DRM 3.27.0, 4.20.10-arch1-1-ARCH, LLVM 7.0.1); driver: 4.5 (Core Profile) Mesa 18.3.3
   0.198   [Extensions] s3tc:yes; KHR_debug:yes; ARB_clear_texture:yes, ARB_copy_image:yes
   0.198   [Version] 4.5
   1.331 Graphics settings preset: very-high
   1.331   Dedicated video memory size 2048 MB
   1.331 Graphics options: [Graphics quality: high] [Video memory usage: all] [Light scale: 25%] [DXT: high-quality]
   1.331                   [Max load threads: 32] [Max texture size: 0] [Tex.Stream.: 0] [Low quality rotation: 0]
   1.584 Loading mod core 0.0.0 (data.lua)
   1.712 Loading mod base 0.17.4 (data.lua)
   1.962 Loading mod base 0.17.4 (data-updates.lua)
   2.043 Checksum for core: 3928040144
   2.043 Checksum of base: 60305742
   2.505 Loading sounds...
   2.531 Info PlayerData.cpp:67: Local player-data.json available, timestamp 1551467375
   2.531 Info PlayerData.cpp:74: Cloud player-data.json unavailable
   2.731 Crop bitmaps.
   4.473 Parallel Sprite Loader initialized (threads: 3)
  23.119 Initial atlas bitmap size is 16384
  23.151 Created atlas bitmap 16384x16380 [no-crop]
  23.164 Created atlas bitmap 16384x11352 [none]
  23.165 Created atlas bitmap 16384x2116 [decal]
  23.166 Created atlas bitmap 16384x3808 [low-object]
  23.167 Created atlas bitmap 16384x1888 [mipmap, linear-minification, linear-magnification, linear-mip-level]
  23.171 Created atlas bitmap 16384x6592 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
  23.171 Created atlas bitmap 16384x480 [smoke, mipmap, linear-minification, linear-magnification]
  23.186 Created atlas bitmap 16384x456 [not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, no-crop, no-scale]
  23.186 Created atlas bitmap 16384x748 [alpha-mask]
  23.295 Created atlas bitmap 16384x12640 [shadow, linear-magnification, alpha-mask]
  23.296 Created atlas bitmap 16384x1264 [shadow, mipmap, linear-magnification, alpha-mask]
  24.130 Texture processor created. GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
  35.252 Parallel Sprite Loader initialized (threads: 3)
  74.250 Sprites loaded
  74.926 Generated mipmaps for atlas of size 16384x3808
  75.144 Generated mipmaps for atlas of size 16384x1888
  75.360 Generated mipmaps for atlas of size 16384x6592
  75.445 Generated mipmaps for atlas of size 16384x480
  75.518 Generated mipmaps for atlas of size 16384x456
  75.560 Generated mipmaps for atlas of size 16384x1264
  75.824 Custom inputs active: 0
  76.275 Factorio initialised
  76.361 Info HttpSharedState.cpp:54: Downloading https://updater.factorio.com/updater/get-available-versions?username=AssemblyStorm&token=<private>&apiVersion=2
  77.172 Info HttpSharedState.cpp:147: Status code: 200
  77.318 0 packages available to download (experimental updates enabled).
  79.713 Info UDPSocket.cpp:27: Opening socket at (IP ADDR:({0.0.0.0:0}))
  85.076 Info UDPSocket.cpp:210: Closing socket
  85.076 Info UDPSocket.cpp:240: Socket closed
  85.076 Info UDPSocket.cpp:210: Closing socket
 133.871 Loading map /home/trumank/Downloads/factorio/saves/_autosave57.zip: 48727236 bytes.
 133.942 Loading Level.dat: 111340557 bytes.
 133.979 Info Scenario.cpp:147: Map version 0.17.4-1
 137.577 Loading script.dat: 339 bytes.
 137.650 Checksum for script /home/trumank/Downloads/factorio/temp/currently-playing/control.lua: 2366710471
Factorio crashed. Generating symbolized stacktrace, please wait ...
Raw stacktrace: 0xaf6b38, 0xc5c0fd, 0x9e59e8, 0xa078cf, 0xad26db, 0xc5db99, 0xc35361, 0x7dec5c, 0xab0bbc, 0xefce83, 0xefd480, 0xafe7b1, 0x17d8e9f, 0x7a9d, 0
 153.219 Warning Logger.cpp:491: Symbols.size() == 21, usedSize == 14
#0  0x0000000000c5c0fd in std::__uniq_ptr_impl<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::_M_ptr() const at /usr/include/c++/8/bits/unique_ptr.h:150
#1  0x00000000009e59e8 in std::unique_ptr<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::get() const at /usr/include/c++/8/bits/unique_ptr.h:343
#2  0x0000000000a078cf in std::unique_ptr<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::operator->() const at /usr/include/c++/8/bits/unique_ptr.h:337
#3  0x0000000000ad26db in Logger::flush() at /tmp/factorio-build-P2E98K/src/Util/Logger.cpp:527
#4  0x0000000000c5db99 in Logger::logStacktrace(StackTraceInfo*) at /tmp/factorio-build-P2E98K/src/Util/Logger.cpp:515
#5  0x0000000000c35361 in Logging::flush() at /tmp/factorio-build-P2E98K/src/Util/Logging.cpp:65
#6  0x00000000007dec5c in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, std::string const&) at /tmp/factorio-build-P2E98K/src/Util/Logging.cpp:90
#7  0x0000000000ab0bbc in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, char const*, ...) at /tmp/factorio-build-P2E98K/src/Util/Logging.cpp:83
#8  0x0000000000efce83 in ResearchManager::cancelResearch(TechnologyWithCount) at /tmp/factorio-build-P2E98K/src/Technology/ResearchManager.cpp:262 (discriminator 11)
#9  0x0000000000efd480 in GameActionHandler::cancelResearch(InputAction const&, Controller*) at /tmp/factorio-build-P2E98K/src/GameActionHandler.cpp:3192
#10 0x0000000000afe7b1 in GameActionHandler::actionPerformed(InputAction const&) at /tmp/factorio-build-P2E98K/src/GameActionHandler.cpp:324 (discriminator 1)
#11 0x00000000017d8e9f in InputHandler::flushToListeners(InputAction const&, bool) at /tmp/factorio-build-P2E98K/src/Input/InputHandler.cpp:72
#12 0x0000000000007a9d in InputHandler::flushActions(bool, unsigned int) at /tmp/factorio-build-P2E98K/src/Input/InputHandler.cpp:64
#13 (nil) in GameActionHandler::update() at /tmp/factorio-build-P2E98K/src/GameActionHandler.cpp:364
#14 (nil) in MainLoop::gameUpdateStep(MultiplayerManagerBase*, Scenario*, AppManager*, MainLoop::HeavyMode) at /tmp/factorio-build-P2E98K/src/MainLoop.cpp:1058
#15 0x416fca0555555555 in MainLoop::gameUpdateLoop(MainLoop::HeavyMode) at /tmp/factorio-build-P2E98K/src/MainLoop.cpp:931
#16 0x3fc5555585a7a666 in std::function<void ()>::operator=(decltype(nullptr)) at /usr/include/c++/8/bits/std_function.h:495
#17 0x40873bcccd1e2aad in WorkerThread::loop() at /tmp/factorio-build-P2E98K/src/Util/WorkerThread.cpp:42
#18 0x40973bcccd1face6 in execute_native_thread_routine at blake2s.c:?
#19 0x416fca0555555555 in ?? at ??:0
#20 0x3feaaaaae7119000 in ?? at ??:0
Stack trace logging done
 158.040 Warning Logger.cpp:491: Symbols.size() == 16, usedSize == 13
 158.040 Error ResearchManager.cpp:265: (this->researchQueue.empty() && this->technologyInResearch == nullptr) || (!this->researchQueue.empty() && (this->technologyInResearch == nullptr || this->researchQueue.front() == this->technologyInResearch->getID())) was not true
Logger::writeStacktrace skipped.
 158.053 Error CrashHandler.cpp:174: Map tick at moment of crash: 14245315
 158.053 Error Util.cpp:97: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.
 159.898 Uploading log file

Re: [0.17.4] Crash when cancelling research queue: "ResearchManager::cancelResearch"

Posted: Sat Mar 02, 2019 5:30 pm
by Loewchen
Ref.: 66274, 66233, 66367, 66389, 66555 (includes image with interesting observation)

Re: [Oxyd] [0.17.4] Crash when cancelling research queue: "ResearchManager::cancelResearch" (MR)

Posted: Mon Mar 04, 2019 2:26 pm
by Oxyd
Thanks, fixed in 0.17.5.