Found a bug, need help navigating source code

Hi, this is my firt post here.

I found a rather trivial but nasty bug (T71137) in splines interpolation in Blender. I think I know how to fix it, but I can’t find the code.
This bug occurs in the computation of an extrusion in a 3D curve (maybe also in 2D curve, but it is not noticeable), in particular when computing the direction for the extrusion of the interpolated points in the spline.

Does anyone know where in the code base I should look?

Thanks!

1 Like

Hi, thanks for reporting. I haven’t looked myself, but one way of finding out would be to pause the debugger while extruding, and then have a look at the call stack.

Thanks for the suggestion… but I haven’t used a debugger for a few years… I assume that would require me to setup a full development environment?

yes for that you will need to be able to build blender. Starting a debugger is usually easy if you have an IDE. Have a look at https://wiki.blender.org/wiki/Building_Blender

I can help you on blender.chat (channel #blender-coders) if you have questions regarding building/debugging. The bug you reported looks like a good first task to solve to start contributing to blender source code…

1 Like

Try running Blender from the console with --debug-all It will tell you everything you want to know! And everything you don’t!

I would start looking around here:
https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/curve/

master branch > source > blender > editors > curve

But I’m no C dev. So that’s just a guess.

Much of the curve code is in

https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/BKE_curve.h

https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/curve.c

https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/curve_decimate.c