QXlsx
QXlsx copied to clipboard
How to close an opened document?
Hello!I'm working on my project with QXlsx. Recently I found that even if I closed all the windows in the program,the process did not disappear.I debugged for a long time,finally found that it's because of using Document::load() .In my program,.xlsx is always be opened but not always be saved. I read the source code of QXlsx but still not know :can an opened file close automatically?Or there is any API?
Maybe the problem is not about closing file.But _Document::load() _ does make my program not normally exit.Here is some info may help.My program crushed here.And I don't use class QExplicitlySharedDataPointer.Any suggestion please?
0 QExplicitlySharedDataPointer<QRegularExpressionPrivate>::~QExplicitlySharedDataPointer 156 0x6b9e9091
1 QRegularExpression::~QRegularExpression 1483 0x6b82a197
2 libstdc++-6!_ZN11__gnu_debug30_Safe_unordered_container_base7_M_swapERS0_ G:\Qt\Qt5.4.0\5.4\mingw491_32\bin\libstdc++-6.dll 0x13b09978
3 libwinpthread-1!.pth_gpointer_locked G:\Qt\Qt5.4.0\Tools\mingw491_32\opt\bin\libwinpthread-1.dll 0x64944c7f
4 ?? 0x22052584
Dear @andthen255 There is no function mentioned. The crash will be registered as an issue.
Hi. The HelloWorld Demo (in Qt 5.9.1). After "return 0;" code is called, it crashed. #120 the gdb end in ~QMap().
update:
Failed to load picture, the details are as follows:
1 QMap<int, QString>::~QMap qmap.h 339 0x4833d4
2 libstdc++-6!ZN11__gnu_debug30_Safe_unordered_container_base7_M_swapERS0 0x193a72a
3 libstdc++-6!ZN11__gnu_debug30_Safe_unordered_container_base7_M_swapERS0 0x193a780
4 ?? 0x19211b4
5 ?? 0x1921325
6 ?? 0x1921433
7 ntdll!RtlFreeUserStack 0x77812ed6
8 ntdll!RtlGetNtSystemRoot 0x777ea288
9 ?? 0x1921410
10 ntdll!LdrShutdownProcess 0x777e0496
11 ??
Dear @xjjyzmb
Can I see the files related to the full source code of the example?
Dear @xjjyzmb
Can I see the files related to the full source code of the example?
QXlsx-1.3.57\HelloWorld\HelloWorld.pro
Maybe the problem is not about closing file.But _Document::load() _ does make my program not normally exit.Here is some info may help.My program crushed here.And I don't use class QExplicitlySharedDataPointer.Any suggestion please?
0 QExplicitlySharedDataPointer<QRegularExpressionPrivate>::~QExplicitlySharedDataPointer 156 0x6b9e9091 1 QRegularExpression::~QRegularExpression 1483 0x6b82a197 2 libstdc++-6!_ZN11__gnu_debug30_Safe_unordered_container_base7_M_swapERS0_ G:\Qt\Qt5.4.0\5.4\mingw491_32\bin\libstdc++-6.dll 0x13b09978 3 libwinpthread-1!.pth_gpointer_locked G:\Qt\Qt5.4.0\Tools\mingw491_32\opt\bin\libwinpthread-1.dll 0x64944c7f 4 ?? 0x22052584
Hi. The HelloWorld Demo (in Qt 5.9.1). After "return 0;" code is called, it crashed. #120 the gdb end in ~QMap().
update: Failed to load picture, the details are as follows: 1 QMap<int, QString>::~QMap qmap.h 339 0x4833d4 2 libstdc++-6!ZN11__gnu_debug30_Safe_unordered_container_base7_M_swapERS0 0x193a72a 3 libstdc++-6!ZN11__gnu_debug30_Safe_unordered_container_base7_M_swapERS0 0x193a780 4 ?? 0x19211b4 5 ?? 0x1921325 6 ?? 0x1921433 7 ntdll!RtlFreeUserStack 0x77812ed6 8 ntdll!RtlGetNtSystemRoot 0x777ea288 9 ?? 0x1921410 10 ntdll!LdrShutdownProcess 0x777e0496 11 ??
my code end the ~qmap as yours,did you solve the question?
Is it a multi-threaded problem? I don't know exactly.
I think the problem in HelloWorld is the the same as in #156 not in .load() but in .save() try the solution https://github.com/QtExcel/QXlsx/issues/156#issuecomment-824631407
I don't know the cause now. But I will keep this issue.
Sorry for the late reply. I am currently working in a place where there is no internet.