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

<Collide> causes a segmentation fault if the group has Lines inside of it #1515

Closed
Wizzerinus opened this issue Jul 6, 2023 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@Wizzerinus
Copy link

Description

Using a object inside a group with in any mode causes a segmentation fault when pview, egg2bam etc. is run. This happens even if the collide mode does not need to look at the line (i.e. Plane type is used)

Steps to Reproduce

  • Create an egg file like this:
<CoordinateSystem> { Z-Up }

<VertexPool> Scene {
  <Vertex> 0 {
    1 0 0
  }
  <Vertex> 1 {
    0 1 0
  }
  <Vertex> 2 {
    1 1 1
  }
  <Vertex> 3 {
    0 0 1
  }
}
<Group> test {
  <Collide> test { Plane descend }
  <Group> inside {
    <Polygon> {
      <VertexRef> { 0 1 3 <Ref> { Scene } }
    }
    <Line> {
      <VertexRef> { 1 2 <Ref> { Scene } }
    }
  }
}
  • Save as file.egg
  • Run pview file.egg

If <Line> or <Collide> is removed everything works, having both causes a segmentation fault

Environment

  • Operating system: Linux
  • System architecture: 64x
  • Panda3D version: 1.10.12 (just tested, 1.10.13 also has this issue)
  • Installation method: pip
  • Python version (if using Python): 3.11.3
@rdb rdb added this to the 1.10.14 milestone Jul 19, 2023
@rdb rdb added the bug label Jul 19, 2023
@rdb rdb self-assigned this Jul 19, 2023
@Wizzerinus
Copy link
Author

Btw: I do not know if non-polygon objects also have this problem. It seems that the other two egg nodes that can exist in a group are Patch and PointLight (and theres that one technical type that should not be in an egg), but I don't know how theyre used, nor if they're common, and nor if they crash.

@rdb
Copy link
Member

rdb commented Jul 19, 2023

It's composite primitives that can't be triangulated, which is just lines - the egg loader enters an infinite loop trying to "triangulate" the lines.

@rdb rdb closed this as completed in 787e14f Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants