Menu

#242 Problems using djvulibre.dll

djview
closed
nobody
None
5
2014-09-07
2014-09-04
No

I am developing djview4poliqarp, a tool based on djvulibre/djview4: https://bitbucket.org/mrudolf/djview-poliqarp. Recently the code was ported to Qt 5 and since then I am not able to run Windows version.

My (not so much) educated guess is that the problem is caused by interaction between Qt and DjVuLibre DLL (see the crash log attached). Maybe you will be able to suggest where to look for a solution?

PS. I tried newest version of Qt 4.8.x (4.8.6) and djview4poliqarp crashes there as well. Before I used 4.8.3 in Windows with no problems at all.

1 Attachments

Related

Bugs: #242

Discussion

  • Leon Bottou

    Leon Bottou - 2014-09-06

    1- I understand that the linux version works well.
    Did you try running "valgrind" on the linux version?

    2- Which version of the djvulibre library are you using :
    - your fork or the default version?
    - if the default, which version?
    - what is DDJVUAPI_VERSION in ddjvu.h?

    3- How did you merge my changes to djview into your code?
    Are you using a subset of the files that you keep in order?

    4- Windows specific questions:
    * Are you sure you use the same version
    for the dll (.dll) and the import library (.lib)
    * Are you sure the version of Qt you are using
    was compiled with the same compiler (msvc11 vs msvc12)
    as your code (otherwise you pull multiple versions of
    msvcrt into the same program...)

    Otherwise there is unfortunately very little I can do for you.
    I might close this bug very soon...

    • L.

    On Thursday, September 04, 2014 08:09:01 PM Michal Rudolf wrote:


    [bugs:#242] Problems using djvulibre.dll

    Status: open
    Group: djview
    Created: Thu Sep 04, 2014 08:09 PM UTC by Michal Rudolf
    Last Updated: Thu Sep 04, 2014 08:09 PM UTC
    Owner: nobody

    I am developing djview4poliqarp, a tool based on djvulibre/djview4:
    https://bitbucket.org/mrudolf/djview-poliqarp. Recently the code was ported
    to Qt 5 and since then I am not able to run Windows version.

    My (not so much) educated guess is that the problem is caused by interaction
    between Qt and DjVuLibre DLL (see the crash log attached). Maybe you will
    be able to suggest where to look for a solution?

    PS. I tried newest version of Qt 4.8.x (4.8.6) and djview4poliqarp crashes
    there as well. Before I used 4.8.3 in Windows with no problems at all.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/djvu/bugs/242/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #242

  • Janusz

    Janusz - 2014-09-07

    As a user of the program in question (at the moment the only one) I thank you for your answer.

    Michał is away for a few days (till Monday) and may not have acces to e-mail till his return, but I think I'm able to answer the Linux question.

    I've compiled it on Debian jessie (testing) with QT5 and from the user point of view it seems to work correctly but it has not yet been intensively tested.

    Following an advice on the Internet about using valgrind (I never used it before) I've run

    valgrind --leak-check=full -v djview4poliqarp`

    and got

    ERROR SUMMARY: 685 errors from 497 contexts (suppressed: 2 from 1)

    I enclose the complete log.

    Best regards

    Janusz

     
  • Michal Rudolf

    Michal Rudolf - 2014-09-07

    Thanks for quick answer!

    1- I understand that the linux version works well.
    Did you try running "valgrind" on the linux version?
    Yes, OS X and Linux versions work find.

    2- Which version of the djvulibre library are you using :
    - your fork or the default version?
    - if the default, which version?
    - what is DDJVUAPI_VERSION in ddjvu.h?
    Default, DDJVUAP_VERSION=21

    3- How did you merge my changes to djview into your code?
    Are you using a subset of the files that you keep in order?
    Yes, I update the qdjvu* files from git from time to time.

    4- Windows specific questions:
    Are you sure you use the same version
    for the dll (.dll) and the import library (.lib)
    Are you sure the version of Qt you are using
    was compiled with the same compiler (msvc11 vs msvc12)
    as your code (otherwise you pull multiple versions of
    msvcrt into the same program...)
    I guess this is the source of the problems. Unfortunately, I don't have MSVC, so I have to use MINGW. I suspect that never versions of Qt for Windows use slightly different MINGW version which causes the problems with the DLL I compile myself.

    One more think to try is to try to build DjvuLibre on Windows, but I guess that requires installing a lot of Unix tools there (for now I am crosscompiling djvulibre on Linux using MINGW)

    Maybe it is possibly to compile and link djvulibre statically? I guess that may solve the problem, but I wasn't able to do it (I tried ./configure --enable-static, but it fails when using Windows MINGW).

    Best regards

     
    • Leon Bottou

      Leon Bottou - 2014-09-07

      I always compile the windows version of djview with visual studio because this
      ends up being less trouble. You should try with the free "Visual Studio
      Express for Windows Desktop" available from http://www.visualstudio.com/en-us/downloads/.

      See the instructions inside the INSTALL file of the djview tarball. Instead of
      compiling Qt yourself, you can use precompiled versions of Qt for the correct
      visual studio version.

      I will close the bug report for now.

      • L.
       
  • Leon Bottou

    Leon Bottou - 2014-09-07
    • status: open --> closed
     
  • Leon Bottou

    Leon Bottou - 2014-09-07

    Closing the bug report.

    Note that using old versions of Qt is quite okay under windows, since you also have to distribute the DLLs.

     

Log in to post a comment.