I pushed a fix for this. Please let us know if you find any other issues. Thanks, Radu
From: 'Radu Serban' via ProjectChrono <[email protected]> Sent: Tuesday, 17 January 2023 13:29 To: ProjectChrono <[email protected]> Subject: RE: [chrono] [BUG] Copy constructor of ChSystem is unusable Hi Geoffroy, Thank you for reporting this. I’ll look into it and provide a fix. --Radu From: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> On Behalf Of Geoffroy ALEXANDRE Sent: Tuesday, 17 January 2023 13:27 To: ProjectChrono <[email protected]<mailto:[email protected]>> Subject: [chrono] [BUG] Copy constructor of ChSystem is unusable Hello, I ran into a crash when attempting to use the copy constructor of a ChSystem, and I found the reason why in ChSystem.cpp. if using something like : ChSystemNSC* copied_sys = new ChSystemNSC(original); The copy constructor calls the function SetTimestepperType (line 108). In this function we test if the timestepper type is the same as the one we want to set by comparing it with GetTimestepperType (line 461), which is simply calling copied_sys->timestepper->GetType(), without any kind of check. This produces a crash, as the timestepper for this is empty at this point. I'm sorry I'm not familiar enough with GitHub to open an issue there, but I still wanted to report this. -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/d7d7fb38-f36c-486f-84ed-e97db413e2d6n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/d7d7fb38-f36c-486f-84ed-e97db413e2d6n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/PH0PR06MB82378AEC36B3800B3AF3E9BAA7C69%40PH0PR06MB8237.namprd06.prod.outlook.com<https://groups.google.com/d/msgid/projectchrono/PH0PR06MB82378AEC36B3800B3AF3E9BAA7C69%40PH0PR06MB8237.namprd06.prod.outlook.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "ProjectChrono" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/PH0PR06MB82373500FABAC45F32CB5A98A7C69%40PH0PR06MB8237.namprd06.prod.outlook.com.
