google / gapid

Graphics API Debugger
https://gapid.dev
Apache License 2.0
2.21k stars 328 forks source link

Gapis server exited with error code of 2 - out of bounds? #645

Closed amagiyusuke closed 7 years ago

amagiyusuke commented 7 years ago

The gapis server has exited with error code of: 2 Platform: OSX 10.12.5

panic: uint8(0@34)[284].Slice(18446744071856277632, 18446744071856277916) - out of bounds panic: BeginAtom called while already building an atom goroutine 26 [running]: github.com/google/gapid/gapis/replay/builder.(Builder).BeginAtom(0xc420254480, 0x4000000000000076) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/replay/builder/builder.go:210 +0x1f9 github.com/google/gapid/gapis/replay.(adapter).MutateAndWrite(0xc4210b82f0, 0x6b7afc0, 0xc4210cf920, 0x4000000000000076, 0x6b7ec20, 0xc42226fc60) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/replay/batch.go:189 +0x51 github.com/google/gapid/gapis/gfxapi/gles.(destroyResourcesAtEOS).Transform(0x6c66de8, 0x6b7afc0, 0xc4210cf920, 0x4000000000000076, 0x6b7ec20, 0xc42226fc60, 0x6b592c0, 0xc4210b82f0) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/gfxapi/gles/replay.go:252 +0x63 github.com/google/gapid/gapis/atom/transform.TransformWriter.MutateAndWrite(0xc422b296e0, 0x6b58fc0, 0x6c66de8, 0x6b592c0, 0xc4210b82f0, 0x6b7afc0, 0xc4210cf920, 0x4000000000000076, 0x6b7ec20, 0xc42226fc60) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/atom/transform/transforms.go:98 +0x83 github.com/google/gapid/gapis/atom/transform.(TransformWriter).MutateAndWrite(0xc4210da2a0, 0x6b7afc0, 0xc4210cf920, 0x4000000000000076, 0x6b7ec20, 0xc42226fc60)

