Starter projected unhandled exception with tbbmalloc.dll

61 views
Skip to first unread message

Yetoo Happy

unread,
Sep 28, 2020, 10:11:06 AM9/28/20
to G3D Users
I started trying to build the starter project but ran into unhandled exception errors. I learned that those were caused by the libraries having AVX be set to the enhanced instruction set used. After much troubleshooting I set enhanced instruction set in all the g3d projects to be built to "Not Set" in debug and release mode including the starter project. Even then, I still get an unhandled exception error, albeit instead of the core libraries it's in the external tbb header. This is the full text of the exception (I renamed the starter project to wasteland):
Unhandled exception at 0x00007FFC345D5183 (tbbmalloc.dll) in wastelandd.exe: 0xC000001D: Illegal Instruction.

It breaks at line 1144 of task.h in C:\g3d\G3D10\external\tbb\include\tbb\task.h

I verified that the tbb and tbbmalloc projects had Enhanced Instruction Set to "Not Set".

Any input on this issue would be appreciated.

Callstack:
  tbbmalloc.dll!rml::internal::MemoryPool::getEmptyBlock(unsigned __int64) C++
  tbbmalloc.dll!rml::internal::TLSKey::createTLS(class rml::internal::MemoryPool *,class rml::internal::Backend *) C++
  tbbmalloc.dll!rml::internal::ExtMemoryPool::init(__int64,void * (*)(__int64,unsigned __int64 &),int (*)(__int64,void *,unsigned __int64),unsigned __int64,bool,bool) C++
  tbbmalloc.dll!rml::internal::Block::adjustPositionInBin(class rml::internal::Bin *) C++
  tbbmalloc.dll!scalable_aligned_malloc () C++
  tbb.dll!tbb::internal::NFS_Allocate(unsigned __int64,unsigned __int64,void *) C++
  tbb.dll!tbb::internal::market::global_market(bool,unsigned int,unsigned __int64) C++
  tbb.dll!tbb::internal::generic_scheduler::create_master(class tbb::internal::arena *) C++
  tbb.dll!tbb::internal::governor::init_scheduler_weak(void) C++
  tbb.dll!tbb::internal::allocate_root_with_context_proxy::allocate(unsigned __int64) C++
> wastelandd.exe!operator new(unsigned __int64 bytes, const tbb::internal::allocate_root_with_context_proxy & p) Line 1144 C++
  wastelandd.exe!tbb::interface9::internal::start_for<tbb::blocked_range<unsigned __int64>,void <lambda>(const tbb::blocked_range<unsigned __int64> &),tbb::auto_partitioner const>::run(const tbb::blocked_range<unsigned __int64> & range, const G3D::Array<G3D::ImageFormat const *,10>::=::__l2::void <lambda>(const tbb::blocked_range<unsigned __int64> &) & body, const tbb::auto_partitioner & partitioner) Line 91 C++
  wastelandd.exe!tbb::parallel_for<tbb::blocked_range<unsigned __int64>,void <lambda>(const tbb::blocked_range<unsigned __int64> &)>(const tbb::blocked_range<unsigned __int64> & range, const G3D::Array<G3D::ImageFormat const *,10>::=::__l2::void <lambda>(const tbb::blocked_range<unsigned __int64> &) & body) Line 202 C++
  wastelandd.exe!G3D::Array<G3D::ImageFormat const *,10>::operator=(const G3D::Array<G3D::ImageFormat const *,10> & other) Line 206 C++
  [External Code]
  wastelandd.exe!G3D::GApp::Settings::Settings(int argc, const char * * argv) Line 81 C++
  wastelandd.exe!main(int argc, const char * * argv) Line 10 C++
  wastelandd.exe!G3D_WinMain(HINSTANCE__ * hInst, HINSTANCE__ * hPrev, char * szCmdLine, int sw) Line 155 C++
  wastelandd.exe!WinMain(HINSTANCE__ * hInst, HINSTANCE__ * hPrev, char * szCmdLine, int sw) Line 5 C++
  [External Code]

