-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Line2D2Vecs constructor 'createAndSetupBuffers' not checking size when empty casuing crash in MSVC #4
Comments
I haven't really used MSVC much before (or Visual Studio for that matter), so I've given it a go compiling it with Visual Studio. Haven't quite go everything compiling correctly, though it does seem that at least for freetype, we can use the .slm project file provided in ft271\freetype-2.7.1\builds\windows\vc2010? I'm tryingto determine if we can make an installer script, similar to the other installer scripts, just for MSVC, though it seems due to the older version of freetype with it being setup for MSVC 2010 and earlier, rather than the later versions that we might have an issue. If you get it working, do you think you could setup a script similar to https://github.com/tbattz/openGLPlotLive/blob/26ef4142f88370a62414b519b5d729d430a88165/Installers/installDependenciesWindows-part2.bat? It is a bit weird that it compiles fine under gcc, but fails in MSVC. Do you get the same issue with line 21, if you put a dummy first point into the std::vector that the Line2D2Vecs is created off? If so then it'll probably need a preallocation, or to wait until there's some data before setting up the buffer. I can't really check at the moment, as I can't get things compiled with MSVC. I'm not quite understanding, why is the msvc_dirent.h needed to get it compiling? |
By
Let's see if it all goes well and get tested on your side. It would be a bit early to write the batch file to prepare the full automation as it will be a separate issue. |
It looks like Grid::verts and Axesarea::interactorDataX not get proper initialized with default values. |
I've checked out your fork, and tried to compile it. I have a few issues, as I don't think I have my environment set up the same way. I had to change the following line to point to my vcpkg.. Line 7 in 5fdd6ef
To make sure we're on the same page, you're compiling from command line using
Or using
Or something else altogether? How did you install vcpkg? I'd assume standalone and not through Visual Studio?
It's been a while since I wrote the code, though I remember there being an issue with the interactor if there wasn't any existing data. I think it was to do with no real axes limits getting set, and then having zero range causing issues with the interactor position calculator. Though I thought I had implemented something to stop that being an issue. Really, if there's no data yet existing, then there's no point in having an interactor. Initialising it with dummy values will likely result in them getting overwritten on the first frame when the position would get recalculated. It's a bit hard for me to narrow down the issue without having the same environment and compiled using MSVC/ninja. Potentially as a temporary fix, if you just want to get the plot working, would be to disable the interactor. If I can get my environment sorted, I'll have a deeper look at it. |
CMakeCache.txt
|
openGLPlotLive/src/lines/Line2D2Vecs.cpp
Line 21 in 26ef414
although it compiles and runs OK under windows using GCC compiler, the code above fails in MSVC 2019 compiled executable 'movingTimeframe.exe'
I guess it should be preallocated to contain certain size? I don't know why it runs OK when compiled with g++ toolchain under windows.
The procedure to completely build using MSVC is tedious including :
1.1 disable the following options and rebuild with MSVC
"-DFT_DISABLE_HARFBUZZ=ON",
"-DFT_DISABLE_PNG=ON",
"-DFT_DISABLE_BZIP2=ON",
"-DFT_DISABLE_BROTLI=ON"
But without doubt, this is a terrific example of OpenGL that I'm learning from. Thank you!
The text was updated successfully, but these errors were encountered: