sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Reason why Sketchup 8 may crash

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    29 Posts 7 Posters 2.9k Views 7 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

      @kachupp said:

      @tig said:

      Surely the fixed v8 code needs to keep proper track of the changes it's making to the Registry and purge the redundant parts - we should NOT be having to do this ourselves - otherwise it's not much of an improvement ๐Ÿ˜’

      I disagree because of the registry hack; The problems donโ€™t exist when the dodgy registry entries donโ€™t exist. DayOne!
      Which makes me think itโ€™s an introduced problem ala plug-ins. They โ€œGoogleโ€ didnโ€™t think for one minute it couldnโ€™t be abused. ๐Ÿ˜

      It seems that plugin loading errors might throws things out of state.
      I think Jim maybe found something in regard to enabling/disabling extensions.

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

      1 Reply Last reply Reply Quote 0
      • K Offline
        KottonKing
        last edited by

        I am having serious issues with Skethcup crashing. Last night I had a total of 23 crashes. Of all versions of Sketchup, version 8 is by far the most buggy. I can do some of the same things in an older version and no crashes... My crashes usually occur while using Sketchy Physics. It gets extremely frustrating while in the middle of making a model and BAM!!! Crash!

        I make very complex Sketchy Physics models using all kinds of joints and literaly hundreds of grouped objects. I do understand that having such complex models broadens the way for more and more crashes and more often. But as I said I have made similar models in older versions of Sketchup and Physics with little to no crashes.

        1 Reply Last reply Reply Quote 0
        • kachuppK Offline
          kachupp
          last edited by

          I have a new Batch file (BTM 4nt/tcc only) solution.

          : # Programmatically simplified description of what the batch file does.
          : #
          : # add default loop variable or user specified
          : # make sure variable is numeric if not display error and quit
          : #
          : # display task
          : #
          : # start loop
          : # hit anykey to cancel loop and batch file.
          : #
          : # if the registry key exist .and. the registry entry does not have the required key BarID
          : # delete the registry entry (per :ToolBar_Label)
          : #
          : # show loop counter
          : # loop
          : # endloop
          : #
          : # display valid #COUNT entries
          : # clean up environment
          : # end batch file.

          Extract and open the batch file in any text editor. Read the notes!


          Advanced Batch file

          1 Reply Last reply Reply Quote 0
          • TIGT Offline
            TIG Moderator
            last edited by

            @kachupp

            This tool requires a not inexpensive 3rd-party add-on to Windows to be usable...
            Can't it be done in a normal cmd/bat format ?

            TIG

            1 Reply Last reply Reply Quote 0
            • kachuppK Offline
              kachupp
              last edited by

              @tig said:

              @kachupp

              This tool requires a not inexpensive 3rd-party add-on to Windows to be usable...
              Can't it be done in a normal cmd/bat format ?

              Hi TIG .. The functions I used in the script are available in the FREE TCC/LE "light" version
              @isdigit[] .. @regexist[] .. @regdelkey[] ..@regquery[]

              1 Reply Last reply Reply Quote 0
              • TIGT Offline
                TIG Moderator
                last edited by

                OK.

                That's not so bad.
                Might have been a good idea to explain that in the original post though ๐Ÿ˜’
                AND it's limited to 'home use'...

                TIG

                1 Reply Last reply Reply Quote 0
                • TIGT Offline
                  TIG Moderator
                  last edited by

                  Reading your code it doesn't seem to overcome the ever growing list of Toolbar entries which are made from unused entries as a new toolbar arrangement is saved and supersedes the current one. This is what slows SketchUp's startup as all of the entries are read - even those that are subsequently unused...

                  For that you probably need to remove all toolbar entries with duplicate BarID values, but how do you decide which is the more current to retain? The highest ...BarN might work, but then because there are holes in the numbering do newly made ones with the same BarID fill the gaps to confuse the next use of this cleanup tool, or could you perhaps remake the lone BarID entry with the most recent values using oldest number [lowest] of BarN and erase the other higher numbered exact duplicate version ?
                  This gets us into a terrible tangle as several entries seem to refer to one another, so it'd be all too easy to cross-thread the Registry ! Aaargh!

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • kachuppK Offline
                    kachupp
                    last edited by

                    @tig said:

                    Reading your code it doesn't seem to overcome the ever growing list of Toolbar entries which are made from unused entries as a new toolbar arrangement is saved and supersedes the current one. This is what slows SketchUp's startup as all of the entries are read - even those that are subsequently unused...

                    For that you probably need to remove all toolbar entries with duplicate BarID values, but how do you decide which is the more current to retain? The highest ...BarN might work, but then because there are holes in the numbering do newly made ones with the same BarID fill the gaps to confuse the next use of this cleanup tool, or could you perhaps remake the lone BarID entry with the most recent values using oldest number [lowest] of BarN and erase the other higher numbered exact duplicate version ?
                    This gets us into a terrible tangle as several entries seem to refer to one another, so it'd be all too easy to cross-thread the Registry ! Aaargh!

                    Hi TIG

                    What I am finding is that Getting Started and Large Tool Sets are some of the duplicated BarID values you mentioned. SU doesnโ€™t add the BarName value to its own making it a little more tedious to sort through manually. Its either visible or not 0/1

                    Will look into more on the weekend

                    This is what I got so far

                    ToolbarsUser-Bar0 = Standard
                    ToolbarsUser-Bar1 = Principal
                    ToolbarsUser-Bar2 = Camera
                    ToolbarsUser-Bar3 = Drawing
                    ToolbarsUser-Bar4 = Modification
                    ToolbarsUser-Bar5 = Construction
                    ToolbarsUser-Bar6 = Solid Tools
                    ToolbarsUser-Bar7 = Walkthrough
                    ToolbarsUser-Bar8 = Styles
                    ToolbarsUser-Bar9 = Views
                    ToolbarsUser-Bar10=Sections
                    ToolbarsUser-Bar11=Large Tool Set
                    ToolbarsUser-Bar12=Google
                    ToolbarsUser-Bar13=Getting Started
                    ToolbarsUser-Bar14= UNKNOWN ๐Ÿ˜•
                    ToolbarsUser-Bar15=Shadows
                    ToolbarsUser-Bar16=Layers
                    ToolbarsUser-Bar17=Measurements
                    ToolbarsUser-Bar18= UNKNOWN ๐Ÿ˜•
                    ToolbarsUser-Bar19= UNKNOWN ๐Ÿ˜•
                    ToolbarsUser-Bar20= UNKNOWN ๐Ÿ˜•
                    ToolbarsUser-Bar21= UNKNOWN ๐Ÿ˜• possible toggles for menu items

                    Values after Bar21 are allocated to Plugins "BarName"
                    These unknowns maybe Menu item toggles

                    1 Reply Last reply Reply Quote 0
                    • kachuppK Offline
                      kachupp
                      last edited by

                      My findings

                      The ToolbarUserCustom-bars appear to be backups of ToolbarsUser keys changing only x & y pos if moved.
                      The mess in the registry is made by users trying different plugins then adbondoning the plugins because it may not be what they are after these remanences have no way of cleaning them selfs up.

                      1 Reply Last reply Reply Quote 0
                      • danielbowringD Offline
                        danielbowring
                        last edited by

                        Absolute confirm on this - went from about a minute to launch to a second or two.

                        If you have python installed on your system, here's the script I used to remove the keys:
                        Usage: (all values have reasonable defaults, so just executing the script is fine)

                        
                        $ clean_sketchup_reg.py -h
                        usage; clean_sketchup_reg.py [-h] [--path PATH] [--root ROOT]
                                                     [--pattern PATTERN] [--verbose VERBOSE]
                        
                        Sketchup Toolbar cleaner
                        
                        optional arguments;
                          -h, --help         show this help message and exit
                          --path PATH        registry path
                          --root ROOT        root key
                          --pattern PATTERN  remove pattern
                          --verbose VERBOSE  verbosity
                        
                        

                        Code:

                        
                        import _winreg as reg
                        import re
                        import sys
                        import argparse
                        
                        def get_root_key(name);
                            try;
                                key = getattr(reg, name)
                                return key
                            except KeyError;
                                pass
                            raise ValueError('Root Key "%s" was not found' % name)
                        
                        class Cleaner(object);
                            def __init__(self, root, path, pattern);
                                self.root = reg.ConnectRegistry(None, root)
                                self.set_path(path)
                                self.pattern = pattern
                        
                            def set_path(self, path);
                                current = self.root
                                for p in path.split('/');
                                    current = reg.OpenKey(current, p)
                                self.active_path = current
                        
                            def clean(self, print_errors=False);
                                removed = 0
                                index = 0
                                while True;
                                    try;
                                        key = reg.EnumKey(self.active_path, index)
                                        if self.pattern.match(key);
                                            try;
                                                reg.DeleteKey(self.active_path, key)
                                                removed += 1
                                            except WindowsError, e;
                                                index += 1
                                                if print_errors;
                                                    print 'Failed to remove', key, ';', e.message
                                        else;
                                            index += 1
                                    except WindowsError, e;
                                        return removed
                        
                        if __name__ == '__main__';
                            parser = argparse.ArgumentParser(description='Sketchup Toolbar cleaner')
                            parser.add_argument('--path', type=str, help='registry path', default='Software/Google/Sketchup8')
                            parser.add_argument('--root', type=str, help='root key', default='HKEY_CURRENT_USER')
                            parser.add_argument('--pattern', type=str, help='remove pattern', default='^ToolbarsUser(Custom)?\-Bar\d+$')
                            parser.add_argument('--verbose', type=int, help='verbosity', default=1)
                        
                            args = parser.parse_args(sys.argv[1;])
                            
                            root = get_root_key(args.root)
                            path = args.path
                            try;
                                pattern = re.compile(args.pattern)
                            except Exception, e;
                                raise ValueError('Invalid pattern ; ' + e.message)
                        
                            cleaner = Cleaner(root, path, pattern)
                            result = cleaner.clean(args.verbose >= 2)
                            if args.verbose >= 1;
                                print 'removed', result, 'keys'
                        
                        

                        Edit: Obligatory disclaimer, use at your own risk. I've tested it on my system and found no issues.

                        You can also use this script to clean webdialog entries:

                        
                        clean_sketchup_reg.py --pattern "^WebDialog_.*$"
                        
                        
                        1 Reply Last reply Reply Quote 0
                        • thomthomT Offline
                          thomthom
                          last edited by

                          @kachupp said:

                          My findings

                          The ToolbarUserCustom-bars appear to be backups of ToolbarsUser keys changing only x & y pos if moved.
                          The mess in the registry is made by users trying different plugins then adbondoning the plugins because it may not be what they are after these remanences have no way of cleaning them selfs up.

                          Some times dead entries multiply themselves due to SketchUp bug. It's not just uninstalled plugins.

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

                          1 Reply Last reply Reply Quote 0
                          • kachuppK Offline
                            kachupp
                            last edited by

                            @tig said:

                            @kachupp

                            This tool requires a not inexpensive 3rd-party add-on to Windows to be usable...
                            Can't it be done in a normal cmd/bat format ?

                            Yes I have found a way to do a .BAT / .CMD style way very simple indeed

                            It appears just by deleting two specific keys instead of all has the same effect as resetting the DAY one toolbar
                            option. Then re-instate the deleted keys restores the two deleted entries without duplicate errors. These re-instated
                            keys do need the correct data ๐Ÿ˜• not a problem will get to the bottom of it. "reg import whatever.reg" quick fix ๐Ÿ˜Ž

                            It shouldn't in theory matter if you have thousands of useless keynames but it does because of a possible bug that's known. TT said so, I take his word as the truth ๐Ÿ˜„ Love your work Thomas ๐Ÿ˜Ž

                            Will get back soon.. But the two keys we are interested in are ToolbarsUser-Summary / ToolbarsUserCustom-Summary
                            if they don't window each other its a problem. The data stored in those keys isn't hard to comprehend.

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

                            Advertisement