:8 +0xa1 github.com/google/gapid/gapis/gfxapi/gles.(*tweaker).doAndUndo.func1() /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/gfxapi/gles/tweaker.go:54 +0x5f github.com/google/gapid/gapis/gfxapi/gles.(*tweaker).revert(0xc420a2e550) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/gfxapi/gles/tweaker.go:46 +0x4d panic(0x5737ea0, 0xc4220ec570) /usr/local/go/src/runtime/panic.go:489 +0x2cf github.com/google/gapid/gapis/gfxapi/gles.U8ˢ.Slice(0x0, 0x0, 0x11c, 0xc400000022, 0xffffffff91894880, 0xffffffff9189499c, 0xc42044c960, 0xc420254480, 0x11c9189499c, 0x9189499c, ...) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/gfxapi/gles/api.go:22115 +0x1ec github.com/google/gapid/gapis/gfxapi/gles.subDrawElements(0x6b7afc0, 0xc4210cf920, 0x6b83000, 0xc4203e0540, 0xc42052a090, 0xc422b296e0, 0xc4203ca680, 0xc420254480, 0xc422afa300, 0x8e00000005, ...) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/gfxapi/gles/mutate.go:2240 +0x405 github.com/google/gapid/gapis/gfxapi/gles.(*GlDrawElements).Mutate(0xc4203e0540, 0x6b7afc0, 0xc4210cf920, 0xc422b296e0, 0xc420254480, 0x0, 0x3) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/gfxapi/gles/mutate.go:14416 +0x1df github.com/google/gapid/gapis/replay.(*adapter).MutateAndWrite(0xc4210b82f0, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/replay/batch.go:190 +0x9e github.com/google/gapid/gapis/gfxapi/gles.(*destroyResourcesAtEOS).Transform(0x6c66de8, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540, 0x6b592c0, 0xc4210b82f0) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/gfxapi/gles/replay.go:252 +0x63 github.com/google/gapid/gapis/atom/transform.TransformWriter.MutateAndWrite(0xc422b296e0, 0x6b58fc0, 0x6c66de8, 0x6b592c0, 0xc4210b82f0, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/atom/transform/transforms.go:98 +0x83 github.com/google/gapid/gapis/atom/transform.(*TransformWriter).MutateAndWrite(0xc4210da2a0, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540) :8 +0xa1 github.com/google/gapid/gapis/gfxapi/gles.compat.func4(0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540, 0x6b5b180, 0xc4210da2a0) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/gfxapi/gles/compat.go:1094 +0x67b github.com/google/gapid/gapis/atom/transform.transform.Transform(0x5b1965d, 0x6, 0xc4228e80a0, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540, 0x6b5b180, 0xc4210da2a0) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/atom/transform/transforms.go:75 +0x75 github.com/google/gapid/gapis/atom/transform.(*transform).Transform(0xc42271bb80, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540, 0x6b5b180, 0xc4210da2a0) :10 +0xb1 github.com/google/gapid/gapis/atom/transform.TransformWriter.MutateAndWrite(0xc422b296e0, 0x6b5b1c0, 0xc42271bb80, 0x6b5b180, 0xc4210da2a0, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/atom/transform/transforms.go:98 +0x83 github.com/google/gapid/gapis/atom/transform.(*TransformWriter).MutateAndWrite(0xc4210da2d0, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540) :8 +0xa1 github.com/google/gapid/gapis/gfxapi/gles.(*readFramebuffer).Transform(0xc422fc8278, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540, 0x6b5b180, 0xc4210da2d0) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/gfxapi/gles/read_framebuffer.go:46 +0x73 github.com/google/gapid/gapis/atom/transform.TransformWriter.MutateAndWrite(0xc422b296e0, 0x6b59040, 0xc422fc8278, 0x6b5b180, 0xc4210da2d0, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/atom/transform/transforms.go:98 +0x83 github.com/google/gapid/gapis/atom/transform.(*TransformWriter).MutateAndWrite(0xc4210da300, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540) :8 +0xa1 github.com/google/gapid/gapis/gfxapi/gles.undefinedFramebuffer.func1(0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540, 0x6b5b180, 0xc4210da300) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/gfxapi/gles/undefined_framebuffer.go:32 +0x9c github.com/google/gapid/gapis/atom/transform.transform.Transform(0x5b271cf, 0x10, 0xc42271a5e0, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540, 0x6b5b180, 0xc4210da300) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/atom/transform/transforms.go:75 +0x75 github.com/google/gapid/gapis/atom/transform.(*transform).Transform(0xc42271a600, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540, 0x6b5b180, 0xc4210da300) :10 +0xb1 github.com/google/gapid/gapis/atom/transform.TransformWriter.MutateAndWrite(0xc422b296e0, 0x6b5b1c0, 0xc42271a600, 0x6b5b180, 0xc4210da300, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/atom/transform/transforms.go:98 +0x83 github.com/google/gapid/gapis/atom/transform.(*TransformWriter).MutateAndWrite(0xc4210da330, 0x6b7afc0, 0xc4210cf920, 0x76, 0x6b83000, 0xc4203e0540) :8 +0xa1 github.com/google/gapid/gapis/gfxapi/gles.(*DeadCodeElimination).Flush(0xc42271a040, 0x6b7afc0, 0xc4210cf920, 0x6b5b180, 0xc4210da330) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/gfxapi/gles/dead_code_elimination.go:74 +0x14b github.com/google/gapid/gapis/atom/transform.Transforms.Transform(0xc42115c100, 0x5, 0x8, 0x6b7afc0, 0xc4210cf920, 0x0, 0x0, 0x0, 0x6b592c0, 0xc4210b82f0) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/atom/transform/transforms.go:44 +0x311 github.com/google/gapid/gapis/gfxapi/gles.api.Replay(0x6b7afc0, 0xc4210cf710, 0xc42288e288, 0xc42288e2d0, 0x5884be0, 0xc4212b1da0, 0xc4220a6a00, 0xd, 0xd, 0x6c080e0, ...) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/gfxapi/gles/replay.go:205 +0xb80 github.com/google/gapid/gapis/gfxapi/gles.(*api).Replay(0x6c66de8, 0x6b7afc0, 0xc4210cf710, 0xc42288e288, 0xc42288e2d0, 0x5884be0, 0xc4212b1da0, 0xc4220a6a00, 0xd, 0xd, ...) :3461 +0xfb github.com/google/gapid/gapis/replay.(*Manager).execute(0xc420369ec0, 0x6b7afc0, 0xc4210cf710, 0xa6500c2db89e731f, 0xf33181b65fb453ea, 0xa04369109dce7f73, 0x3ec65e4c8292e6e, 0xa6cb8026a1617f22, 0x5884be0, 0xc4212b1da0, ...) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/replay/batch.go:135 +0xa04 github.com/google/gapid/gapis/replay.(*Manager).batch(0xc420369ec0, 0x6b7afc0, 0xc4210cf4d0, 0xc4224e0b60, 0xd, 0xd, 0x589a440, 0xc4212b1f30, 0x59492e0, 0xc420240a50, ...) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/replay/batch.go:68 +0x514 github.com/google/gapid/gapis/replay.(*Manager).(github.com/google/gapid/gapis/replay.batch)-fm(0x6b7afc0, 0xc42031b7a0, 0xc4224e0b60, 0xd, 0xd, 0x589a440, 0xc4212b1f30, 0x59492e0, 0xc420240a50, 0x1) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/replay/manager.go:126 +0x93 github.com/google/gapid/gapis/replay/scheduler.(*bin).exec(0xc4212e2500, 0x6b7afc0, 0xc42031b7a0, 0xc420257fc0) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/replay/scheduler/scheduler.go:241 +0x2d8 github.com/google/gapid/gapis/replay/scheduler.(*Scheduler).run(0xc4203b29c0, 0x6b7afc0, 0xc42031b7a0) /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/replay/scheduler/scheduler.go:174 +0x469 created by github.com/google/gapid/gapis/replay/scheduler.New /Users/kazamitakehiro/go/src/github.com/google/gapid/gapis/replay/scheduler/scheduler.go:72 +0xd0
ben-clayton commented 7 years ago

Fixed by @dsrbecky with 08df5e55ffc920fa79104556406b25c895082d53