Menu

Crash on Win10

2020-07-06
2021-08-25
  • E.Naumovich

    E.Naumovich - 2020-07-06

    Hi,
    I observed few times and now more or less sure to claim strange fact:
    If Win10 asked to install update, but update was not intalled yet, soft wich using SimpleXlsxWriter crashes on save. I can only suspect that in this state Win10 are blocking some general functionality.

     

    Last edit: E.Naumovich 2020-07-06
  • Alexandr Belyak

    Alexandr Belyak - 2020-07-10

    Hi,
    Thanks for the info.
    It is difficult to say what exactly could be the reason. The library uses the system temporary directory, and, prior to version 0.36, request a username in the system (if not specify it manually in the code).
    Also, the zip archiver calls system functions for working with files.

     
  • E.Naumovich

    E.Naumovich - 2020-07-11

    Hi, I'll try to build testing soft with linked run-time debugger, and catch error it when it occures again. There are a little chances that some of my colleagues will appears after vacations/quarantine with not-updated-yet Win10.
    Also I suggest to add Save(FILE * handle) function.
    It may use

    HZIP CreateZipHandle(HANDLE h, const char *password);
    

    to save workbook.

     
  • Alexandr Belyak

    Alexandr Belyak - 2020-07-17

    Hi,
    Thank you for your desire to understand the problem. And sorry for the long silence, I had no free time at all.

    Thanks for the suggestion to add a new Save function, I did it. In an attachment the updated library.
    The only thing is that we have different functions for Windows and Unix. This is due to the internal organization of the zip archiver.

     
  • E.Naumovich

    E.Naumovich - 2020-07-20

    Hi,
    looks like windows version works with Windows HANDLE, not "FILE * "

    Inteface can be unified if function will accept FILE * file and inside :

    include <fcntl.h>
    Save(FILE * file)
    {
    auto dfl=fileno(file);
    HANDLE  fl=(HANDLE)_get_osfhandle(dfl);
    ****
    
     

    Last edit: E.Naumovich 2020-07-20
  • Alexandr Belyak

    Alexandr Belyak - 2020-07-31

    Hi,
    Thanks for your example! In a hurry, I did not find the "fileno" function, so I got different versions of the "Save" function. Shame on my head :-)

    I have attached an updated library. Also added an example of a mixed chart with a line and a bar serieses.

     
  • E.Naumovich

    E.Naumovich - 2020-08-03

    I tested it, looks like it works.
    Question: did lib call fclose or I must do it by myself?

     
  • Alexandr Belyak

    Alexandr Belyak - 2021-08-24

    Hi,
    I must apologize for not having replied. Last time I had no free time at all and I forgot about this discussion.
    The attachment contains an updated version of the library. It has a function:

    bool CWorkbook::Save( FILE * HF, bool CloseHandleAfterSave );
    

    The last parameter determines who should close the handle.

     
    • E.Naumovich

      E.Naumovich - 2021-08-25

      Thanks, I'll try.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.