home Forums # Technical Support std::bad_alloc Runtime Error

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #1693

    Whenever I run my program it gives me a runtime error of std::bad_alloc exception. I’m using fuzzylite 5.0 release version of the library and dll. The compiler stops at the following line:

    fl::Engine* engine = new fl::Engine;

    Anyone knows why? Thanks for the help!



    have you set up correctly the environment variables (i.e., INCLUDE_HEADER, LIBRARY_PATH)? I am pretty sure I have seen this error before. Please revise the forums to see if you find something.

    Also, you might want to check the architecture you are building? Is it 64bit? 32bit? You could build fuzzylite yourself and check if the error persists.

    Please, let me know if you find a solution.



    Hi Juan,
    I have the same problem than PhiPi.
    I set correctly the environment variables to the location of the .dll.
    I set in the linker (in VS2008) the libraries.
    I’m working with a win32 configuration.
    Do you know what can cause this error?
    Thank you very much and best regards.



    thanks for your post.

    I think the problem is that you need to recompile the fuzzylite binaries. The binaries available at http://www.fuzzylite.com/downloads were compiled with VS2010 in Windows XP. You can find information compiling fuzzylite at http://www.fuzzylite.com/cpp. You will need CMake in addition to VS2008.

    I am quite interested in following up your progress compiling fuzzylite in VS2008. Please, let me know what steps you need to take in order to do so, and do not hesitate to post in the forums for help.



    Hi Juan,
    Thank you very much for your support.
    I try to recompile the binary files using build.bat, but on the debug and realese folders nothing appears, only CMake files, but not the bin folder.
    Do you know what may be happening?
    Is there any other way to recompile the libraries?
    Thank you very much and best regards



    please do the following:

    (0) make sure you enter the console from the VS2008 terminal. There should be a console inside the VS2008 program folder in your Windows Start Menu.
    (1) go to the fuzzylite folder and run build.bat clean
    (2) delete everything that looks like cmake derived files, except for CMakeLists.txt
    (3) run build.bat release >> fuzzylite.log
    (4) check whether the bin folder and its contents were created inside the release folder
    (5) if not, please post the output of your fuzzylite.log file



    Hi Juan,
    Thank you very much.
    I’m still having the same problems.
    I was able to compile the library using the procedure that you sent me, and the compilation was successful. The correct files where generated in the bin folder.
    In order to test, to see if I’m using the library correctly, I made a test program in VS2008 very similar to the examples found in the fuzzylite folder. I can generate the solution without problems, but when I try to test the program by debugging, I have that std::bad_alloc error in the engine construction.
    I also installed VS2010, and try to generate the solution using the original library (the downloaded from the website), but I’m having exactly the same error.
    I also try to performed the same procedure to compile the fuzzylite library but in this case with VS2010. This was unsuccessful. Below the output of the log file.
    The dll is well defined in the system path. I’m including the library and the Headers.h in the solution, I don’t know what I’m doing wrong.
    Thank you very much and best regards.

    STARTING: release
    — The CXX compiler identification is MSVC 16.0.30319.1
    — Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe
    — Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe — broken
    — Configuring incomplete, errors occurred!



    sorry for the delay.

    Your problem is with the installation of Visual Studio. You should try to reinstall it.


Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.