Ekkehart Schlicht wrote:
I hope that these observations help to solve the problem. I opt for solution 1. at the moment and can now look forward to trying the new Lyx 1.4.1 (as time permits).

I hope that this bug is not too difficult to resolve.

Hi, Ekkehart.

Could you try out the executable found at
  http://www.lyx.org/~leeming/ekkehart.exe
It was compiled from the source below and here it exits with

  Exception caught:
    boost::filesystem::is_directory: "J:\foo": The system cannot
    find the file specified.
    Assertion failed: false, file ekkehart.cpp, line 31

  This application has requested the Runtime to terminate it
  in an unusual way. Please contact the application's support
  team for more information.

What happens when you run it? Especially when you don't have anything mapped to your virtual drive.

The second step is to change
  if (fs::is_directory(path))
to
  if (fs::exists(path) && fs::is_directory(path))

Here, the program runs silently (no output, no error). What happens to you? The executable in this case is to be found at
  http://www.lyx.org/~leeming/ekkehart2.exe

Regards,
Angus


/*
  Compiles with
  g++ -fno-exceptions -Iboost -o ekkehart ekkehart.cpp \
     -Lbuild/boost/libs/filesystem/src/.libs -lboost_filesystem
 */

#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <cassert>
#include <cstdlib>
#include <exception>
#include <iostream>

namespace fs = boost::filesystem;

int main()
{
  fs::path const path("J:/foo", fs::no_check);
  if (fs::is_directory(path))
    std::cout << path.native_directory_string()
              << "is a directory" << std::endl;
  return 0;
}

namespace boost {

void throw_exception(std::exception const & e)
{
        std::cerr << "Exception caught:\n"
                  << e.what() << std::endl;
        assert(false);
}

void assertion_failed(char const * expr, char const * function,
                      char const * file, long line)
{
        std::cerr << "Assertion triggered in " << function
                  << " by failing check \"" << expr << "\""
                  << " in file " << file << ":" << line << std::endl;
        ::abort();
}

} // namespace boost

Reply via email to