Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on Startup #501

Closed
asantoni opened this issue Nov 22, 2019 · 6 comments
Closed

Crash on Startup #501

asantoni opened this issue Nov 22, 2019 · 6 comments

Comments

@asantoni
Copy link

System information

SolveSpace version: 3.0 git revision 5d78f99

Operating system: Windows 10

Expected behavior

No crash...

Actual behavior

image

Additional information

This was working yesterday for me, but mysteriously stopped working today. Sorry for the image paste of the backtrace, but I hope it's still useful. I'm not sure I have the resolve to track down this crash further myself...

@asantoni
Copy link
Author

Sorry, that backtrace was cut off... Here's the full backtrace:

image

@whitequark
Copy link
Contributor

Does this patch help?

diff --git a/src/render/gl3shader.cpp b/src/render/gl3shader.cpp
index 8ad45c7a..542eb97f 100644
--- a/src/render/gl3shader.cpp
+++ b/src/render/gl3shader.cpp
@@ -390,7 +390,7 @@ GLuint Generate(const std::vector<double> &pattern) {
     glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);
     RgbaColor *textureData = new RgbaColor[size];
 
-    int mipCount = (int)log2(size) + 1;
+    int mipCount = (int)log2(size);
     for(int mip = 0; mip < mipCount; mip++) {
         int dashI = 0;
         double dashT = 0.0;

@whitequark whitequark added the bug label Nov 22, 2019
@asantoni
Copy link
Author

Yep, that fixed it! Thanks for the quick fix!

@asantoni
Copy link
Author

Whoops, I should have left closing this ticket up to you.

@asantoni asantoni reopened this Nov 22, 2019
@whitequark
Copy link
Contributor

This was working yesterday for me, but mysteriously stopped working today.

Did you perhaps rebuild the application with a debug C++ runtime?

@whitequark
Copy link
Contributor

whitequark commented Nov 22, 2019

Fixed in 74aa80b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants