Comments (8)
Thanks reporting this issue; unfortunately I am not able to reproduce it.
SysReq also takes a screenshot, so the issue is likely with the Screenshot() function itself (or the SaveScreenshotPNG() function it calls).
Does this crash happen both when you are playing with OpenGL rendering enabled, and when it is disabled?
from wyrmgus.
The crash only happens with OpenGL rendering enabled. As it turns out, it was taking screenshots, but I was expecting to find them in my Pictures folder where screenshots normally go. I hadn't thought to look in ~/Wyrmgus. The ones that resulted in crashes turned out rather oddly, while the ones with OpenGL disabled turned out fine.
from wyrmgus.
Thanks, that's helpful :)
So the issue is likely in the following piece of code in SaveScreenshotPNG() (in \video\png.cpp):
#if defined(USE_OPENGL) || defined(USE_GLES)
if (UseOpenGL) {
std::vector<unsigned char> pixels;
pixels.resize(Video.Width * Video.Height * 3);
#ifdef USE_OPENGL
glReadBuffer(GL_FRONT);
#endif
glReadPixels(0, 0, Video.Width, Video.Height, GL_RGB, GL_UNSIGNED_BYTE, &pixels[0]);
for (int i = 0; i < Video.Height; ++i) {
png_write_row(png_ptr, &pixels[(Video.Height - 1 - i) * Video.Width * 3]);
}
} else
#endif
from wyrmgus.
timfel has made an update to fix this issue, which I've implemented into Wyrmgus here:
f271eb5
Does it fix the problem for you?
from wyrmgus.
The game no longer crashes upon taking a screenshot most of the time, but the screenshot is still gray and distorted as before (or a corrupted file), and the game freezes upon trying to exit if I previously took a screenshot during that session. It still sometimes causes the game to freeze, which seems to occur more when I've switched from windowed to fullscreen. I also still managed to crash it once by just taking a screenshot in the opening menu (output below). As before, everything is fine with OpenGL disabled.
*** Error in `./stratagus': double free or corruption (out): 0x0000000015b59460 ***
./launch: line 1: 31990 Aborted ./stratagus -d ~/Wyrmsun/ -u ~/Wyrmsun/
In this case ./launch refers to ./stratagus -d ~/Wyrmsun/ -u ~/Wyrmsun/
, the script I use to launch the game.
from wyrmgus.
Unfortunate that it didn't fix the problem, but at least there was some improvement. There was a further update from upstream on this issue which I've implemented into Wyrmgus, maybe it will help:
a645c96
from wyrmgus.
That doesn't seem to have made any difference.
from wyrmgus.
This should be fixed now with the following commit:
9514a22
from wyrmgus.
Related Issues (20)
- Potential Desync Issue for Unit Circle Selection HOT 1
- wyrmgus binary no longer installed, instead it's the libstratagus.a
- Segfault after starting first scenario HOT 1
- 4.1.3 installs static library instead of a binary HOT 2
- Compilation error HOT 25
- Incorrect window size in game with multimonitor configuration HOT 2
- 5.1.1 does not build HOT 11
- Steam game crash after selecting Smithy to build HOT 7
- Cannot save a game HOT 17
- Missing include files HOT 5
- A Bargain is Struck Raft Crash HOT 1
- Compile error, no return in non-void function HOT 1
- -Werror=format-security HOT 3
- Crash when trying to create multiplayer game HOT 1
- Crash when loading a savegame HOT 2
- Problem with translation via module
- Conditional Requirement Strings on Wyrmsun HOT 10
- Compiling error when build on macOS
- Clarification on how Factions can be set to upgrade to/from one another HOT 3
- Compilation error with recommended version of Boost
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wyrmgus.