Comments (5)
EDT.cc line 29 simply initializes a vector from an initializer_list. Even if the list is empty this shouldn't be a problem. Could you try three things?
- Does it make a difference if you change line 29 to
columns{ columnsList.begin(), columnsList.end() },
- Does the following program run?
#include <vector>
#include <initializer_list>
using namespace std;
int main()
{
initializer_list<unsigned short> il{ 400, 160 };
vector<unsigned short> v{ il };
return v[1];
}
- Does the mingw build work?
from ja2-stracciatella.
- Does it make a difference if you change line 29 to
columns{ columnsList.begin(), columnsList.end() },
No - same crashing occurs.
- Does the following program run?
Yes - returns 160.
Does the mingw build work?
Unfortunately, I couldn't even make successful mingw build so far. Having the same problem: #1917 (comment)
Update: Yes, it does - no crashing.
from ja2-stracciatella.
Thanks. So from what I read initializer_list are quite tricky and a bit of a nightmare for STL implementors.
Do you have the crash caught inside a debugger? If yes, could you please take a look if the lists were properly constructed in EDTFile::EDTFilesTable
? If yes, what is the last frame in your callstack where the list is still ok?
I'm grasping at straws here but if EDTFilesTable is correct, could you trying changing lines 27 and 78 in EDT.cc ?
Replace IEDT::column_list columnsList
with IEDT::column_list const& columnsList
in both lines.
If that also doesn't work I think the best option left is to change the type of IEDT::column_list to vector<uint16_t>.
from ja2-stracciatella.
If yes, what is the last frame in your callstack where the list is still ok?
It seems to be ok all the way. "Unable to read memory" is expected since it's not supposed to be initialized before the exception, right? This area is above my competence level, so sorry for the pic dump:
Replace
IEDT::column_list columnsList
withIEDT::column_list const& columnsList
in both lines.
No luck.
change the type of IEDT::column_list to vector<uint16_t>
from ja2-stracciatella.
Ok, that's really lame. If MSVC can't handle using initializer_list in this way it should at least fail to compile instead of producing a broken executable. I'll post a draft PR later.
from ja2-stracciatella.
Related Issues (20)
- ALT+ENTER doesn't work anymore in the cheat mode HOT 2
- In game.json file function "all_drops_visible" is not working for weapons when "drop_everything" is set to false.
- If you dismiss from your squad NPC like Skyrider, John and Mary or runaway kid Joey, when you are escorting them, then the game freezes HOT 3
- In map editor if you press space key when you are in civilian "merc att" tab, then the game crashes HOT 3
- Pacos is not going with Fatima to the rebel hideout HOT 3
- Increas the displayed character limit, so that the full lines in AIM and MERC Bios is useable. HOT 3
- Nails and his leather jacket should be inseparable HOT 2
- Assigning doctor or repair tasks should put the content of the primary hand in the secondary instead of an inventory pocket
- Our GitHub actions require some attention HOT 6
- compilation without MAGIC_ENUM doesn't work
- Sending Skyrider to Drassen before his dialogue ends crashes.
- Error message "JA2 Stracciatella quit unexpectedly" on boot. (MAC) HOT 5
- ALT+MOVEMENT in combat - wrong display or AP calculation.
- Enhancement idea - swap main hand weapon to melee/barehand-empty, stealing case
- Autobandage always fails first time: uncapable merc + collapsed merc.
- Dart gun does not work on player mercs in TB combat.
- Not TB movement and hand icon - maintain running with use of CTRL+ hand icon. HOT 2
- Compiling on MSYS2 HOT 2
- Underground levels don't show on the strategic screen
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 ja2-stracciatella.