1 Reply Latest reply on Sep 19, 2018 5:34 AM by Artem Taturevych

    Add-in crashing solidworks

    Carmen Lopera

      I am having an intermittent crash using my .NET Add-in that is causing SolidWorks to crash. The Add-in has a button that exports to STL any part in the assembly that is custom.

       

      I attached a dump from Solidworks.

      I have not been able to catch any unmanaged exceptions in the Add-in code not sure why.

      But  in the dump in Solidworks I spot this: Unhandled exception thrown: read access violation. pWndOldFocus was 0x6D636130.

       

      I am not entirely sure these are the only steps to make it crash but it seems that it happens quite often when:

      1. Open Assembly manually in Solidworks

      2. Very quick click Export button before the assembly is finished loading the tree manager paths on the left side.

      3. Add-in executes and exports the files and "Finished Exporting" dialog is shown

      4. Solidworks Crash

       

      Export Button Click method:

      try

      {

        ExportCustomParts()

      }

      catch(SEHException sehException)

      {

         //Get the error code

         int errcode = sehException.ErrorCode; 

      }

      catch(Exception otherException)

      {

         //other exceptions can be trapped and get exception details

        Exception excep = otherException.InnerException;

      }

       

         private void ExportCustomParts()

              {

                  bool traverse = true;

                  bool search = true;

                  bool addreadonlyinfo = false;

                  dynamic depends = null;

       

                  mModel = (ModelDoc2)TaskPaneIntegration.mSolidWorksApplication.ActiveDoc;

                  if (mModel == null)

                  {

                      MessageBox.Show("Please open a model to export", "Export Model", MessageBoxButton.OK, MessageBoxImage.Information);

                      return;

                  }

       

                  string currentPathName = mModel.GetPathName();

               

                  depends = TaskPaneIntegration.mSolidWorksApplication.GetDocumentDependencies2(currentPathName, traverse, search, addreadonlyinfo);

                    

                  // Close the assembly so we won't be holding any reference for parts and they will be closed with closeDoc once we open them with OpennDoc6 as discussed in threads:

                  // https://forum.solidworks.com/message/890479

                  // https://forum.solidworks.com/thread/224301

                  TaskPaneIntegration.mSolidWorksApplication.CloseDoc(currentPathName);

       

       

                  if ((depends == null))

                      return;

       

                  SwDMDocument19 docPart = default(SwDMDocument19);

                  SwDmDocumentOpenError nRetVal = 0;

       

                  string path = null;

                  int size = depends.Length / 2;

                  MessageBoxResult result = MessageBox.Show("Number of file references in " + currentPathName + ":" + size, "Export", MessageBoxButton.OKCancel, MessageBoxImage.Information);

                  if (result == MessageBoxResult.Cancel)

                      return;

       

        

                  for (int i = 0; i < size; i++)

                  {

                      TaskPaneIntegration.Log("**Name: " + depends[2 * i] + " Path: " + depends[2 * i + 1]);

                      path = depends[2 * i + 1];

                      // if is a part then save it

                      string extension = Path.GetExtension(path);

                      string fileName = Path.GetFileName(path);

       

                      if (extension.Equals(".SLDPRT", StringComparison.CurrentCultureIgnoreCase))

                      {

                          // Check if the part contains isCustom Flag using DM API

                          docPart = (SwDMDocument19)TaskPaneIntegration.mDocumenManager.GetDocument(path, SwDmDocumentType.swDmDocumentPart, true, out nRetVal);

       

       

                          if (nRetVal != SwDmDocumentOpenError.swDmDocumentOpenErrorNone)

                          {

                              // if it can't find the file

                              if (nRetVal == SwDmDocumentOpenError.swDmDocumentOpenErrorFileNotFound)

                              {

                                  // likely to be a virtual part

                                  if (path.Contains("^"))

                                  {

                                      //MessageBox.Show("Virtual path " + path);

                                      TaskPaneIntegration.Log("Virtual Path: " + path);

                                      continue;

                                  }

                              }

                              //else report it

                              MessageBox.Show("ISwDMApplication::GetDocument SwDmDocumentOpenError:" + nRetVal.ToString(), "Get Document", MessageBoxButton.OK, MessageBoxImage.Error);

                              TaskPaneIntegration.Log("ISwDMApplication::GetDocument SwDmDocumentOpenError:" + nRetVal.ToString());

                              continue;

                          }

       

       

                          // Checks the property exist in the part

                          if (IsCustomPropertyExists(docPart) == false)

                              continue;

       

                          string sCustPropStr = null;

                          SwDmCustomInfoType nPropType = 0;

       

                          sCustPropStr = docPart.GetCustomProperty("IsCustom", out nPropType);

                        

                          docPart.CloseDoc();

       

                          if (PartIsCustom(sCustPropStr, path))

                          {

                              ExportParts(path);

                          }

                      }

                  }

       

                  MessageBox.Show("Finished exporting " + currentPathName, "Export", MessageBoxButton.OK, MessageBoxImage.Information);

                  TaskPaneIntegration.Log("Finished exporting " + currentPathName);

              }

       

       

      And the performance.log from Solidworks crash report:

      ; SolidWorks generated log file - do not edit.

      <VERSION> 4</VERSION>

      <PROC_NUM>4 system processor(s)

      <PROC_ARCH>9, 6, 20225

      <OS>Microsoft Windows Server 2016 Datacenter Server Edition, 64-bit 10.0  (Build 14393)

      <MACHINE>IP-AC1FBD65

      <SERIAL>9000 0147 5228 7359 VVHG 5WC5

      <INSTALLER>2

      <SPEED_MEM>2300MHz 17179459584  9836953600           0 140702390222848

      <PROCESSOR> 1 "Intel64 Family 6 Model 79 Stepping 1" "GenuineIntel"

      <PROCESSOR> 2 "Intel64 Family 6 Model 79 Stepping 1" "GenuineIntel"

      <PROCESSOR> 3 "Intel64 Family 6 Model 79 Stepping 1" "GenuineIntel"

      <PROCESSOR> 4 "Intel64 Family 6 Model 79 Stepping 1" "GenuineIntel"

      <DOTNET> 4.7

      <DOTNETV4RELEASE> 460805

      <VERSIONDATESTAMP>26/2018211</VERSIONDATESTAMP>

      <S>

      <ST>1537271354

      <BUILD>SP4.0 SP4.0

      <HOTFIX>None

      <INTERNALSWVERSION>d180730.002

      <EXEDIR>C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS

      <X64> 1 0

      <DPI>96</DPI>

      <NUM_MONITOR>1</NUM_MONITOR>

      <DPI_MONITOR> Monitor0:96</DPI_MONITOR>

      <SUPPORTS_TOUCH>1</SUPPORTS_TOUCH>

      <TOOLBAR_BUTTONSIZE>0</TOOLBAR_BUTTONSIZE>

      <ADDIN> FeatureWorks:Disabled SldTrans 1.0:Disabled SldUg 1.0:Disabled SOLIDWORKS DXF3D:Disabled SOLIDWORKS HCG:Disabled SOLIDWORKS HSF:Disabled SOLIDWORKS Inventor:Disabled SOLIDWORKS JPEG:Disabled SOLIDWORKS MDT:Disabled SOLIDWORKS Pro/E:Disabled SOLIDWORKS SE:Disabled SOLIDWORKS Toolbox:Disabled SOLIDWORKS Toolbox Browser:Disabled SOLIDWORKS Utilities:Disabled

      <REALVIEW> 0

      <MSIE>9.11.14393.0

      <LANGUAGE> english,english,1033

      <CMDLINE> 0,0,0,0,0,0,1,0,0,0,0,0,0,1,-1,0,0,0,0,0, 0

      <PKGTYPE> 2

      <FDBK_OP-IN> 0 </FDBK_OP-IN>

      <SWSID> "20180918134908_26.4.0.0075" </SWSID>

      <FVI>CMD:"excel.exe" ATTR:Detected=0 ATTR:PN="" ATTR:PV="" ATTR:FV=""</FVI>

      <FVI>CMD:"winword.exe" ATTR:Detected=0 ATTR:PN="" ATTR:PV="" ATTR:FV=""</FVI>

      <FVI>CMD:"outlook.exe" ATTR:Detected=0 ATTR:PN="" ATTR:PV="" ATTR:FV=""</FVI>

      <FVI>CMD:"iexplore.exe" ATTR:Detected=1 ATTR:PN="Internet Explorer" ATTR:PV="11.00.14393.0" ATTR:FV="11.00.14393.0 (rs1_release.160715-1616)"</FVI>

      <SWINSTALL>ATTR:PN="SOLIDWORKS 2018 API SDK" ATTR:PV="26.40.0075" ATTR:MajV=26 ATTR:MinV=40</SWINSTALL>

      <SWINSTALL>ATTR:PN="SOLIDWORKS 2018 SP04" ATTR:PV="26.140.0075" ATTR:MajV=26 ATTR:MinV=140</SWINSTALL>

      <WS> 1 </WS>

      <LAST_BOOT_TIME>ATTR:time=09/16/2018 04:06:51 ATTR:GMTOffset=+01:00</LAST_BOOT_TIME>

      <GRAPHICS> CDD V4.01 X1920 Y995 32 bits 64Hz

      <ON>:Microsoft Corporation

      <OR>:GDI Generic

      <OV>:1.1.0

      <PV>:10.0.14393.2485

      <PN>:Microsoft® Windows® Operating System

      <CN>:Microsoft Corporation

      <FD>:Canonical Display Driver

      <LC>:© Microsoft Corporation. All rights reserved.

      <FV>:10.0.14393.2485 (rs1_release.180827-1809)

      <COMPUTERSYSTEMINFO>ATTR:Manufacturer=Xen ATTR:Model=HVM domU</COMPUTERSYSTEMINFO>

      <VIDEOCONTROLLERINFO>ATTR:AdapterCompatibility=Teradici ATTR:Description=Teradici PCoIP WDDM driver ATTR:DriverVersion=15.27.14.647 ATTR:PNPDeviceID=PCI\VEN_1013&DEV_00B8&SUBSYS_00015853&REV_00\3&267A616A&1&10</VIDEOCONTROLLERINFO>

      <AD2> "LOAD_ADDIN" "fworks.dll" "" [0.02] "26.4.0.75" 14 COM.old 1533015295 1

      <AD2> "LOAD_ADDIN" "SwLoaderSw.dll" "" [0.07] "26.4.0.75" 14 COM.old 1533017239 2

      <AD3>CMD:OLD_STYLE_ADDIN_OVERRIDE=0</AD3>

      <AD2> "LOAD_ADDIN" "composersolidworksplug-in.dll" "SOLIDWORKS Composer" [0.04] "7.5.5.1346" 11 COM.new 1530045045 3

      <AD2> "LOAD_ADDIN" "BOMAddin.DLL" "BOM Add-in" [0.37] "1.0.0.0" 48 NET 4086709087 4

      <AD2> "LOAD_ADDIN" "SwCSharpAddin1.DLL" "SwCSharpAddin1" [0.12] "1.0.6821.20155" 48 NET 1536052311 5

      <AD2> "LOAD_ADDIN" "SldForum.DLL" "SOLIDWORKS Forum 2018" [0.08] "26.4.0.75" 48 NET 1533012631 6

      <AD2> "LOAD_ADDIN" "cwaddinu.dll" "SOLIDWORKS CAM 2018" [5.41] "2018.2018.6.22" 14 COM.new 1529664103 7

      <AD2> "LOAD_ADDIN" "Dsgnchku.dll" "SOLIDWORKS Design Checker" [0.03] "26.4.0.75" 14 COM.new 1533017321 8

      <LOGINSTATUS_STARTUP>No user login detected</LOGINSTATUS_STARTUP>

      <UI_ENVIRONMENT>CMD:LOAD ATTR:TYPE=SWSystem ATTR:ID=1</UI_ENVIRONMENT>

      <UI_ICONCOLOR>CMD:LOAD ATTR:TYPE=SWSystem ATTR:ID=0</UI_ICONCOLOR>

      <UI_GESTUREGUIDE>CMD:LOAD ATTR:TYPE=SWSystem ATTR:ID=3</UI_GESTUREGUIDE>

      <AD2> "LOAD_ADDIN" "sldfuncfeat.dll" "sldFuncFeat" [0.20] "26.4.0.75" 14 COM.new 1533022356 9

      <DOC_OPEN> ".SLDASM" 1, 0, 1, 1, 3, 0

      <PROCMEM> CMD:DocOpen ATTR:PageFileBytes=285003776 ATTR:PageFileBytesPeak=290537472 ATTR:PoolNonpagedBytes=227168 ATTR:PoolPagedBytes=3240648 ATTR:PrivateBytes=285003776 ATTR:VirtualBytes=36738834432 ATTR:VirtualBytesPeak=36746153984 ATTR:WorkingSet=525357056 ATTR:WorkingSetPeak=525373440 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1678 </PROCMEM>

      <EVENT> [EVT_SWITCH_TO_ASSEMBLY]

      <DOC_TIME> ".0\ROS3.0.SLDASM" 19.097

      <SKSTAT> 0 0 0 0 1

      <ASSEMSTATS2> 61 31 8 5 13 0 56 85 38 2 0 0 1 1 65 31 5 0 0

      <INCTXTSTATS>

      <DECAL> A, 0, 0, 0, 0

      <COSMOS_MOTION> CMD:Statistics OPTION:NumberOfStudies=1 OPTION:NumberOfMotors=0 OPTION:NumberOfActuators=0 OPTION:NumberOfSprings=0 OPTION:NumberOfDampers=0 OPTION:NumberOfForces=0 OPTION:NumberOf3DContacts=0 OPTION:NumberOfContactComps=0 OPTION:NumberOfGravities=0 OPTION:NumberOfPositionResults=0 OPTION:NumberOfForceResults=0 OPTION:NumberOfMomentumEnergyPowerResults=0 OPTION:NumberOfOtherResults=0 OPTION:NumberOfSolvedWithCM=0</COSMOS_MOTION><PROCMEM> CMD:DocClose ATTR:PageFileBytes=316133376 ATTR:PageFileBytesPeak=361046016 ATTR:PoolNonpagedBytes=213160 ATTR:PoolPagedBytes=3319488 ATTR:PrivateBytes=316133376 ATTR:VirtualBytes=36869091328 ATTR:VirtualBytesPeak=36881104896 ATTR:WorkingSet=583344128 ATTR:WorkingSetPeak=622616576 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1222 </PROCMEM>

      <DOC_OPEN> ".SLDPRT" 1, 0, 1, 1, 3, 0

      <PROCMEM> CMD:DocOpen ATTR:PageFileBytes=326373376 ATTR:PageFileBytesPeak=361046016 ATTR:PoolNonpagedBytes=214248 ATTR:PoolPagedBytes=3305760 ATTR:PrivateBytes=326373376 ATTR:VirtualBytes=36864368640 ATTR:VirtualBytesPeak=36881104896 ATTR:WorkingSet=593809408 ATTR:WorkingSetPeak=622616576 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1314 </PROCMEM>

      <EVENT> [EVT_SWITCH_TO_PART]

      <EXPORT> "STL"

      <PROCMEM> CMD:DocSave ATTR:PageFileBytes=343707648 ATTR:PageFileBytesPeak=377344000 ATTR:PoolNonpagedBytes=218872 ATTR:PoolPagedBytes=3331928 ATTR:PrivateBytes=343707648 ATTR:VirtualBytes=36886843392 ATTR:VirtualBytesPeak=36920524800 ATTR:WorkingSet=613572608 ATTR:WorkingSetPeak=647102464 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1409 </PROCMEM>

      <EXPORT> "STEP"

      <EXPORT> "PDF"

      <DOC_TIME> ".0\ROS3.0_shelf.SLDPRT" 1.511

      <SKSTAT> 2 2 0 0 0

      <I3DSTAT> 0 0 0 0 0 0 0 0 0

      <DECAL> P, 0, 0, 0, 0

      <PROCMEM> CMD:DocClose ATTR:PageFileBytes=340312064 ATTR:PageFileBytesPeak=377344000 ATTR:PoolNonpagedBytes=218600 ATTR:PoolPagedBytes=3330192 ATTR:PrivateBytes=340312064 ATTR:VirtualBytes=36881039360 ATTR:VirtualBytesPeak=36942090240 ATTR:WorkingSet=608796672 ATTR:WorkingSetPeak=647102464 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1222 </PROCMEM>

      <DOC_OPEN> ".SLDPRT" 1, 0, 1, 1, 3, 0

      <PROCMEM> CMD:DocOpen ATTR:PageFileBytes=336637952 ATTR:PageFileBytesPeak=377344000 ATTR:PoolNonpagedBytes=216424 ATTR:PoolPagedBytes=3316704 ATTR:PrivateBytes=336637952 ATTR:VirtualBytes=36871180288 ATTR:VirtualBytesPeak=36942090240 ATTR:WorkingSet=605691904 ATTR:WorkingSetPeak=647102464 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1302 </PROCMEM>

      <EVENT> [EVT_SWITCH_TO_PART]

      <PROCMEM> CMD:DocOpen ATTR:PageFileBytes=336920576 ATTR:PageFileBytesPeak=377344000 ATTR:PoolNonpagedBytes=218776 ATTR:PoolPagedBytes=3330192 ATTR:PrivateBytes=336920576 ATTR:VirtualBytes=36879167488 ATTR:VirtualBytesPeak=36942090240 ATTR:WorkingSet=605913088 ATTR:WorkingSetPeak=647102464 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1389 </PROCMEM>

      <EXPORT> "STL"

      <EXPORT> "STEP"

      <PROCMEM> CMD:DocSave ATTR:PageFileBytes=345698304 ATTR:PageFileBytesPeak=386166784 ATTR:PoolNonpagedBytes=225576 ATTR:PoolPagedBytes=3386528 ATTR:PrivateBytes=345698304 ATTR:VirtualBytes=36924211200 ATTR:VirtualBytesPeak=36942090240 ATTR:WorkingSet=616112128 ATTR:WorkingSetPeak=648720384 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1412 </PROCMEM>

      <EXPORT> "PDF"

      <DOC_TIME> ".SLDPRT" 1.241

      <SKSTAT> 5 5 0 0 0

      <I3DSTAT> 0 0 0 0 0 0 0 0 0

      <DECAL> P, 0, 0, 0, 0

      <PROCMEM> CMD:DocClose ATTR:PageFileBytes=333561856 ATTR:PageFileBytesPeak=386166784 ATTR:PoolNonpagedBytes=216464 ATTR:PoolPagedBytes=3316704 ATTR:PrivateBytes=333561856 ATTR:VirtualBytes=36870664192 ATTR:VirtualBytesPeak=36943859712 ATTR:WorkingSet=602714112 ATTR:WorkingSetPeak=648720384 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1222 </PROCMEM>

      <DOC_OPEN> ".SLDPRT" 1, 0, 1, 1, 3, 0

      <PROCMEM> CMD:DocOpen ATTR:PageFileBytes=338894848 ATTR:PageFileBytesPeak=386166784 ATTR:PoolNonpagedBytes=217280 ATTR:PoolPagedBytes=3318208 ATTR:PrivateBytes=338894848 ATTR:VirtualBytes=36877545472 ATTR:VirtualBytesPeak=36943859712 ATTR:WorkingSet=608509952 ATTR:WorkingSetPeak=648720384 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1294 </PROCMEM>

      <EVENT> [EVT_SWITCH_TO_PART]

      <PROCMEM> CMD:DocOpen ATTR:PageFileBytes=339140608 ATTR:PageFileBytesPeak=386166784 ATTR:PoolNonpagedBytes=219048 ATTR:PoolPagedBytes=3331632 ATTR:PrivateBytes=339140608 ATTR:VirtualBytes=36883435520 ATTR:VirtualBytesPeak=36943859712 ATTR:WorkingSet=608702464 ATTR:WorkingSetPeak=648720384 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1390 </PROCMEM>

      <EXPORT> "STL"

      <PROCMEM> CMD:DocSave ATTR:PageFileBytes=354820096 ATTR:PageFileBytesPeak=402092032 ATTR:PoolNonpagedBytes=221224 ATTR:PoolPagedBytes=3344128 ATTR:PrivateBytes=354820096 ATTR:VirtualBytes=36907888640 ATTR:VirtualBytesPeak=36953735168 ATTR:WorkingSet=627068928 ATTR:WorkingSetPeak=662249472 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1414 </PROCMEM>

      <EXPORT> "STEP"

      <DOC_TIME> ".0\ROS3.0_BeltTensionMount.SLDPRT" 1.233

      <SKSTAT> 8 5 2 2 0

      <I3DSTAT> 0 0 0 0 0 0 0 0 0

      <DECAL> P, 0, 0, 0, 0

      <DOC_OPEN> ".SLDPRT" 1, 0, 1, 1, 3, 0

      <PROCMEM> CMD:DocOpen ATTR:PageFileBytes=343633920 ATTR:PageFileBytesPeak=402092032 ATTR:PoolNonpagedBytes=218096 ATTR:PoolPagedBytes=3319680 ATTR:PrivateBytes=343633920 ATTR:VirtualBytes=36892528640 ATTR:VirtualBytesPeak=36953735168 ATTR:WorkingSet=616161280 ATTR:WorkingSetPeak=662249472 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1271 </PROCMEM>

      <EVENT> [EVT_SWITCH_TO_PART]

      <PROCMEM> CMD:DocOpen ATTR:PageFileBytes=344276992 ATTR:PageFileBytesPeak=402092032 ATTR:PoolNonpagedBytes=219864 ATTR:PoolPagedBytes=3333072 ATTR:PrivateBytes=344276992 ATTR:VirtualBytes=36898418688 ATTR:VirtualBytesPeak=36953735168 ATTR:WorkingSet=616747008 ATTR:WorkingSetPeak=662249472 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1391 </PROCMEM>

      <EXPORT> "STL"

      <EXPORT> "STEP"

      <DOC_TIME> ".0\ROS3.0_Bearing_6_10_3.SLDPRT" 1.046

      <SKSTAT> 2 2 0 0 0

      <I3DSTAT> 0 0 0 0 0 0 0 0 0

      <DECAL> P, 0, 0, 0, 0

      <PROCMEM> CMD:DocClose ATTR:PageFileBytes=348958720 ATTR:PageFileBytesPeak=402092032 ATTR:PoolNonpagedBytes=219864 ATTR:PoolPagedBytes=3334512 ATTR:PrivateBytes=348958720 ATTR:VirtualBytes=36900208640 ATTR:VirtualBytesPeak=36953735168 ATTR:WorkingSet=620654592 ATTR:WorkingSetPeak=662552576 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1224 </PROCMEM>

      <DOC_OPEN> ".SLDPRT" 1, 0, 1, 1, 3, 0

      <PROCMEM> CMD:DocOpen ATTR:PageFileBytes=341311488 ATTR:PageFileBytesPeak=402092032 ATTR:PoolNonpagedBytes=217688 ATTR:PoolPagedBytes=3319648 ATTR:PrivateBytes=341311488 ATTR:VirtualBytes=36883869696 ATTR:VirtualBytesPeak=36953735168 ATTR:WorkingSet=613519360 ATTR:WorkingSetPeak=662552576 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1302 </PROCMEM>

      <EVENT> [EVT_SWITCH_TO_PART]

      <PROCMEM> CMD:DocOpen ATTR:PageFileBytes=341655552 ATTR:PageFileBytesPeak=402092032 ATTR:PoolNonpagedBytes=219456 ATTR:PoolPagedBytes=3333072 ATTR:PrivateBytes=341655552 ATTR:VirtualBytes=36889759744 ATTR:VirtualBytesPeak=36953735168 ATTR:WorkingSet=613801984 ATTR:WorkingSetPeak=662552576 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1392 </PROCMEM>

      <EXPORT> "STL"

      <PROCMEM> CMD:DocSave ATTR:PageFileBytes=406462464 ATTR:PageFileBytesPeak=406462464 ATTR:PoolNonpagedBytes=222312 ATTR:PoolPagedBytes=3345568 ATTR:PrivateBytes=406462464 ATTR:VirtualBytes=36955910144 ATTR:VirtualBytesPeak=36955910144 ATTR:WorkingSet=668016640 ATTR:WorkingSetPeak=668016640 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1409 </PROCMEM>

      <EXPORT> "STEP"

      <DOC_TIME> ".SLDPRT" 1.745

      <SKSTAT> 0 0 0 0 0

      <I3DSTAT> 0 0 0 0 0 0 0 0 0

      <DECAL> P, 0, 0, 0, 0

      <PROCMEM> CMD:DocClose ATTR:PageFileBytes=345063424 ATTR:PageFileBytesPeak=407027712 ATTR:PoolNonpagedBytes=217824 ATTR:PoolPagedBytes=3333584 ATTR:PrivateBytes=345063424 ATTR:VirtualBytes=36898430976 ATTR:VirtualBytesPeak=36955979776 ATTR:WorkingSet=618971136 ATTR:WorkingSetPeak=668921856 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1226 </PROCMEM>

      <PROCMEM> CMD:DocClose ATTR:PageFileBytes=345190400 ATTR:PageFileBytesPeak=407027712 ATTR:PoolNonpagedBytes=217688 ATTR:PoolPagedBytes=3318656 ATTR:PrivateBytes=345190400 ATTR:VirtualBytes=36890787840 ATTR:VirtualBytesPeak=36955979776 ATTR:WorkingSet=619118592 ATTR:WorkingSetPeak=668921856 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1226 </PROCMEM>

      <SWEXH>

      <MINIDUMP> "7bb807c3-8d6d-49db-a92a-1346e6fe9dbf" </MINIDUMP>

      <EXCEPTION> "Access Violation at 000000004546DFA6 (virtual address ffffffffffffffff), attempt to read from memory"

      <RESOURCE_WARNING>CMD:GDIHandles ATTR:used=1224 ATTR:load=12.24 ATTR:free=8776 CMD:CommitChargeMB ATTR:used=7770 ATTR:load=41.3 ATTR:free=11045</RESOURCE_WARNING>

      <AD5> auAm_c::GetEnableFileMenu;auAm_c::OnIdleNotify;auAm_c::iFireEventV;auAm_c::PostNotify;auAm_c::DocumentsLoadNotify;auAm_c::DocumentLoadNotify2;auAm_c::iFireEventV;auAm_c::DocumentLoadNotify2;auAm_c::iFireEventV;

      <RAWSTACK> sldappu:4546DFA6:0023DFA6,sldappu:45488956:00258956,sldappu:4545C6DF:0022C6DF,sldappu:4546B591:0023B591,sldappu:453FB599:001CB599,mfc140u:7FFAB72A4E02:001E4E02,mfc140u:7FFAB72A5093:001E5093,mfc140u:7FFAB72CEBA2:0020EBA2,mfc140u:7FFAB73552B5:002952B5,mfc140u:7FFAB73544C9:002944C9,mfc140u:7FFAB735441F:0029441F,sldappu:453FD9C1:001CD9C1,mfc140u:7FFAB7351CA5:00291CA5,mfc140u:7FFAB7352094:00292094,mfc140u:7FFAB71F8AA1:00138AA1,USER32:7FFADFAA1C84:00011C84,USER32:7FFADFAA1977:00011977,USER32:7FFADFAB25B3:000225B3,ntdll:7FFAE2499684:000A9684,win32u:7FFADF121184:00001184,USER32:7FFADFAA119F:0001119F,USER32:7FFADFAA1045:00011045,Microsoft:7FFACF0819CB:000019CB,COMCTL32:7FFACFBFA55E:0004A55E,COMCTL32:7FFACFC0FA68:0005FA68,USER32:7FFADFAA1C84:00011C84,USER32:7FFADFAA181B:0001181B,Microsoft:7FFACF081A4A:00001A4A,mfc140u:7FFAB7352DAF:00292DAF,mfc140u:7FFAB735443E:0029443E,mfc140u:7FFAB7351CA5:00291CA5,mfc140u:7FFAB7352094:00292094;

      <UNHANDLED>

      </SWEXH>

      <AD2> "UNLOAD_ADDIN" "BendSequenceSwu.dll" "" [0.00] 0

      <PROCMEM> CMD:AppFinish ATTR:PageFileBytes=595107840 ATTR:PageFileBytesPeak=596881408 ATTR:PoolNonpagedBytes=221904 ATTR:PoolPagedBytes=3308616 ATTR:PrivateBytes=595107840 ATTR:VirtualBytes=37143298048 ATTR:VirtualBytesPeak=37153615872 ATTR:WorkingSet=850534400 ATTR:WorkingSetPeak=850722816 ATTR:AvailableReservesMask=7 ATTR:GDIHandlesTotal=10000 ATTR:GDIHandlesUsed=1224 </PROCMEM>

      <MEMORY> 726888, 850722816, 850509824, 3393208, 3307176, 227320, 221768, 595070976, 596881408, 595070976 </MEMORY>

      <FT>1537271427

      <ELAPSED_SEC>72

      <FT_COMPUTED>1537271426

      <EOSL>0</EOSL>

      <RUNTIME>72</RUNTIME>

      <IDLETIME>0</IDLETIME>

      <AT>

        • Re: Add-in crashing solidworks
          Artem Taturevych

          This might be some internal SOLIDWORKS issue. STL is exported based on the triangulation data which might not be loaded while assembly is not fully loaded. I would suggest to disable this button until you receive the Idle notification (DSldWorksEvents_OnIdleNotifyEventHandler) from SOLIDWORKS which in theory should ensure that model is fully loaded.