Unable to use self-compiled pbrt for rendering on Windows

Open
#465 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start with Render/rdrexecutor.py:125 and the logged pbrt.exe command, comparing direct execution with the FreeCAD rendering path. Reproduce the Windows failure and inspect the reported exit code and OverflowError. Done means identifying the cause and restoring successful rendering with a generated image.

Written by the indexing model from the issue text.

Description

A few days ago, I successfully compiled pbrt, and if I run it directly, it works well:

But if I try to use it to render in FreeCAD, it fails during testing:

The exit code is 3221225785.

If I ignore the test results and proceed directly to rendering, the opened image is blank, and there are no image files under the displayed path. The console errors are basically the same as testing:

00:51:54  [Render][Objstrings] STARTING OBJECTS EXPORT
00:51:54  [Render][Objstrings] 1 chunks: 0 heavy - 1 light (size: 1)
00:51:54  [Render][Objstrings] '_D_297_render#Body001': Exporting
00:51:54  [Render][Object] 'BodyForRender': Processing
00:51:54  [Render][Object] 'BodyForRender': 'Part::Feature' detected
00:51:54  [Render][Object] ''BodyForRender' ('_D_297_render#Body001')': Begin meshing
00:51:54  [Render][Object] ''BodyForRender' ('_D_297_render#Body001')': Autosmooth
00:51:54  [Render][Object] ''BodyForRender' ('_D_297_render#Body001')': Compute connected components (np)
00:51:54  [Render][Object] ''BodyForRender' ('_D_297_render#Body001')': Compute vertex normals (np)
00:51:54  [Render][Object] ''BodyForRender' ('_D_297_render#Body001')': End meshing (0.1295325756072998s)
00:51:54  [Render][Material] ''_D_297_render#Body001' <None>': Fallback to default material
00:51:54  [Render][Object] ''BodyForRender' ('_D_297_render#Body001')': Write mesh file
00:51:54  [Render][Objstrings] ENDING OBJECTS EXPORT - TIME: 0.15353798866271973
00:51:54  Starting rendering...
"D:/Cloud/Github/pbrt-v4/build/pbrt.exe"  --outfile "D:\Cloud\App\FreeCAD\Config\temp\FreeCAD_Doc_8326dd1b-ffbf-4b30-9abd-a87aa7d11348_82a4d4_577723\Project_output.png"  --spp 128  "D:\Cloud\App\FreeCAD\Config\temp\FreeCAD_Doc_8326dd1b-ffbf-4b30-9abd-a87aa7d11348_82a4d4_577723\Project.pbrt"
00:51:54  Exiting rendering - Return code: 3221225785
00:51:54  D:\Cloud\App\FreeCAD\Config\Mod\Render\.\Render\rdrexecutor.py:125: RuntimeWarning: libshiboken: Overflow: Value 3221225785 exceeds limits of type  [signed] "int" (4bytes).
  self.finished.emit(rcode)
00:51:54  OverflowError

Any ideas?

Dominant language
Python
Stars
240
Forks
47
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from FreeCAD/FreeCAD-render

All issues in FreeCAD/FreeCAD-render

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.