QGCoder / qgcoder

An interactive G-code editing GUI.
GNU General Public License v2.0
19 stars 4 forks source link

MainWindow::closeEvent *** Error #9

Closed ArcEye closed 8 years ago

ArcEye commented 8 years ago

MainWindow::closeEvent * Error in `./gcoder': free(): invalid next size (fast): 0x00000000021a64e0 *

Started getting this and believe it is simply because you are specifically freeing class members in MainWindow~, that are freed automatically anyway, because they are part of the class.

https://github.com/koppi/gcoder/blob/master/mainwin.cpp#L59 https://github.com/koppi/gcoder/blob/master/mainwin.h#L57

Not sure why it does not always happen, but since recompiling I get it every time now

ArcEye commented 8 years ago

Not the end of the story, so not full the reason.

Now again getting

MainWindow::closeEvent
*** Error in `./gcoder': free(): invalid next size (fast): 0x0000000001fc3890 ***
Aborted

and if loadSettings() is not commented out, get this at startup

*** Error in `./gcoder': corrupted double-linked list: 0x00000000010edfb0 ***
Aborted

I can delete the settings in ~/.config and it will start OK

All since using the widget, don't know if connected

ArcEye commented 8 years ago

In a bit I am going to go back to the beginning, remove the gcode widget from the ui, re-insert the widget to ensure it is the right binary version and try from there.

Got a couple of other things to do first.

Have added a FileOpen facility with file read size limiting which works, but then had these problems which need sorting first.

koppi commented 8 years ago

I'm currently in heavy editing of the gcoder codebase + writing some minimal pipeline proof of concept Qt code. Please do not edit too much, the gcoder codebase will change a lot in the next few days.

ArcEye commented 8 years ago

OK, I will push my changes to my own fork and keep them there for now.

All the free() and memory corruption problems were to do with some binary incompatibility between Qt 5.4 and 5.6 libraries I stupidly 'upgraded' to 5.6 as you were using it, have now reverted to 5.4.

At present I cannot get the widget from the new QGCodeEditor packaging to even display in Designer 5.4 and have reverted to my old widget library, which works fine.

I'll work through and build everything again with 5.4 and see if it settles.

The original 'fix' re not deleting class pointer members in the destructor, should still be valid, but just wasn't the cause of the error messages.