*Smokes pipe, adjusts in fancy wingback chair*
-
“Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth.” - Sherlock Homes (Arthur Conan Doyle) I donned my detective hat. I found the path that is causing a stack overflow on my widget. It's a series of nested function calls that take a lot of parameters and use a lot of local arguments. The bad news is, it's not just turning a recursive algorithm into an iterative one like I had hoped. I have to do classic stack reduction techniques, and just do it in bulk. I need to know how they can nest though, so I need to brush up on the SVG specification a bit. I'm rusty. But I found it. I found the offending code path. No small feat when the damn thing clobbers the stack frame (and thus, the stack trace that goes with it) I also solved the mystery of why it "worked before". The answer is, it basically didn't. I was usually parsing and initializing the SVG information in the global space rather than in main() or something. That usually works, although some more complicated docs cause an initial reboot on an ESP32 before working. That's weird, but I've run into it in the past, and I didn't know why. Now I do. I'm not happy about what I found, but at least it's not Geraldo finding Capone's empty safe, and I've got somewhere to begin. SVG on devices with like 192KB of RAM is no easy feat, but I like a challenge. Fortunately it works great when you build the SVGs using my in memory builder classes and don't parse the SVG from XML. I use SVG as a primary graphics rendering tool in my graphics library, because I have not found algorithms for anti-aliased primary shapes that work with alpha-blending. The Wu algorithm for example, winds up plotting pixels in the same place more than once, so it destroys alpha-blending. SVG works with alpha-blending and is intrinsically anti-aliased. Only issue is it's not as fast as I'd like.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
“Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth.” - Sherlock Homes (Arthur Conan Doyle) I donned my detective hat. I found the path that is causing a stack overflow on my widget. It's a series of nested function calls that take a lot of parameters and use a lot of local arguments. The bad news is, it's not just turning a recursive algorithm into an iterative one like I had hoped. I have to do classic stack reduction techniques, and just do it in bulk. I need to know how they can nest though, so I need to brush up on the SVG specification a bit. I'm rusty. But I found it. I found the offending code path. No small feat when the damn thing clobbers the stack frame (and thus, the stack trace that goes with it) I also solved the mystery of why it "worked before". The answer is, it basically didn't. I was usually parsing and initializing the SVG information in the global space rather than in main() or something. That usually works, although some more complicated docs cause an initial reboot on an ESP32 before working. That's weird, but I've run into it in the past, and I didn't know why. Now I do. I'm not happy about what I found, but at least it's not Geraldo finding Capone's empty safe, and I've got somewhere to begin. SVG on devices with like 192KB of RAM is no easy feat, but I like a challenge. Fortunately it works great when you build the SVGs using my in memory builder classes and don't parse the SVG from XML. I use SVG as a primary graphics rendering tool in my graphics library, because I have not found algorithms for anti-aliased primary shapes that work with alpha-blending. The Wu algorithm for example, winds up plotting pixels in the same place more than once, so it destroys alpha-blending. SVG works with alpha-blending and is intrinsically anti-aliased. Only issue is it's not as fast as I'd like.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
I have to ask: anything 'special' in the pipe? :-D Given this problem, a celebration is in order!
Software Zen:
delete this;
-
“Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth.” - Sherlock Homes (Arthur Conan Doyle) I donned my detective hat. I found the path that is causing a stack overflow on my widget. It's a series of nested function calls that take a lot of parameters and use a lot of local arguments. The bad news is, it's not just turning a recursive algorithm into an iterative one like I had hoped. I have to do classic stack reduction techniques, and just do it in bulk. I need to know how they can nest though, so I need to brush up on the SVG specification a bit. I'm rusty. But I found it. I found the offending code path. No small feat when the damn thing clobbers the stack frame (and thus, the stack trace that goes with it) I also solved the mystery of why it "worked before". The answer is, it basically didn't. I was usually parsing and initializing the SVG information in the global space rather than in main() or something. That usually works, although some more complicated docs cause an initial reboot on an ESP32 before working. That's weird, but I've run into it in the past, and I didn't know why. Now I do. I'm not happy about what I found, but at least it's not Geraldo finding Capone's empty safe, and I've got somewhere to begin. SVG on devices with like 192KB of RAM is no easy feat, but I like a challenge. Fortunately it works great when you build the SVGs using my in memory builder classes and don't parse the SVG from XML. I use SVG as a primary graphics rendering tool in my graphics library, because I have not found algorithms for anti-aliased primary shapes that work with alpha-blending. The Wu algorithm for example, winds up plotting pixels in the same place more than once, so it destroys alpha-blending. SVG works with alpha-blending and is intrinsically anti-aliased. Only issue is it's not as fast as I'd like.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
Try the dish-of-the-day at Milliways for dinner.