Comments (5)
Can you please post minimal reproducible code?
Have you tried to debug with gdb
to find out where it crashes?
Also please try to build with WITH_LIBZIP
so we can establish it's not an issue inside Minizip?
from xlsxio.
S32 fileLength = 0;
S8 *sourceFile = readFile(filename, &fileLength);
if (sourceFile == NULL)
{
MessageBox(NULL, filename, "Error opening .xlsx file@1", MB_OK);
return 0;
}
if ((xlsxioread = xlsxioread_open_memory(sourceFile, fileLength, 1)) == NULL)
{
free(sourceFile);
MessageBox(NULL, filename, "Error opening .xlsx file@2", MB_OK);
return 0;
}
xlsxioread_close(xlsxioread);
//free(sourceFile);
this code only crash when xlsxioread_open_memory freedata = 1,
I tried use ollydbg to debug, but can't attach,
xlsxio-0.2.34-binary-win64.zip is just download from github release, https://github.com/brechtsanders/xlsxio/releases
I will try gdb.
from xlsxio.
warning: Critical error detected c0000374
Thread 1 "shopeeplp" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffc7121c733 in ntdll!RtlIsZeroMemory () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
(gdb) backtrace
#0 0x00007ffc7121c733 in ntdll!RtlIsZeroMemory () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#1 0x00007ffc7122580a in ntdll!.misaligned_access () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#2 0x00007ffc71225aea in ntdll!.misaligned_access () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#3 0x00007ffc71231ae5 in ntdll!.misaligned_access () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#4 0x00007ffc7114becc in ntdll!RtlGetCurrentServiceSessionId () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#5 0x00007ffc7114ab11 in ntdll!RtlFreeHeap () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#6 0x00007ffc6f6dcadc in msvcrt!free () from /cygdrive/c/Windows/System32/msvcrt.dll
#7 0x00007ffc4f3e16d8 in ?? () from /cygdrive/c/src/shopeePackingListPrinter/shopeeplp/mbin/libxlsxio_read.dll
#8 0x00007ffc4f3e7987 in xlsxioread_free () from /cygdrive/c/src/shopeePackingListPrinter/shopeeplp/mbin/libxlsxio_read.dll
#9 0x00007ffc4f3e3a65 in xlsxioread_close () from /cygdrive/c/src/shopeePackingListPrinter/shopeeplp/mbin/libxlsxio_read.dll
#10 0x0000000100401ee1 in ?? ()
#11 0x0000000100403199 in ?? ()
#12 0x00007ffc70f18241 in USER32!DispatchMessageW () from /cygdrive/c/Windows/System32/USER32.dll
#13 0x00007ffc70f1776d in USER32!SendMessageW () from /cygdrive/c/Windows/System32/USER32.dll
#14 0x00007ffc70f17527 in USER32!SendMessageW () from /cygdrive/c/Windows/System32/USER32.dll
#15 0x00007ffc70f461fd in USER32!SetCursorContents () from /cygdrive/c/Windows/System32/USER32.dll
#16 0x00007ffc70f3f372 in USER32!GetWindowTextLengthA () from /cygdrive/c/Windows/System32/USER32.dll
#17 0x00007ffc70f45614 in USER32!SetCursorContents () from /cygdrive/c/Windows/System32/USER32.dll
#18 0x00007ffc70f18241 in USER32!DispatchMessageW () from /cygdrive/c/Windows/System32/USER32.dll
#19 0x00007ffc70f17d01 in USER32!DispatchMessageW () from /cygdrive/c/Windows/System32/USER32.dll
#20 0x0000000100404416 in ?? ()
#21 0x000000010048f225 in ?? ()
#22 0x00007ffc243c80a3 in cygwin_dll_init () from /usr/bin/cygwin1.dll
#23 0x00007ffc243c5c86 in cygwin1!.assert () from /usr/bin/cygwin1.dll
#24 0x00007ffc243c5d34 in cygwin1!.assert () from /usr/bin/cygwin1.dll
#25 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
from xlsxio.
I think malloc of cygwin (use unix api) and malloc of windows (use win api) is not same function,
so malloc in cygwin and free in winapi will do this error.
thinks for reply
from xlsxio.
Did you debug a static build?
The downloadable binaries are for MinGW-w64, not Cygwin.
Please don't mix target platforms within your builds.
Their malloc()
will definitely be different and incompatible!
If you want to use it from Cygwin, build with Cygwin from source.
In general when targetting Windows it's best to aim for native (MinGW-w64) builds.
from xlsxio.
Related Issues (20)
- cannot open shared object file HOT 2
- binaries win32 are 64bit... HOT 1
- A SEGV DEADLYSIGNALflow leading to crash in main_sheet_get_relid_expat_callback_element_start lib/xlsxio_read.c:813 HOT 3
- xlsxio-0.2.32-binary-win64 cannot be used in x64 projects HOT 1
- [feature request] Add feature to set font
- The release version for win64 is actually win32 dll. HOT 5
- create xlsx file mac os numbers can't open HOT 3
- Memory leak in xlsxio_read.c
- xlsxioread_sheetlist_next returns wrong cyrillic name HOT 1
- EXPAT_INCLUDE_DIRS should be EXPAT_INCLUDE_DIR
- [CVE-2023-34795] Free of uninitialized pointer in xlsxioread_sheetlist_close() HOT 1
- Typos discovered by codespell HOT 1
- Infinite loop in xlsxio_read.c
- A way to write multiple strings to the cell HOT 1
- It tries to find `minizip` when it should find `minizip-ng` HOT 2
- xlsxio_xlsx2csv not working on Chorus PRO XLSX files HOT 6
- After using xlsxioread_sheet_open, cannot use xlsxioread_sheetlist_next to get the next sheet HOT 4
- xlsxioread_sheet_open does not seem to be honoring the flags sent. I have tried all of them, but it is not skipping blank cells oe extra cells HOT 1
- prebuilt dll 32bits can not use
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xlsxio.