• Login
sketchucation logo sketchucation
  • Login
🔌 Quick Selection | Try Didier Bur's reworked classic extension that supercharges selections in SketchUp Download

Complete Crash?

Scheduled Pinned Locked Moved Developers' Forum
4 Posts 2 Posters 86 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
    alexmojaki
    last edited by 26 Jul 2012, 20:39

    What can I do to debug a plugin when Sketchup just crashes and closes without any message or chance to see a problem on the Ruby console?
    My guess is that it's having problems colouring some faces, but it really shouldn't.

    1 Reply Last reply Reply Quote 0
    • D Offline
      driven
      last edited by 26 Jul 2012, 21:00

      hi

      are you running it from the 'plugins folder' or from Ruby Console.

      I turn off 'ruby' [the plugins folder] and run the new script from console either by copy pasting all [mac only] or line feeding.

      that eliminates clashes with other plugins.

      if all works fine I turn Plugins back 'on' and retest.

      john

      learn from the mistakes of others, you may not live long enough to make them all yourself...

      1 Reply Last reply Reply Quote 0
      • A Offline
        alexmojaki
        last edited by 26 Jul 2012, 21:26

        OK, I've narrowed it down a bit and this seems to be the line that makes it crash:

        savePath = UI.savepanel("Save results file",model.path,"Sunlight analysis.csv")

        If I Process.exit() just before that, SU stays open. Otherwise it crashes. Weirdly, though, not always. On a few occasions it survives. This is on Windows Vista: never had this problem on Mac in a whole lot of testing.

        1 Reply Last reply Reply Quote 0
        • A Offline
          alexmojaki
          last edited by 26 Jul 2012, 21:52

          OK...it doesn't crash if just before showing the savepanel I put a line of code to show a simple messagebox: then the savepanel shows. Although the messagebox is nowhere to be seen.

          Then I tried this code:

          			if UI.messagebox("Save results to file?", MB_YESNO) == 6
          				savePath = UI.savepanel("Save results file",model.path,"Sunlight analysis.csv")
          				# If the user doesn't press cancel;
          				if savePath
          					outfile = File.new(savePath, "w")
          					outfile.write(allResults)
          					outfile.close()
          				end
          			end
          

          Now when the execution reaches this point SU suddenly switches program, i.e. as if someone had pressed Alt+Tab. It's still there, but I have to reopen it. And the messagebox still isn't anywhere, hence neither is the savepanel. I just seem to have gotten the UI very confused in general.

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

          Advertisement