Contents of log.txt:
Application Log
Start: Sun Sep 27 20:21:10 2020

WARNING: AudioDevice is not enabled. Set G3DSpecification::audio = true before invoking initGLG3D() to enable audio.

Corey Taylor

unread,
Sep 28, 2020, 10:30:18 AM9/28/20
to g3d-...@googlegroups.com
If your CPU does not support AVX1 instruction set then it is quite old. You will have to change the instruction set for each library type in the G3D solution. This is easier to do by changing the shared .props files. You can find them through the Property Manager. You will see files like 'g3d-library-release' and 'external-library-release'.

I don't know if the pre-compiled wave.lib is built with AVX1 instruction set. If it is, might not be able to use G3D.

corey

--
You received this message because you are subscribed to the Google Groups "G3D Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to g3d-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/g3d-users/3381cb0b-ec98-43be-ba66-3708a15866e8n%40googlegroups.com.

Yetoo Happy

unread,
Sep 28, 2020, 11:40:00 AM9/28/20
to G3D Users
Like I said, I did that and I still got the unhandled error. What I ended up doing is changing the active mode to release as I think some packages, including tbb/tbbmalloc, weren't being built due to being release instead of debug or some configuration that disallowed something to that extent. Now, I'm able to compile the starter project and able to get a window, but I get a message box saying assertion failure with the following text:
GL_INVALID_OPERATION


Expression: false
C:\g3d\G3D10\G3D-gfx.lib\source\RenderDevice.cpp:590

If I click debug it breaks at a debugAssertGLOk(); on line 590 in RenderDevice.cpp. If I run the compiled executable in the debug folder, I get a message box saying assertion failure with the following text:
Could not locate icon 'icon.png'

Expression: FileSystem::exists(imageFileName)
C:\g3d\G3D10\G3D-gfx.lib\source\GLFWWindow.cpp:952

Last Error (0x0000007F): T

The following is the log.txt from the data-files folder after I run the program the debug folder:
Application Log
Start: Mon Sep 28 07:57:04 2020

WARNING: AudioDevice is not enabled. Set G3DSpecification::audio = true before invoking initGLG3D() to enable audio.
Initializing System::findDataFile took 0.006533s

Entering GApp::GApp()
cwd = C:\G3DProjects\wasteland\starter\x64\Debug
System::setAppDataDir("C:\G3DProjects\wasteland\starter\x64\Debug")
System::setAppDataDirs()Initializing System::findDataFile took 0.004921s

**************************

Assertion Failure - wastelandd.exe
Could not locate icon `icon.png'



Expression: FileSystem::exists(imageFileName)

C:\g3d\G3D10\G3D-gfx.lib\source\GLFWWindow.cpp:952



Last Error (0x0000007F): T

The following is the log.txt in data-files after I run from the debugger:
Application Log
Start: Mon Sep 28 07:58:52 2020

WARNING: AudioDevice is not enabled. Set G3DSpecification::audio = true before invoking initGLG3D() to enable audio.
Initializing System::findDataFile took 0.008290s

Entering GApp::GApp()
cwd = C:\G3DProjects\wasteland\starter\data-files
System::setAppDataDir("C:\G3DProjects\wasteland\starter\data-files")
System::setAppDataDirs()Initializing System::findDataFile took 0.003936s
Setting video mode
wglSwapIntervalEXT(0);
Setting initial rendering state.

**************************

Assertion Failure - wastelandd.exe
GL_INVALID_OPERATION




Expression: false

C:\g3d\G3D10\G3D-gfx.lib\source\RenderDevice.cpp:590

I don't know why it can't locate icon.png because C:\G3DProjects\wasteland\starter\data-files exists and that file is located in it.

Yetoo Happy

unread,
Sep 28, 2020, 11:40:00 AM9/28/20
to G3D Users
Also, here's the call stack from debugger:
  KernelBase.dll!00007fff3c599212() Unknown
> wastelandd.exe!G3D::RenderDevice::resetState() Line 590 C++
  wastelandd.exe!G3D::RenderDevice::setVideoMode() Line 375 C++
  wastelandd.exe!G3D::RenderDevice::init(G3D::OSWindow * window) Line 194 C++
  wastelandd.exe!G3D::RenderDevice::init(const G3D::OSWindow::Settings & _settings) Line 142 C++
  wastelandd.exe!G3D::GApp::initializeOpenGL(G3D::RenderDevice * rd, G3D::OSWindow * window, bool createWindowIfNull, const G3D::GApp::Settings & settings) Line 307 C++
  wastelandd.exe!G3D::GApp::GApp(const G3D::GApp::Settings & settings, G3D::OSWindow * window, G3D::RenderDevice * rd, bool createWindowIfNull) Line 529 C++
  wastelandd.exe!App::App(const G3D::GApp::Settings & settings) Line 64 C++
  wastelandd.exe!main(int argc, const char * * argv) Line 60 C++
  wastelandd.exe!G3D_WinMain(HINSTANCE__ * hInst, HINSTANCE__ * hPrev, char * szCmdLine, int sw) Line 155 C++
  wastelandd.exe!WinMain(HINSTANCE__ * hInst, HINSTANCE__ * hPrev, char * szCmdLine, int sw) Line 5 C++
  [External Code]
On Monday, September 28, 2020 at 7:30:18 AM UTC-7 corey.t...@gmail.com wrote:

Yetoo Happy

unread,
Sep 28, 2020, 11:41:49 AM9/28/20
to G3D Users
Also, just to clarify I changed the enhanced instruction setting by selecting all the projects that had the same setting structure in the property manager and then mass apply the changed setting that way. But it looks like those property sheets didn't get the setting applied. I'll change the setting there and get back with what happens.

On Monday, September 28, 2020 at 7:30:18 AM UTC-7 corey.t...@gmail.com wrote:

Yetoo Happy

unread,
Sep 28, 2020, 12:17:13 PM9/28/20
to G3D Users
After I changed AVX to Not Set in all the applicable property sheets I then cleaned the solution and built via command line with buildg3d
local and I still get the same error at the same place after the window opens.
On Monday, September 28, 2020 at 7:30:18 AM UTC-7 corey.t...@gmail.com wrote:

Corey Taylor

unread,
Sep 28, 2020, 1:26:07 PM9/28/20
to g3d-...@googlegroups.com
It sounds like your working directory is not set to starter/data-files.

corey

Yetoo Happy

unread,
Sep 28, 2020, 1:47:18 PM9/28/20
to G3D Users
It seems it could not find icon.png because it didn't know where were data-files was located because it was ran outside of visual studio. That leaves the error messages and logs from the program started in Visual Studio. I made a new copy of the starter project at a different location and assigned the developer-build-paths.prop and I get the same error, but just in case here's the contents of log.txt:
Application Log
Start: Mon Sep 28 10:39:07 2020

WARNING: AudioDevice is not enabled. Set G3DSpecification::audio = true before invoking initGLG3D() to enable audio.
Initializing System::findDataFile took 0.008747s

Entering GApp::GApp()
cwd = C:\G3DProjects\starter\data-files
System::setAppDataDir("C:\G3DProjects\starter\data-files")
System::setAppDataDirs()Initializing System::findDataFile took 0.003962s
Setting video mode
wglSwapIntervalEXT(0);
Setting initial rendering state.

**************************

Assertion Failure - starterd.exe
GL_INVALID_OPERATION




Expression: false

C:\g3d\G3D10\G3D-gfx.lib\source\RenderDevice.cpp:590

Reply all
Reply to author
Forward
0 new messages