Code Monkey home page Code Monkey logo

Comments (5)

brechtsanders avatar brechtsanders commented on August 20, 2024

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.

stupid0319 avatar stupid0319 commented on August 20, 2024
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.

stupid0319 avatar stupid0319 commented on August 20, 2024

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.

stupid0319 avatar stupid0319 commented on August 20, 2024

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.

brechtsanders avatar brechtsanders commented on August 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.