Giter Site home page Giter Site logo

cornell works, but... about pt HOT 1 CLOSED

xyproto avatar xyproto commented on July 22, 2024
cornell works, but...

from pt.

Comments (1)

fogleman avatar fogleman commented on July 22, 2024

I use "go run examples/gopher.go"

It's looking for relative path "examples/gopher.obj", not "gopher.obj"

On Mon, Feb 16, 2015 at 7:34 AM, Alexander F Rødseth <
[email protected]> wrote:

Hi,

When trying the examples, the cornell box works fine:

...t/pt/examples% ./cornell
Building k-d tree (8 shapes)... OK

[Iteration 1 of 10]
512 x 512 pixels, 1 x 16 = 16 samples, 4 bounces, 2 cores
44 / 512 ( 8%) [=== ] 0:00:02 1.0M ^C%

However, the cube fails:

...t/pt/examples% ./cube
Loading STL (Binary): examples/cube.stl
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x44183c]

goroutine 1 [running]:github.com/fogleman/pt/pt.(*Mesh).FitInside(0x0, 0x0, 0x0, 0x0, 0x3ff0000000000000, 0x3ff0000000000000, 0x3ff0000000000000, 0x3fe0000000000000, 0x3fe0000000000000, 0x3fe0000000000000)
/home/alexander/go/src/github.com/fogleman/pt/pt/mesh.go:105 +0x82c
main.createMesh(0x3fa473f4a209de04, 0x3fb943b1fbe850e5, 0x3fc28e725522c76e, 0x0, 0x0, 0x0, 0x3ff0000000000000, 0x0, 0x0, 0x3ff8000000000000, ...)
/home/alexander/checkout/pt/examples/cube.go:11 +0x16c
main.main()
/home/alexander/checkout/pt/examples/cube.go:18 +0x18e

goroutine 2 [runnable]:
runtime.forcegchelper()
/usr/lib/go/src/runtime/proc.go:90
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 3 [runnable]:
runtime.bgsweep()
/usr/lib/go/src/runtime/mgc0.go:82
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 4 [runnable]:
runtime.runfinq()
/usr/lib/go/src/runtime/malloc.go:712
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

So does the gopher:

2...t/pt/examples% ./gopher
Loading OBJ: examples/gopher.obj
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x43fb9b]

goroutine 1 [running]:github.com/fogleman/pt/pt.(*Mesh).SmoothNormals(0x0)
/home/alexander/go/src/github.com/fogleman/pt/pt/mesh.go:84 +0x98b
main.main()
/home/alexander/checkout/pt/examples/gopher.go:13 +0xa4e

goroutine 2 [runnable]:
runtime.forcegchelper()
/usr/lib/go/src/runtime/proc.go:90
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 3 [runnable]:
runtime.bgsweep()
/usr/lib/go/src/runtime/mgc0.go:82
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 4 [runnable]:
runtime.runfinq()
/usr/lib/go/src/runtime/malloc.go:712
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

And the cylinder:

...t/pt/examples% ./cylinder
Loading STL (Binary): examples/cylinder.stl
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x44018c]

goroutine 1 [running]:github.com/fogleman/pt/pt.(*Mesh).FitInside(0x0, 0xbfb999999999999a, 0xbfb999999999999a, 0x0, 0x3ff199999999999a, 0x3ff199999999999a, 0x4059000000000000, 0x3fe0000000000000, 0x3fe0000000000000, 0x0)
/home/alexander/go/src/github.com/fogleman/pt/pt/mesh.go:105 +0x82c
main.createMesh(0x3fc633401672b92a, 0x0, 0x3fadcab5b09790d5, 0x0, 0x0, 0x0, 0x3ff0000000000000, 0x0, 0x0, 0x3ff999999999999a, ...)
/home/alexander/checkout/pt/examples/cylinder.go:7 +0x16c
main.main()
/home/alexander/checkout/pt/examples/cylinder.go:15 +0x18e

goroutine 2 [runnable]:
runtime.forcegchelper()
/usr/lib/go/src/runtime/proc.go:90
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 3 [runnable]:
runtime.bgsweep()
/usr/lib/go/src/runtime/mgc0.go:82
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 4 [runnable]:
runtime.runfinq()
/usr/lib/go/src/runtime/malloc.go:712
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

This is on 64-bit Arch Linux, kernel 3.18.6, go 1.4.1.

Wonderful project, btw!

Best regards,
Alexander F Rødseth


Reply to this email directly or view it on GitHub
#9.

from pt.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.