Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assigned interior causes a bad allocation error #465

Open
CousinRicky opened this issue Nov 23, 2024 · 0 comments
Open

Assigned interior causes a bad allocation error #465

CousinRicky opened this issue Nov 23, 2024 · 0 comments
Labels
bug? reported as bug; triage pending

Comments

@CousinRicky
Copy link

Summary

Declaring an interior, and then assigning it to another variable causes POV-Ray to halt with a bad allocation error.

POV-Ray Version

  • Incarnation: POV-Ray for Unix
  • Affected build version: 3.8.0-beta.2.unofficial (self-compiled)
  • Known working build version: 3.7.0.10

Runtime Environment

  • Operating system: openSUSE 15.3 GNU/Linux
  • Hardware: Lenovo Ideapad Slim 7
  • Hardware architecture: x86-64
  • CPU model: Intel Core i7

Scene

#version max (3.5, min (3.8, version));
global_settings { assumed_gamma 1 }
#declare Int = interior { ior 1.5 }
#declare myInt = Int

Expected Behavior

Scene renders to completion. (This minimal scene has no objects.)

Actual Behavior

The render halts during the parsing phase.

Output

==== [Parsing...] ==========================================================
File 'tmp.pov' line 4: Parse Error: std::bad_alloc
Fatal error in parser: Cannot parse input.
Render failed

Additional context

This bug was first reported in povray.beta-test: Assigning an interior crashes 3.8 beta 2.

Workaround

Wrapping the right-hand identifier with an interior block avoids the crash. In the example, replace line 4 with #declare myInt = interior { Int }

Suggested Solution

See wfpokorny’s analysis in the p.beta-test thread.

@CousinRicky CousinRicky added the bug? reported as bug; triage pending label Nov 23, 2024
@CousinRicky CousinRicky changed the title [BUG] Assigned interior causes a bad allocation error Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? reported as bug; triage pending
Projects
None yet
Development

No branches or pull requests

1 participant