Terrain - crash on collision (breve 2.4b - Feb 26 version)

My main project now crashes when I try to use a terrain with custom height points. :( Also, a built in demo that does this crashes as well, Terrain-Wave.tz, under the Demos>Terrain-Demos menu.

It also crashes in any of these cases (but unlike the custom height, not on every run):
- If I use the regular fractal terrain (*) and later try to move the terrain with "floor move to (0.0,-2.0,0.0)." (where floor is a Terrain object).
- If I use the regular fractal terrain and later try to apply a custom texture

The crash is not always immediate, it seems to happen when the first object collides with the terrain. A default fractal terrain with a default texture and position works, but any changes to height points, texture or position causes a crash whenever a collision occurs.

Both my simulation and the Terrain-Wave.tz work as expected on the older version of breve I downloaded earlier this month (2.4b - Feb 12 version - OS X dmg)

(*) This is what I'm using:

floor = new Terrain.
floor generate with-ruggedness .4 with-height 15.

Terrain - crash on collision (breve 2.4b - Feb 26 version)

Here is the relevant part of the crash report:

OS Version:     10.4.5 (Build 8H14)
Report Version: 4

Command: breve
Path:    /Applications/breve.app/Contents/MacOS/breve
Parent:  WindowServer [57]

Version: breve version 2.3 (2.3)

PID:    520
Thread: 4

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000080

...

Thread 4 Crashed:
0   org.spiderland.breve      	0x0010ce30 slTerrainTestPair + 124 (peer.c:611)
1   org.spiderland.breve      	0x00071d58 slVclipData::clip(double, int, int) + 220 (error.c:73)
2   org.spiderland.breve      	0x0003e5d8 slWorld::runWorld(double, double, int*) + 68 (evaluation.c:1436)
3   org.spiderland.breve      	0x00093060 brIWorldStep(brEval*, brEval*, brInstance*) + 132 (breveFunctionsWorld.cc:192)
4   org.spiderland.breve      	0x0048656c stEvalCallFunc(stCCallExp*, stRunInstance*, brEval*) + 908 (evaluation.c:1735)
5   org.spiderland.breve      	0x0001e040 stExpEval3(stExp*, stRunInstance*, brEval*) + 84 (evaluation.c:2718)
6   org.spiderland.breve      	0x00486c98 stEvalAssignment(stAssignExp*, stRunInstance*, brEval*) + 56 (evaluation.c:1839)
7   org.spiderland.breve      	0x0001e040 stExpEval3(stExp*, stRunInstance*, brEval*) + 84 (evaluation.c:2718)
8   org.spiderland.breve      	0x00485e44 stEvalIf(stIfExp*, stRunInstance*, brEval*) + 276 (evaluation.c:1326)
9   org.spiderland.breve      	0x0001e040 stExpEval3(stExp*, stRunInstance*, brEval*) + 84 (evaluation.c:2718)
10  org.spiderland.breve      	0x00486e8c stEvalExpVector(std::vector<stExp*, std::allocator<stExp*> >*, stRunInstance*, brEval*) + 188 (evaluation.c:935)
11  org.spiderland.breve      	0x0001e530 stCallMethod(stRunInstance*, stRunInstance*, stMethod*, brEval**, int, brEval*) + 848 (evaluation.c:2579)
12  org.spiderland.breve      	0x004894c8 stRealEvalMethodCall(stMethodExp*, stRunInstance*, stRunInstance*, brEval*) + 2280 (evaluation.c:1218)
13  org.spiderland.breve      	0x00489800 stEvalMethodCall(stMethodExp*, stRunInstance*, brEval*) + 496 (evaluation.c:1020)
14  org.spiderland.breve      	0x0001e040 stExpEval3(stExp*, stRunInstance*, brEval*) + 84 (evaluation.c:2718)
15  org.spiderland.breve      	0x00486e8c stEvalExpVector(std::vector<stExp*, std::allocator<stExp*> >*, stRunInstance*, brEval*) + 188 (evaluation.c:935)
16  org.spiderland.breve      	0x0001e530 stCallMethod(stRunInstance*, stRunInstance*, stMethod*, brEval**, int, brEval*) + 848 (evaluation.c:2579)
17  org.spiderland.breve      	0x000293b8 stCallMethodBreveCallback(void*, void*, brEval**, brEval*) + 72 (evaluation.c:1436)
18  org.spiderland.breve      	0x00027e2c brEngineIterate + 508 (evaluation.c:1436)
19  org.spiderland.breve      	0x00013ab4 -[slBreveEngine runWorld:] + 404 (crt.c:355)
20  com.apple.Foundation      	0x928e73b4 forkThreadForFunction + 108
21  libSystem.B.dylib         	0x9002b1e0 _pthread_body + 96

Thread 4 crashed with PPC Thread State 64:

(breve's 2.4b version still says 2.3 on the Info.plist file, so it shows up as 2.3 in the crash report - this was the 2.4b from Feb 26, Mac OS X dmg)

Terrain - crash on collision (breve 2.4b - Feb 26 version)

The demo terrain.waves works on my machine...(feb 12 version)
IIRC, it now has a different texture, but for the rest seems identical...
I didn't change anything in the demo, not sure I got the gist of your message on that one correct, though.

Terrain - crash on collision (breve 2.4b - Feb 26 version)

Downloading feb 26 now, see if it'll make a difference...

Terrain - crash on collision (breve 2.4b - Feb 26 version)

Indeed, it crashes. After a short while. Console says: Signal 10 detected -- attempting steve stack trace:

Quote:breve engine tack trace:

0) TerrainWave (0x5652540) iterate (line 39 of "/Applications/breve/breve.app/Contents/Resources/demos/Terrain-Demos/TerrainWave.tz")

1) TerrainWave (0x5652540) iterate (line 560 of "Control.tz")

Terrain - crash on collision (breve 2.4b - Feb 26 version)

Thanks -- I've fixed the problem. I'm out of town right now and cannot update the beta, but I'll upload a new beta in the next day or two.

- jon

Terrain - crash on collision (breve 2.4b - Feb 26 version)

It's ok, I still have a copy of the older version so I'm using it in the meantime. Thanks!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.