Page 1 of 1

double free or corruption

Posted: Wed Jan 03 2024 10:28 pm
by seasoned_geek
Anybody else seeing this?

Code: Select all

double free or corruption (out)
Aborted (core dumped)
Took the New Year, new versions approach today.

Fresh built RedDiamond this morning prior to upgrading, all was well.

Pulled and merged Scinctilla into CsScintilla, everything built all clean and nice, installed the library.

Merged from CopperSpice into my fork which creates the LS-CS installable images. Everything built, much fewer notices from CMake about variables not being set when finding packages. Thank you for that.

Installed LS-CS and built the exact same RedDiamond code I built this morning.

Code: Select all

./reddiamond
adding QXcbScreen(0x5557a4cf4f90, name=:1.0-32, geometry=1920x1080+0+0, availableGeometry=1850x1053+70+27, devicePixelRatio=1.0, logicalDpi=QPair(96.0,96.0), physicalSize=483.0x272.0mm, screenNumber=0, virtualSize=3840x1080 (3840.0x1080.0mm), orientation=0, depth=24, refreshRate=60.0, root=2ca, windowManagerName=GNOME Shell) (Primary: false )
adding QXcbScreen(0x5557a4cfdd30, name=:1.0-40, geometry=1920x1080+1920+0, availableGeometry=1920x1053+1920+27, devicePixelRatio=1.0, logicalDpi=QPair(96.0,96.0), physicalSize=483.0x272.0mm, screenNumber=0, virtualSize=3840x1080 (3840.0x1080.0mm), orientation=0, depth=24, refreshRate=60.0, root=2ca, windowManagerName=GNOME Shell) (Primary: false )
primary output is :1.0-32
Choosing xcb gl-integration based on following priority
 (xcb_glx, xcb_egl)
Xcb GLX gl-integration created
Xcb GLX gl-integration plugin successfully initialized
Defaulting to /home/roland/sf_projects/reddiamond_debug/share/reddiamond for SHARE

double free or corruption (out)
Aborted (core dumped)
Doesn't even bring up a screen. Nuked all the reddiamond config and database files "just in case", no change.

Has anybody else built from the tip of tip in the source repo and had a previously working thing just fail with new CopperSpice code?

Just wanted to ask in case this is a known issue someone is working on.

Re: double free or corruption

Posted: Wed Jan 03 2024 11:12 pm
by barbara
We currently have no other reported or known issues building with the latest version of CopperSpice. CS and KS are always tested before pushing to github. I will ask one of our team members to re-test a few applications.

I personally verified that Diamond builds and starts correctly on Windows. Someone is already testing on Debian.

Barbara

Re: double free or corruption

Posted: Thu Jan 04 2024 1:07 am
by barbara
Just heard back from the CS team member who was testing and they were able to build Diamond and run it with no issues. Program started just fine on Debian 12.

Can you build KS and see if you have any issues starting this program.

Barbara

Re: double free or corruption

Posted: Fri Jan 05 2024 12:04 am
by seasoned_geek
Even Example1 of CsScintilla croaks before display.

Code: Select all

connect( m_editWidget->get_doc(), &CsScintillaDocument::save_point, this, &MainWindow::savePointReached );
I had been running 5.2.something of Scintilla in CsScintilla and moved to 5.4.1 today.

It might also be, when I merged your latest stuff in that I forgot to flip the one thing that ___has___ to be flipped in order for CopperSpice to work from system installed locations. I gotta remember what it is. Usually I get a merge conflict and identify it right away. It's a search path thing. What you have only works if built and installed local. Example1 died "unable to find malloc."

Not flipping the thing in the code would explain the "unable to find malloc" I guess if a failed to find malloc fell through to cleanup that could also be the source of the double free error. Been away from RedDiamond and CsScintilla too long. Can't remember all of the work arounds I have to re-do each time I merged.

Re: double free or corruption

Posted: Sat Jan 06 2024 8:59 pm
by barbara
Since this is not something we can reproduce we will need a very small test case that can show the issue. Please use test example two from our CopperSpice Journal.

* Example 2
   https://journal.copperspice.com/?p=375

There is a link on the bottom of the example explanation which takes you to a download page. The zip file contains the source code and the build files.

Barbara

Re: double free or corruption

Posted: Wed Feb 14 2024 10:18 pm
by seasoned_geek
That was one deeeeep dive further than I ever wanted to go in Scintilla to find the issue.

Sorry for the false alarm.