Comment 12 for bug 678808

Revision history for this message
Pablo d'Angelo (pablo.dangelo) wrote :

Logged In: YES
user_id=30308
Originator: NO

A further update:

I have reproduced the bug on a Windows machine. It is not related to the conversion settings, all three variants seem to produce the same result. I have traced the error back to the vigra image import libary, which hasn't changed since ages.

The problem seems to be that the C++ io functions do not like the filenames. fopen() works, but std::ifstream (used by most vigra image decoders) doesn't.

beta 4 and beta 5 were build with MSVC 2003 using a custom MSVC solution, not the one created with CMake. So I believe there might be a problem with the MSVC 2008 build. Maybe it can be solved with different compiler flags, (special options, different runtime library) but I don't know. It would probably be best to test with a very simple c++ program that uses ifstream to open a file and see if the errors also happen there. Hugin uses the static runtime libraries (which is discouraged by microsoft, and they might not be supported that well anymore), so maybe switching to the DLL variants might help (this will also require a complete recompilation of all dependencies! ARGHHHHH!). So a simple test program would be good. I don't have time to follow this issue in more detail right now, but maybe you could test with a test program such as:

#include <ifstream>
#include <stdio.h>

int main()
{
  char * filename = "some_filename_with_cyrillic_chars"
  FILE * f = fopen(filename,"rb");
  if (f) {
    printf("OK: fopen %s worked\n", filename);
    fclose(f);
  } else {
    perror("fopen failed");
  }

  std::ifstream fin2(filename, std::ios::binary);
  if (!fin2.good()) {
     printf("FAILED: std::ifstream in binary mode\n");
  } else {
     printf("OK: std::ifstream in binary mode\n");
  }
}

Try to compile it with different runtime libs (hugin uses /MT and /MTd), and see if it makes a difference.

Pablo