The 2024 Wheel Reinvention Jam just concluded. See the results.

Assert when launching the application

I tried to launch the exe but got an assert right away:

I probably need to install some vcredist. Which version of visual studio do you use?
I'm pretty sure you don't need to reinstall vcredist for this. This error most likely means that code was calling fopen on file that it could not open (for example, it doesn't exist) and returned NULL. Later this NULL was passed to fread.

I tried to look at source code in github, but it uses functions/macros (INIT_FONT) from headers that I do not know where to get them.

Possibly it is this line: https://github.com/azmr/geometer/blob/master/win32_geometer.c#L68
1
INIT_FONT(Bitstream, "E:/Downloads/fonts/bitstream-vera-sans-mono/Bitstream Vera Sans Mono Roman.ttf", FontBuffer, 1<<25);

Suggestion to author - don't hardcode absolute paths in source code or build scripts. It makes much harder for anybody else to use your source code and bat files. Use relative paths instead.

Edited by Mārtiņš Možeiko on
Apologies for that Simon, thank you for trying to use it though!

And thanks for the catch Mārtiņš, I didn't even think about that... the font's only really used for debug stuff, and I haven't touched that code for months. Lesson learnt.

It's coming up to 1AM here and I can't really think straight. I'll put up a (hopefully) working version ASAP... it may even have new features ;)

Edited by Andrew Reece on
I've done the quick fix of looking for the font in the same location as the executable. I'm not sure if I'll end up bundling it in the executable later on, but this'll do for now. It worked for someone else on IRC, so should hopefully work for you too.
I've put this up along with the more recent changes as a new release. Please do check it out :)


P.S. Thanks again Mārtiņš, it probably would have taken me a little while to figure that one out.
Thanks, it's working.

After toying around for a few minutes here are a few things that would be great (you probably already have plans for some of them):
- Being able to zoom and pan.
- Being able to move existing points and resize circles and arcs.
- Being able to add points on circles and arcs.
- Toggle the UI (I suppose it's debug).
- Toggle snapping (without holding the key).
- Some anti-aliasing.
- Being able to snap at angles.
- Being able to constraint movements to a x or y (I like the way Blender does this).
- Adding guides (line only used for reference or snapping).
- Being able to remove previous primitives that I used only as helper.
- Continuous line drawing (not having to click on the last point to continue the shape).
- Performances seems to go down fast with the number of points.
Thanks for the detailed suggestion list Simon. As you say, I have plans for some of those already.

mrmixer
- Being able to move existing points and resize circles and arcs.
- Being able to remove previous primitives that I used only as helper.

You can currently move points, but it's not something I've advertised as it's not working quite right at the moment. If you middle click it starts moving the point, then left click to place or right click/escape to cancel. Arcs and lines will move with them as you'd expect, but the intersections get confused and only the centre for circles will move (you can't resize them).
It was uncertain which design path of 2 to go down for the data structure for circles... I chose the wrong one but will be fixing it shortly!
You can also delete points with right click on normal mode. Geometer removes all shapes dependent on that point... (it leaves empty intersections that it shouldn't).

mrmixer
- Being able to constraint movements to a x or y (I like the way Blender does this).
I get where you're coming from with X/Y constraints, but I'm currently not sure if I want that - it's starting to get outside the capabilities of compass/straightedge. Having said that, I will be making it possible to rotate the canvas to make any line parallel with the X-axis, and then make lines perpendicular to that using normal construction methods. I haven't quite decided where on the efficiency/authenticity scale I want Geometer to lie.

mrmixer
- Being able to snap at angles.
Do you mean as if you were putting a ruler between 2 points (setting the angle) and then drawing a line that beyond/short of the end point? Or snapping to e.g. 30°, 45° etc? Something else?

mrmixer
- Toggle snapping (without holding the key).
Snapping will be changing a bit when I implement making points on lines/circles/arcs, so I'm not quite sure what the UI will be like for that yet.

mrmixer
- Adding guides (line only used for reference or snapping).
For guides, I'll be adding layers that you can snap to. I'm not sure whether an additional guide construct would get confusing... but I do quite like the metaphor of pen and pencil... ;)

Other than that, I think my responses to the rest of the points are just "yes" :D

Thanks again for the feedback,
Andrew

Edited by Andrew Reece on
azmr
Do you mean as if you were putting a ruler between 2 points (setting the angle) and then drawing a line that beyond/short of the end point? Or snapping to e.g. 30°, 45° etc? Something else?


Snapping to 30°, 45°...

And I would add the request to be able to resize the window ^^.
re snapping to degrees: the same response I had to horizontal/vertical snapping, only more so.

re window resizing:
Haha yes, that's definitely on the list!

Edited by Andrew Reece on