Opened 8 years ago
Closed 8 years ago
#4175 closed defect (fixed)
OMEdit 1.11.0 Beta1 crashes
Reported by: | Francesco Casella | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | blocker | Milestone: | 1.11.0 |
Component: | OMEdit | Version: | |
Keywords: | Cc: |
Description
@ceraolo reports a crash of OMEdit in ticket:2960#comment:38 when the following actions are performed on the attached TestCrash.mo model:
- open OMEdit
- load TestCrash.mo
- open and run IdTwoPWM
- while remaining in Plottting perspective, acting on the variables browser change the parameter "Fcar" inside pwmPulser from 1000 to 2000, key "Enter" and and click on the Re-simulate button
- CRASH
I confirm that this is reproducible in OMEdit 1.11.0 Beta1, and it should be fixed before the release.
I also have another crash case to report:
- Open the attached SimpleBrayton.mo file
- Select and run the SimpleBrayton.Simulations.Initialize_base_plant
- When the simulation is finished, go to the Simulation Output window and click on the first Debug more link.
- OMEdit crashes, and the crash report window shows up
- If I fill it in and hit Send, nothing happens, eventually I have to hit Cancel
I think this should also be fixed before the release.
Attachments (2)
Change History (8)
by , 8 years ago
Attachment: | TestCrash.mo added |
---|
by , 8 years ago
Attachment: | SimpleBrayton.mo added |
---|
comment:2 by , 8 years ago
Thread 1 "OMEdit" received signal SIGSEGV, Segmentation fault. Component::getParentComponent (this=0xff000000ff000000) at ./Component/Component.h:182 182 Component* getParentComponent() {return mpParentComponent;} (gdb) up #1 0x000000000071f83d in Component::getRootParentComponent (this=0x1ed78880) at Component/Component.cpp:733 733 while (pComponent->getParentComponent()) { (gdb) print this->getParentComponent() [Thread 0x7fffd756a700 (LWP 16194) exited] $1 = (Component *) 0x1ed78e70 (gdb) print this->getParentComponent()->getParentComponent() $2 = (Component *) 0x1ed7b110 (gdb) print this->getParentComponent()->getParentComponent()->getParentComponent() $3 = (Component *) 0xff000000ff000000 (gdb) print this->getParentComponent()->getParentComponent()->getParentComponent()->getParentComponent()
That is opening IdTwoPwm without MSL loaded and then loading MSL. Some component seems to have been unloaded or somehow an invalid pointer...
comment:3 by , 8 years ago
Adding some debug trace for the Component destructor:
Removing component 0x1eb855b0 (gdb) print this->getParentComponent()->getParentComponent() $5 = (Component *) 0x1eb855b0
So when deleting components, its children are not updated. Perhaps we need smart pointers or reference counting, Adeel?
comment:5 by , 8 years ago
The second crash is due to unexpected integer formatter in the new xmltcp code. I fixed it in 0778a51/OMCompiler and made OMEdit 31e6d94/OMEdit not to crash if Martin introduces such errors again :).
comment:6 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The crash mentioned in comment:2 is fixed in 8b76c51/OMEdit.
I found this little beauty:
Actually crashes with NULL pointer...