sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    WebDialog crashes Sketchup

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 2 Posters 496 Views 2 Watching
    Loading More Posts
    • 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.
    • A Offline
      azuby
      last edited by

      Hey folks,

      programming a Ruby plugin I came across a problem which I have had in the past: Working with WebDialogs can cause Sketchup to crash. My problem - I don't know why. Does anybody know of problems concerning WebDialogs? Maybe I'm using a 'wrong' way to get values from the dialog or my plugin works on too much data.

      The situation: I have a value matrix which I can update by entering values to the dialog. When pressing my "Update" button, Sketchup calls my action callback. This one informs an observer and this one should extract the values from the dialog by using WebDialog#get_element_value. And sometimes the plugin does not crash ... hm.

      Unfortunaltely I can't show you my code because it is too much and complex.

      I use Sketchup 6.

      Ask me if my problem isn't clear enough.

      azuby

      *error initus :: Blocks | CurrentDate | d/Code | extensionmanager | FFlipper | HideEdges | MeasuredArea | ModelHistory | PluginsHelp | PronButton | SAWSO | SCP | SU²CATT

      Bad English? PM me, correct me. :smile:**

      1 Reply Last reply Reply Quote 0
      • scottliningerS Offline
        scottlininger
        last edited by

        What kind of observer is in play here?

        I'm not remembering any WebDialog crashes, but there have been observer crashes, particularly on entity observers.

        • Scott Lininger
          SketchUp Software Engineer
          Have you visited the Ruby API Docs?
        1 Reply Last reply Reply Quote 0
        • A Offline
          azuby
          last edited by

          Oh, its not a Sketchup observer, its my own one. You know, porgramming design pattern and such things 😉

          azuby

          *error initus :: Blocks | CurrentDate | d/Code | extensionmanager | FFlipper | HideEdges | MeasuredArea | ModelHistory | PluginsHelp | PronButton | SAWSO | SCP | SU²CATT

          Bad English? PM me, correct me. :smile:**

          1 Reply Last reply Reply Quote 0
          • scottliningerS Offline
            scottlininger
            last edited by

            @azuby said:

            Oh, its not a Sketchup observer, its my own one. You know, porgramming design pattern and such things 😉

            azuby

            Ah,

            Well, if you feel motivated to create a minimal use case that causes the crash, I could hunt it down. I'd also consider upgrading to SU7 and seeing if that fixes the crash. We did improve stability in a variety of places around the Ruby API. Thanks!

            • Scott Lininger
              SketchUp Software Engineer
              Have you visited the Ruby API Docs?
            1 Reply Last reply Reply Quote 0
            • A Offline
              azuby
              last edited by

              Hm OK, you see me surprised. Till now I have used an HTML code similar to the following for my "Update" button:

              <input type="button" onClick="javascript&#058;window.location = 'skp;foo@'; return false" value="Update">
              

              After I changed it to:

              <input type="button" onClick="javascript&#058;window.location = 'skp;foo@bar'; return false" value="Update">
              

              Sketchup doesn't crash any longer.

              puts "Well, and now I'll clean up my Ruby code."

              what the f...

              =begin
              azuby
              =end

              *error initus :: Blocks | CurrentDate | d/Code | extensionmanager | FFlipper | HideEdges | MeasuredArea | ModelHistory | PluginsHelp | PronButton | SAWSO | SCP | SU²CATT

              Bad English? PM me, correct me. :smile:**

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement