Unable to trace pbrt in Debug mode

33 views
Skip to first unread message

Luca Bicego

unread,
Nov 20, 2020, 11:47:47 AM11/20/20
to pbrt
Hi,
i'm new on PBRT but i would like to understand how it works. I bought the book 'Physically Based Rendering' and then i downloaded the source code of pbrt from a git repository.
Using Visual Sutio 2017 i was able to compile all the projects of pbrt.

If i run 
pbrt killeroo-simple.pbrt 
from a consolle everything goes well and after a while a get killeroo-simple.exr

I have some problems when i try to debug pbrt-exe. If i start to execute pbrt in Windows x64 after a while i get an exception due to shlwapi.dll

If i trace the code i discover that i get an exception in the following function (parser.cpp)

template <typename Next, typename Unget>
ParamSet parseParams(Next nextToken, Unget ungetToken, MemoryArena &arena,
                     SpectrumType spectrumType) 

It seams that when the parser tryes to get the integer indices from loopsubdiv from geometry\killeroo.pbrt for some reason in the following loop i have an excepion:

      if (val == "[") 
     {
                while (true)
                {
                   val = nextToken(TokenRequired);
                   if (val == "]") 
      break;
                    addVal(val);
               }
else 
{
                   addVal(val);
                }
               AddParam(ps, item, spectrumType);
               arena.Reset();
    }   

I don't understand why i'm having such a problem.
I'm running the debugger with this args:

--nthreads=1 "C:\Luca Bicego\PBRT\pbrt-v3\scenes\killeroo-simple.pbrt"

Do you have any idea on how i can solve this problem ?
Thanks.

Luca Bicego
Reply all
Reply to author
Forward
0 new messages