I compiled the release package (1.2.1) on MS vs 9, linking against boost. After a few hiccups in the build process (missing <windows.h>, had to put a few #define STXXL_BOOST_blahs) I was able to build exe's based upon stxxl.
However I get a run-time crash upon startup for even a simple program, with the following error:
I have also been trying use stxxl built with mscv2009. As with the original poster, I can compile the library, but my applications using it crash at runtime.
Currently, I'm just trying to get the code example of a few posts ago running. I'm not very familiar with nmake, but I commented out the necessary lines and built the debug version of the library. For the code example of a few post ago (with the STXXL_BOOST_* defines defined in the compiler command line as suggested) the application fails.
The logfile reads:
[STXXL-MSG] STXXL v1.2.1 + Boost 103800
[STXXL-MSG] 1 disks are allocated, total space: 70000 MB
and the error prompt that shows up is just the normal "the application runtime has terminated in an unusual way" or something like that.
Are there any other tricks for getting this to work or am I just missing something?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, I don't think the crash callstack is the same. In fact, now that I go back and use the debugger, the example program on my computer is behaving differently if it can't find .stxxl.
If it can find .stxxl, then the program crashes very early on, but if it can't find .stxxl, it assumes the default disk configuration and crashes at the very end when it is doing cleanup.
(for debugger without .stxxl)
error message given:
Unhandled exception at 0x0010090c in Janppu.exe: 0xC0000005: Access violation writing location 0x000000a3.
call stack at crash:
Janppu.exe!stxxl::stats::~stats() + 0xc bytes C++
> Janppu.exe!stxxl::singleton<stxxl::stats,1>::destroy_instance() Line 63 + 0xb bytes C++
msvcr90d.dll!6da7bd05()
[Frames below may be incorrect and/or missing, no symbols loaded for msvcr90d.dll]
msvcr90d.dll!6da7b9e2()
Janppu.exe!__tmainCRTStartup() Line 599 C
Janppu.exe!mainCRTStartup() Line 403 C
kernel32.dll!7551e4a5()
ntdll.dll!771fcfed()
ntdll.dll!771fd1ff()
(for debugger with .stxxl)
error message given:
Unhandled exception at 0x754bf328 in Janppu.exe: Microsoft C++ exception: stxxl::io_error at memory location 0x0045f180..
call stack at crash:
> kernel32.dll!754bf328()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
kernel32.dll!754bf328()
msvcr90d.dll!63a4f8f2()
msvcr90d.dll!63a6ff17()
msvcr90d.dll!63a6ff0e()
msvcr90d.dll!63a6fb2f()
msvcr90d.dll!63a6fadc()
msvcr90d.dll!63a7b25b()
msvcr90d.dll!63a5d691()
Janppu.exe!mainCRTStartup() Line 403 C
kernel32.dll!7551e4a5()
ntdll.dll!771fcfed()
ntdll.dll!771fd1ff()
It may also be worth mentioning that the createdisks.exe I built doesn't work either (and I'm not sure how to get the debugger to run on it. . .). I have a version of it I built as release and one as debug. They both give an error message before doing anything.
For the debug version, the error message is: "This application has failed to start because MSVCP90D.dll was not found. Re-installing the application may fix this problem."
For the release version, the error message is: "Runtime Error! <createdisk.exe location> R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information."
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
how does your .stxxl look like? In your previous post I saw that you are creating a disk file with 70 GByte capacity. Do you actually have 70 GByte free on your disk? stxxl::io_error exception might be thrown due to the lack of space. The exact reason should be returned by the what() method of the exception objects. You can try to catch this exception and output the what() content in the runtime or look at it in the debugger.
I need to investigate the cleanup error.
Roman
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
aha, you are a wise one. That first error was indeed that I don't actually have 70 gigabytes on that drive. I corrected my ".stxxl" to a much smaller amount, and reran the debugger.
(for debugger with corrected .stxxl)
error message given:
Unhandled exception at 0x7661f328 in Janppu.exe: Microsoft C++ exception: stxxl::io_error at memory location 0x003bf580..
call stack at crash:
> kernel32.dll!7661f328()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
kernel32.dll!7661f328()
msvcr90d.dll!65c3f8f2()
msvcr90d.dll!65c5ff17()
msvcr90d.dll!65c5ff0e()
msvcr90d.dll!65c5fb2f()
msvcr90d.dll!65c5fadc()
msvcr90d.dll!65c6b25b()
msvcr90d.dll!65c4d691()
Janppu.exe!mainCRTStartup() Line 403 C
kernel32.dll!7667e4a5()
ntdll.dll!77d0cfed()
ntdll.dll!77d0d1ff()
the log file reads:
[STXXL-MSG] STXXL v1.2.1 + Boost 103800
[STXXL-MSG] 1 disks are allocated, total space: 1000 MB
This error is happening in the line "stxxl::vector<int> v;"
Now, I must admit, I have not read the documentation, and I am beginning to suspect my general ignorance is playing more of a part in these errors than I had hoped. Does createdisks.exe do anything more elaborate than to make a text file named ".stxxl"? I am wondering this since, as I mentioned in the previous post, I have never been able to actually run the createdisks.exe that I compiled.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay, so that means I should be focusing more on the fact that none of the creatediskes.exe that I compile run. I posted the runtime error messages it was giving me a few posts up. The runtime error one of them cites, R6034, leads me to <http://msdn.microsoft.com/en-us/library/ms235560%28VS.80%29.aspx>, but I'm not actually sure of how to correct that at all. . .
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1st, I'm not using nmake from the command line to compile it. I'm opening the project file, and telling that to compile.
2nd thing is that the compile errors related to windows.h not being included are still there, so I have to go and add some include statements in a few files until that goes away.
ufs_file_base.cpp
wincall_file.cpp
wfs_file_base.h
1. Clicking on build will just trigger nmake /nologo library_msvc and nmake /nologo tests_msvc (rebuild all) respectively. Nevertheless, please try manually it in the "Visual Studio Command Prompt".
2. I agree that windows.h should be included in these files. For our test setting, it is somehow not needed.
4. Have you checked that the manifest is there?
5. This was an answer to the original poster, but unfortunately placed by the forum system.
I will try with Boost 1.38 now, maybe that makes a difference.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
2. Things change with Boost 1.38. The additional includes have been committed to trunk now.
4. createdisks.exe runs fine for me. There is also a manifest called createdisks.exe.manifest. As far as I can see from the screeshot, you do not run the createdisks.exe from the STXXL utils directory. Please try that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
without recompiling and with running from the stxxl utils directory, createdisks.exe runs and works perfectly.
I apologize for not realizing that .manifest files aren't just chaff. . .
I haven't had a chance to return to seeing if the program I was originally testing using stxxl runs, but I'll post here again if I still run into problems with it.
thank you for your help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I compiled the release package (1.2.1) on MS vs 9, linking against boost. After a few hiccups in the build process (missing <windows.h>, had to put a few #define STXXL_BOOST_blahs) I was able to build exe's based upon stxxl.
However I get a run-time crash upon startup for even a simple program, with the following error:
Debug Assertion Failed:
Program: C:\code\test\Debug\test.exe
File: f:\dd\vctools\crt_bld|sellf_x86\crt\src\dbgdel.cpp
Line: 52
Expression: _Block_TYPE_IS_VALID(pHead->nBlockUse)
The stxxl intro shows up, but the stxxl disk file doesn't appear. This happens both in wincall and syscall modes for the .stxxl configuration file.
I have no idea how to debug this. Any insight that anyone can provide would be most helpful!
The program I used is:
#include <iostream>
#include <cstdlib>
#include <vector>
#define STXXL_BOOST_TIMESTAMP
#define STXXL_BOOST_THREADS
#define STXXL_BOOST_RANDOM
#define STXXL_BOOST_FILESYSTEM
#include <stxxl.h>
using std::cerr;
using std::endl;
int main()
{
stxxl::vector<int> v;
int i=1;
v.push_back(i);
cerr << i << endl;
}
post here the backtrace (call stack).
Sorry I don't really know what I am doing with VC++. I am normally a unix user. Here is what I could get from VS
> test.exe!stxxl::config::config() Line 859 C++
test.exe!stxxl::singleton<stxxl::config,1>::create_instance() Line 50 + 0x2b bytes C++
test.exe!stxxl::singleton<stxxl::config,1>::get_instance() Line 39 + 0x5 bytes C++
test.exe!stxxl::striping::striping() Line 951 + 0x5 bytes C++
test.exe!stxxl::RC::RC() Line 1024 + 0x4a bytes C++
test.exe!stxxl::vector<int,4,stxxl::lru_pager<8>,2097152,stxxl::RC,unsigned __int64>::vector<int,4,stxxl::lru_pager<8>,2097152,stxxl::RC,unsigned __int64>(unsigned __int64 n=0) Line 807 + 0x4a bytes C++
test.exe!main() Line 16 + 0xf bytes C++
test.exe!__tmainCRTStartup() Line 586 + 0x19 bytes C
test.exe!mainCRTStartup() Line 403 C
kernel32.dll!7c817077()
can you try to define the STXXL_BOOST_* defines in the compiler command line and not in the source file? Then recompile it.
(I'm not the original poster)
I have also been trying use stxxl built with mscv2009. As with the original poster, I can compile the library, but my applications using it crash at runtime.
Currently, I'm just trying to get the code example of a few posts ago running. I'm not very familiar with nmake, but I commented out the necessary lines and built the debug version of the library. For the code example of a few post ago (with the STXXL_BOOST_* defines defined in the compiler command line as suggested) the application fails.
The logfile reads:
[STXXL-MSG] STXXL v1.2.1 + Boost 103800
[STXXL-MSG] 1 disks are allocated, total space: 70000 MB
and the error prompt that shows up is just the normal "the application runtime has terminated in an unusual way" or something like that.
Are there any other tricks for getting this to work or am I just missing something?
Is your backtrace (crash callstack) also the same?
Roman
No, I don't think the crash callstack is the same. In fact, now that I go back and use the debugger, the example program on my computer is behaving differently if it can't find .stxxl.
If it can find .stxxl, then the program crashes very early on, but if it can't find .stxxl, it assumes the default disk configuration and crashes at the very end when it is doing cleanup.
(for debugger without .stxxl)
error message given:
Unhandled exception at 0x0010090c in Janppu.exe: 0xC0000005: Access violation writing location 0x000000a3.
call stack at crash:
Janppu.exe!stxxl::stats::~stats() + 0xc bytes C++
> Janppu.exe!stxxl::singleton<stxxl::stats,1>::destroy_instance() Line 63 + 0xb bytes C++
msvcr90d.dll!6da7bd05()
[Frames below may be incorrect and/or missing, no symbols loaded for msvcr90d.dll]
msvcr90d.dll!6da7b9e2()
Janppu.exe!__tmainCRTStartup() Line 599 C
Janppu.exe!mainCRTStartup() Line 403 C
kernel32.dll!7551e4a5()
ntdll.dll!771fcfed()
ntdll.dll!771fd1ff()
(for debugger with .stxxl)
error message given:
Unhandled exception at 0x754bf328 in Janppu.exe: Microsoft C++ exception: stxxl::io_error at memory location 0x0045f180..
call stack at crash:
> kernel32.dll!754bf328()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
kernel32.dll!754bf328()
msvcr90d.dll!63a4f8f2()
msvcr90d.dll!63a6ff17()
msvcr90d.dll!63a6ff0e()
msvcr90d.dll!63a6fb2f()
msvcr90d.dll!63a6fadc()
msvcr90d.dll!63a7b25b()
msvcr90d.dll!63a5d691()
Janppu.exe!mainCRTStartup() Line 403 C
kernel32.dll!7551e4a5()
ntdll.dll!771fcfed()
ntdll.dll!771fd1ff()
It may also be worth mentioning that the createdisks.exe I built doesn't work either (and I'm not sure how to get the debugger to run on it. . .). I have a version of it I built as release and one as debug. They both give an error message before doing anything.
For the debug version, the error message is: "This application has failed to start because MSVCP90D.dll was not found. Re-installing the application may fix this problem."
For the release version, the error message is: "Runtime Error! <createdisk.exe location> R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information."
Hi,
how does your .stxxl look like? In your previous post I saw that you are creating a disk file with 70 GByte capacity. Do you actually have 70 GByte free on your disk? stxxl::io_error exception might be thrown due to the lack of space. The exact reason should be returned by the what() method of the exception objects. You can try to catch this exception and output the what() content in the runtime or look at it in the debugger.
I need to investigate the cleanup error.
Roman
aha, you are a wise one. That first error was indeed that I don't actually have 70 gigabytes on that drive. I corrected my ".stxxl" to a much smaller amount, and reran the debugger.
(for debugger with corrected .stxxl)
error message given:
Unhandled exception at 0x7661f328 in Janppu.exe: Microsoft C++ exception: stxxl::io_error at memory location 0x003bf580..
call stack at crash:
> kernel32.dll!7661f328()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
kernel32.dll!7661f328()
msvcr90d.dll!65c3f8f2()
msvcr90d.dll!65c5ff17()
msvcr90d.dll!65c5ff0e()
msvcr90d.dll!65c5fb2f()
msvcr90d.dll!65c5fadc()
msvcr90d.dll!65c6b25b()
msvcr90d.dll!65c4d691()
Janppu.exe!mainCRTStartup() Line 403 C
kernel32.dll!7667e4a5()
ntdll.dll!77d0cfed()
ntdll.dll!77d0d1ff()
the log file reads:
[STXXL-MSG] STXXL v1.2.1 + Boost 103800
[STXXL-MSG] 1 disks are allocated, total space: 1000 MB
This error is happening in the line "stxxl::vector<int> v;"
Now, I must admit, I have not read the documentation, and I am beginning to suspect my general ignorance is playing more of a part in these errors than I had hoped. Does createdisks.exe do anything more elaborate than to make a text file named ".stxxl"? I am wondering this since, as I mentioned in the previous post, I have never been able to actually run the createdisks.exe that I compiled.
Hi,
createdisks (according to the documentation http://algo2.iti.uni-karlsruhe.de/dementiev/stxxl/tags/1.2.1/installation_linux_gcc.html :))) ) does not create .stxxl file. It create stxxl disk files by writing disk files (with zeros) up to the given on the command line capacity.
Roman
Okay, so that means I should be focusing more on the fact that none of the creatediskes.exe that I compile run. I posted the runtime error messages it was giving me a few posts up. The runtime error one of them cites, R6034, leads me to <http://msdn.microsoft.com/en-us/library/ms235560%28VS.80%29.aspx>, but I'm not actually sure of how to correct that at all. . .
Hi,
Please retry with stxxl from subversion trunk, not the 1.2.1 release. Eventually this problem is already fixed in SVN.
Andreas
I have rebuilt the project using the version from trunk. Both debug and release builds of createdisk still crash with run time error R6034.
Okay, let's try to figure this out, finally.
First, let's restrict ourselves to the command
utils\createdisks.exe 100 stxxl
after having built the programs using
nmake tests_msvc
on a fresh checkout. So far, I cannot reproduce the bug unter VS 8 and Windows Vista x64 with the trunk revision.
What about this R6034 issue? Was there a message box stating it? Or did you just find it on the web somewhere?
Johannes
Could it be this problem, i. e. mixing variants of the runtime library?
<http://www.codeguru.com/forum/showthread.php?t=43897>
mkay, fresh checkout, again.
1st, I'm not using nmake from the command line to compile it. I'm opening the project file, and telling that to compile.
2nd thing is that the compile errors related to windows.h not being included are still there, so I have to go and add some include statements in a few files until that goes away.
ufs_file_base.cpp
wincall_file.cpp
wfs_file_base.h
3rd, it compiles without errors now
4th, create disks still fails when I run it.
http://s872.photobucket.com/albums/ab287/Trazlo_Trevize/?action=view¤t=Capturea.png
http://s872.photobucket.com/albums/ab287/Trazlo_Trevize/?action=view¤t=Captureaa.png
as you can see, those are the two prompts I get. The first one mentions R6034. After the second one there's a generic prompt saying that the program is crashing, and then it quits.
5th, I don't know if it's a problem involving mixing versions, and am unsure of how to verify this.
1. Clicking on build will just trigger nmake /nologo library_msvc and nmake /nologo tests_msvc (rebuild all) respectively. Nevertheless, please try manually it in the "Visual Studio Command Prompt".
2. I agree that windows.h should be included in these files. For our test setting, it is somehow not needed.
4. Have you checked that the manifest is there?
5. This was an answer to the original poster, but unfortunately placed by the forum system.
I will try with Boost 1.38 now, maybe that makes a difference.
2. Things change with Boost 1.38. The additional includes have been committed to trunk now.
4. createdisks.exe runs fine for me. There is also a manifest called createdisks.exe.manifest. As far as I can see from the screeshot, you do not run the createdisks.exe from the STXXL utils directory. Please try that.
without recompiling and with running from the stxxl utils directory, createdisks.exe runs and works perfectly.
I apologize for not realizing that .manifest files aren't just chaff. . .
I haven't had a chance to return to seeing if the program I was originally testing using stxxl runs, but I'll post here again if I still run into problems with it.
thank you for your help