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

    Sketchup crash when i use thread

    Scheduled Pinned Locked Moved Developers' Forum
    11 Posts 4 Posters 297 Views 4 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.
    • thomthomT Offline
      thomthom
      last edited by

      Ruby threads? They will not work under SketchUp. (search the forum and you see lots of topics detailing all the issues.) Ruby threads, in Ruby 1.8 which SketchUp uses isn't real threads.

      Thomas Thomassen β€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • S Offline
        Squall290586
        last edited by

        @thomthom said:

        Ruby threads? They will not work under SketchUp. (search the forum and you see lots of topics detailing all the issues.) Ruby threads, in Ruby 1.8 which SketchUp uses isn't real threads.

        Hi,

        I search on the forum.
        But i don't find result about thread.
        Have you any link on thread using under sketchup?

        Thanks in advance.
        πŸ˜„

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          Basically, threads under SketchUp Ruby is a no-go. They still block SketchUp from being responsive.

          Thomas Thomassen β€” SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • S Offline
            Squall290586
            last edited by

            @thomthom said:

            Basically, threads under SketchUp Ruby is a no-go. They still block SketchUp from being responsive.

            I noticed that, that's why i create a web dialog with a javascript setTimeout which call a method Thread.join() with a parameter in order to run my thread.
            But sometimes, i don't know for what sketchup crash.

            And i don't understand why.

            1 Reply Last reply Reply Quote 0
            • Chris FullmerC Offline
              Chris Fullmer
              last edited by

              Because it isn't designed to work that way. Splat.

              Lately you've been tan, suspicious for the winter.
              All my Plugins I've written

              1 Reply Last reply Reply Quote 0
              • S Offline
                Squall290586
                last edited by

                @chris fullmer said:

                Because it isn't designed to work that way. Splat.

                Hi,

                How i can make a process which not freeze the UI?
                My process can take a very long time.

                But if not use thread, the UI freeze.

                Have you any solution to solve my problem?
                I search on the forum but i don't found a solution.

                Thanks in advance.

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  It's something many people have tried to find a solution for - some uses timers to slice up the work, but each tiny slice still blocks SketchUp UI so it does affect performance. And the task itself will take longer time.

                  I think the only proper solution is to make a Ruby C Extension and use C to create a native thread. But I don't think you can access the SketchUp model from a separate thread so it'd only work if you where doing calculations or other operations that doesn't need interaction with the model.

                  Thomas Thomassen β€” SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    Squall290586
                    last edited by

                    @thomthom said:

                    It's something many people have tried to find a solution for - some uses timers to slice up the work, but each tiny slice still blocks SketchUp UI so it does affect performance. And the task itself will take longer time.

                    I think the only proper solution is to make a Ruby C Extension and use C to create a native thread. But I don't think you can access the SketchUp model from a separate thread so it'd only work if you where doing calculations or other operations that doesn't need interaction with the model.

                    Damn, my treatment change the model.
                    I have really no possibility to not freeze the UI.

                    Actually my code make this but if i click on a web dialog, sketchup crash.
                    You know how read a sketchup dump file, may be the cause of my problem is in this file.

                    Thanks in advance.

                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      No, I'm afraid I don't know how to read the dump file. I wish I did because there are times I would liked to get some clue myself.

                      Thomas Thomassen β€” SketchUp Monkey & Coding addict
                      List of my plugins and link to the CookieWare fund

                      1 Reply Last reply Reply Quote 0
                      • Dan RathbunD Offline
                        Dan Rathbun
                        last edited by

                        Have you tried using UI.start_timer

                        I show an example HERE

                        I'm not here much anymore.

                        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