Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. A week and a half, now in the bin

A week and a half, now in the bin

Scheduled Pinned Locked Moved The Lounge
designcomgraphicsiothelp
18 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Gary Stachelski 2021

    Ok Also, slightly off topic, I looked at the 2ascii project code you posted in the article. It appears that on the SVG processing logic "If (bmp.begin())" returns false (because the create failed) then the code just drops through to a return 0 out of main without issuing any error message. (JPG and PNG have error messages)

    H Offline
    H Offline
    honey the codewitch
    wrote on last edited by
    #9

    I'll take a look thanks. To be honest, I threw it together to test some things. It wasn't originally meant for an article so it's a bit sloppy. However, I've updated the actual code with more error handling, just not the in-article code. I'll take a look and see if the bug is in my final codebase. Thanks again.

    Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

    1 Reply Last reply
    0
    • E englebart

      Is it drawing black figures on a black background? (ducks)

      H Offline
      H Offline
      honey the codewitch
      wrote on last edited by
      #10

      It's actually a good question, but I really don't think so in this case.

      Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

      1 Reply Last reply
      0
      • H honey the codewitch

        My code works in my initial tests, but as soon as I try to run it in the real world, boom. Nothing happens. Not even any errors, just ... nothing. I spent a week and a half building it and getting it to run through my initial tests successfully. For me that's a long time to spend on code. I spent a week on Winduino, which is fairly substantial. I can't figure out why it's not working, and yet outside my offending code there's a lot going on in the real world case so it's hard to narrow down where the problem might be coming from. Also debugging is only helpful to a point because of the way of the my rasterization works - you get lost even following routine by routine. There are qsorts, edge detection, poly fills, allocations, deallocations, etc so it's hard to know what it's doing with the data I'm passing it. Unfortunately it can only be so factored and still be performant. I'm frustrated with it, and done for now, but I wish I wasn't because it's 3am and I'm wide awake. I may have to start over.

        Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

        E Offline
        E Offline
        englebart
        wrote on last edited by
        #11

        Is it drawing black figures on a black background? (ducks)

        H 1 Reply Last reply
        0
        • H honey the codewitch

          My code works in my initial tests, but as soon as I try to run it in the real world, boom. Nothing happens. Not even any errors, just ... nothing. I spent a week and a half building it and getting it to run through my initial tests successfully. For me that's a long time to spend on code. I spent a week on Winduino, which is fairly substantial. I can't figure out why it's not working, and yet outside my offending code there's a lot going on in the real world case so it's hard to narrow down where the problem might be coming from. Also debugging is only helpful to a point because of the way of the my rasterization works - you get lost even following routine by routine. There are qsorts, edge detection, poly fills, allocations, deallocations, etc so it's hard to know what it's doing with the data I'm passing it. Unfortunately it can only be so factored and still be performant. I'm frustrated with it, and done for now, but I wish I wasn't because it's 3am and I'm wide awake. I may have to start over.

          Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

          S Offline
          S Offline
          Steve Raw
          wrote on last edited by
          #12

          While I can't offer any technical insight in this case, I can share with you an experience I had just last week. I was in a similar situation to what you're describing. I documented the experience in my progress log. It's verbose and very, very boring, so don't say I haven't warned you. Just know that you're not alone in your struggles. You can be sure of that. 10/20/2023: Several days ago, I encountered an issue at around 9:00 AM in the morning. It could be the most elusive anomaly I have ever encountered. It's the most time I have ever spent trying to pin down a bug without success. I tried everything I could for 8 hours straight. Over that time, I made zero progress. I put down my laptop, sat back in my chair, and stared at the wall. I couldn't believe how baffled I was. How does this happen? What on earth am I missing? The only option left was to walk away and revisit the issue at some point in the future. As to when that would be, I hadn't a clue. I returned 4 hours later. The only option I could think of was to scrap it, revert to a backup, and start all over again. After 3 hours, I scrapped it and reverted to a backup once again. A couple of hours later, I did it again. After another hour, I did it again, and later, again. I must have done this 5 or 6 times. By 2:00 AM I got to the point where I was just staring at the screen. I was completely exhausted. I pushed on until about 5:30 AM. By that point, I was nodding off. I struggled to keep my eyes open. The code was blurry and I couldn't read it. I don't remember anything beyond that. All I know is that I fell asleep. Aside from that one break, I went over 20 hours straight. It was a surreal experience. When I woke up, I went back to it. This time I made progress. I had to get creative though. I did narrow it down to the point where I could engineer a solid workaround. It works great, but I won't stop until I get to the source of the problem. It's a temporary fix. Since all that happened, I haven't touched a thing. It threw me for a loop, and it's going to be some time before I go near it again. If necessary, I'll revert to a backup I saved a month ago and restart from there.

          H 1 Reply Last reply
          0
          • S Steve Raw

            While I can't offer any technical insight in this case, I can share with you an experience I had just last week. I was in a similar situation to what you're describing. I documented the experience in my progress log. It's verbose and very, very boring, so don't say I haven't warned you. Just know that you're not alone in your struggles. You can be sure of that. 10/20/2023: Several days ago, I encountered an issue at around 9:00 AM in the morning. It could be the most elusive anomaly I have ever encountered. It's the most time I have ever spent trying to pin down a bug without success. I tried everything I could for 8 hours straight. Over that time, I made zero progress. I put down my laptop, sat back in my chair, and stared at the wall. I couldn't believe how baffled I was. How does this happen? What on earth am I missing? The only option left was to walk away and revisit the issue at some point in the future. As to when that would be, I hadn't a clue. I returned 4 hours later. The only option I could think of was to scrap it, revert to a backup, and start all over again. After 3 hours, I scrapped it and reverted to a backup once again. A couple of hours later, I did it again. After another hour, I did it again, and later, again. I must have done this 5 or 6 times. By 2:00 AM I got to the point where I was just staring at the screen. I was completely exhausted. I pushed on until about 5:30 AM. By that point, I was nodding off. I struggled to keep my eyes open. The code was blurry and I couldn't read it. I don't remember anything beyond that. All I know is that I fell asleep. Aside from that one break, I went over 20 hours straight. It was a surreal experience. When I woke up, I went back to it. This time I made progress. I had to get creative though. I did narrow it down to the point where I could engineer a solid workaround. It works great, but I won't stop until I get to the source of the problem. It's a temporary fix. Since all that happened, I haven't touched a thing. It threw me for a loop, and it's going to be some time before I go near it again. If necessary, I'll revert to a backup I saved a month ago and restart from there.

            H Offline
            H Offline
            honey the codewitch
            wrote on last edited by
            #13

            Sounds like a wicked bug. Good luck!

            Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

            S 1 Reply Last reply
            0
            • H honey the codewitch

              Sounds like a wicked bug. Good luck!

              Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

              S Offline
              S Offline
              Steve Raw
              wrote on last edited by
              #14

              I know! I've never seen anything like it. When I first discovered it, I thought to myself - Oh, this should be a quick fix... Little did I know...

              1 Reply Last reply
              0
              • G Gary Stachelski 2021

                hmmm nothing. Is is spinning with high CPU usage (or high memory usage), or caught in a deadlock wait?

                H Offline
                H Offline
                honey the codewitch
                wrote on last edited by
                #15

                Gary, your link regarding the AI stuff got flagged by the automod as spam, so it's pending review from one of the moderators. That said, I saw it in email and was able to peruse the link. First thing, I need to clarify something. I'm not looking for true intelligence like "here's what I want to generate" and then it just creates code. I'm looking to essentially expand existing code generators to produce more natural code. So like, I have a parser generator, Parsley: A Recursive Descent Parser Generator in C#[^] that works great, but would be better if it produced more natural parsing code. So I'm thinking I could augment a tool like this to do code synthesis. You'd still have to feed it a Context-Free-Grammar (CFG) just like normal** The difference is simply the generated code would be more natural. I imagine you'd have to train up a model for each generation scenario, but hopefully not for each CFG. The stuff at the link isn't quite what I'm after. ** an example of a CFG for JSON in my XBNF (extensible BNF) format

                // based on spec @ json.org
                Json<start>= Object | Array;
                Object= "{" [ Field { "," Field } ] "}";
                Field= string ":" Value;
                Array= "[" [ Value { "," Value } ] "]";
                Value<collapsed>= string |
                number |
                Object |
                Array |
                Boolean |
                null ;
                Boolean= true|false;
                number= '\-?(0|[1-9][0-9]*)(\.[0-9]+)?([Ee][\+\-]?[0-9]+)?';
                string= '"([^\n"\\]|\\([btrnf"\\/]|(u[A-Fa-f]{4})))*"';
                true= "true";
                false= "false";
                null= "null";
                lbracket<collapsed>= "[";
                rbracket<collapsed>= "]";
                lbrace<collapsed>= "{";
                rbrace<collapsed>= "}";
                colon<collapsed>= ":";
                comma<collapsed>= ",";
                whitespace<hidden>= '[\n\r\t ]+';

                Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                1 Reply Last reply
                0
                • H honey the codewitch

                  My code works in my initial tests, but as soon as I try to run it in the real world, boom. Nothing happens. Not even any errors, just ... nothing. I spent a week and a half building it and getting it to run through my initial tests successfully. For me that's a long time to spend on code. I spent a week on Winduino, which is fairly substantial. I can't figure out why it's not working, and yet outside my offending code there's a lot going on in the real world case so it's hard to narrow down where the problem might be coming from. Also debugging is only helpful to a point because of the way of the my rasterization works - you get lost even following routine by routine. There are qsorts, edge detection, poly fills, allocations, deallocations, etc so it's hard to know what it's doing with the data I'm passing it. Unfortunately it can only be so factored and still be performant. I'm frustrated with it, and done for now, but I wish I wasn't because it's 3am and I'm wide awake. I may have to start over.

                  Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                  Sander RosselS Offline
                  Sander RosselS Offline
                  Sander Rossel
                  wrote on last edited by
                  #16

                  Have you tried summoning a demon, speaking its true name, and have it burn the Winduino in the fiery pits of hell fix the bug for you?

                  Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

                  S 1 Reply Last reply
                  0
                  • Sander RosselS Sander Rossel

                    Have you tried summoning a demon, speaking its true name, and have it burn the Winduino in the fiery pits of hell fix the bug for you?

                    Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

                    S Offline
                    S Offline
                    Steve Raw
                    wrote on last edited by
                    #17

                    LOL! At this point, I'm willing to give it a try. I don't know how to summon a demon, though. Hello? Attention all demons, can you hear me? Isn't there some sort of demon hotline you can call? There really should be. It's not like I can just pick up my phone and dial 1-800-HI-DEMON. Maybe I'll try using Twitter. I'm pretty sure that Catholic priests provide demon removal pest control. If they start throwing around all that holy water and it lands on my keyboard, I'm screwed. I wonder if I ran a virus scan. Do virus scans detect and remove demons? I will have to look into this. Thank you very much, Sander Rossel. :thumbsup:

                    1 Reply Last reply
                    0
                    • H honey the codewitch

                      In this case I'm not doing callbacks except in the rasterizer which is battle hardened and working great for parsed-from-file SVGs as well as working with the builder in my test code, so I'm ruling that out for now to narrow my possibility matrix. What I am doing is traversing a bunch of linked lists. Something about my data in the data structures is almost certainly wrong which means my builder code isn't doing something. Complicating matters, much of this code comes from nanosvg which I didn't write, and while I've refactored it such that it's almost unrecognizable there are bits I don't understand. I'll get through it, as it's more of a motivational issue than a technical one. In a battle with machines I always win - eventually. :-\

                      Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #18

                      Quote:

                      there are bits I don't understand

                      😱

                      "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups