Pass a QLinkedList to mergeUniqueXValues instead of a QList in the pointset.cpp file. The QList fails in the insertion on the third pass in Windows. The QLinkedList is made for this kind of usage and works well.
This change cascades to a few other functions in pointsets.cpp
These are the functions:
- exportToStreamAllCurvesTogether
- exportToStreamEachCurveSeparately
- ascendingXValuesList
I have been testing it for a few days as I am in a project that requires Engauge. So far it is stable. Without this change it crashed in a repeatable way by just exporting a plot with three curves or looking at the Export Setup settings with 3+ curves.
No patch? I am still looking into sorting the QLinkedList.
I don't have access to update the source here at SourceForge. So regrettably, it seems like the project may die. I like and use the software though, so will keep it working for the time being.
I posted a tarball of the source I used for the Windows executable at: http://bconverged.com/download.php#engauge
If you find any bugs and/or make any changes, let me know.
Hi, Jeff,
Thanks for sharing the sources. I am going to test this version.
You haven't actually proposed your changes here as a patch?
Jeff,
What version of engauge use have used as a base? Since there is no commit history for your changes, it's hard to see what's really changed.
I moved mergeUniqueXValues to std::list temporarily, to prevent crashes on Windows (https://github.com/crayxt/digitizer/commit/ae4d2dcd69721335bfe62f0071fe3c6e3dddd5f9). I'd like to check in your changes as well.
Hello,
I think I may have used the source that was in the Windows distribution as
a starting point. It was 14 months ago, so I cannot say for sure.
If you have permission and would like to check in my changes, feel free
please do. I do not have permissions to do so.
There are a lot of other issues I was looking at, but did not want to dig
in too deep if there was not going to be a future for the code. The
biggest task is to to get rid of the bridging code for compatibility
between Qt3 and Qt4. None of that is supported in Qt5 and there is no
telling how long Qt4 will be available. A some of it was not needed in the
first place, though there are some objects that will need some work.
Jeff
On Thu, Sep 11, 2014 at 9:39 PM, Baurzhan Muftakhidinov <crayxt@users.sf.net
--
Jeff Baylor
Convergent Mechanical Solutions LLC
web: http://bConverged.com
email: jbaylor@bConverged.com
phone: 206.755.6199
Related
Patches: #6
Jeff, I see that current master of digitizer has went ahead of your version. I am only able to pick up your Q3TextStream to QTextStream change. And no I don't have commit privileges here, cloned it to github and working there.
Thanks for your help.
Sorry, I've been out of touch for a while. I was in survival mode, but now I'm back.
So, can I do anything to help you? For starters, would you like commit privileges?
-Mark Mitchell
Hi Mark,
First off, I came here to complain about engauge's crashing on windows when exporting more that one (three?) curves at once.
Then I tried Jeff's suggestion to switch mergeUniqueXValues from QList to QLinkedList, but couldn't find an easy way to sort QLinkedList. So temporarily I switched it to std::list instead.
Then I added couple little changes (https://github.com/crayxt/digitizer/commits/baur). If you find them any useful you can pull them into main source tree. I build it on Windows 7, VS++ 2010, MS SDK, Qt libs installed. In Qt command line I navigate to source folder, then qmake, nmake. I also test on Linux 64-bit.
I don't think I need commit privileges here, I am able to provide just a small fixes only.
Thanks,
Hello Baurzhan, Thanks for the changes. I have your 50ce8f2 commit changes, and they look very reasonable. I will test your changes and then incorporate them.
One minor point - does the Microsoft compiler not insert a 'lib' into the library name? The old entry was LIBS+= ...-lfftw3... and the new entry is LIBS+=...-llibfftw3-3...
Regarding other issues - yes, this may be time to move to Qt5, and use that move as an opportunity to finally fix some problem areas.
Well I am not sure. Have to dig deeper. Build was successful only when I changed this option. I pushed this to git only to not lose configuration that worked for me.
I think this (-L -llibfftw3-3) is option of qmake, not of compiler. I'll check produced Makefiles to make sure.
I compared Makefiles created with -lfftw3 and -llibfftw3-3 options, here is the result
https://gist.github.com/crayxt/160c52ac8b695782f3f7
Makefile-lib created with my changes to digitizer.pro file. Without this change, ms linker complains to missing library file.
But on Windows you can also compile with mingw, and I haven't tried it.
Any advice will be appreciated.