Opened 13 years ago

Closed 10 years ago

#2512 closed defect (obsolete)

physics crashes if you make a make a scribbly ball with the pen

Reported by: carrott Owned by: garycmartin
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Physics Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Dextrose
Bug Status: Unconfirmed


Physics 7 on dextrose os5dx2.

I was trying to draw a pendulum, using the pen start at the top of the screen and go straight down and into a big scribbly ball. If you do it right (happens about 2 times out of 3 for me), physics will segfault and dissappear.

See attached GDB session.

I've seen this in a number of builds but only just got round to reporting it properly.

Attachments (2)

gdb.txt (47.1 KB) - added by carrott 13 years ago.
gdb session attaching to physics before segfault
org.laptop.physics-2.log (1.9 KB) - added by dsd 13 years ago.

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by carrott

gdb session attaching to physics before segfault

comment:1 Changed 13 years ago by garycmartin

Box2D/Collision/b2PairManager.cpp:287 seems to be where things bend out of shape (thanks for the log), so seems upstream with Box2D is where a real fix is needed. Might just have to wrap our pen tool to some hard fixed upper number of points to try and avoid the crash. Should also check what the latest Box2D is in case there is already a fix, Physics seems to have v2.0.2b1 just now (should make sure we have ARM compatible blob in there as well while we're at it).

comment:2 Changed 13 years ago by carrott

Still an issue with Physics 8 on os508dx sugar 0.88.1

comment:3 Changed 13 years ago by dsd

Found another way to reproduce this. Testing physics-8 on OLPC 11.2.0 build 22 on XO-1.5.

Put the mouse cursor at the bottom left of the screen, click and hold the mouse button, and move the mouse to the top right of the screen. Still holding the mouse button, move back to bottom left, top right, bottom left, top right, for about 30 seconds, so that the shape you have drawn is like a big fat but complicated diagonal line. Release the mouse button. The activity will now crash. Will attach a log.

Changed 13 years ago by dsd

comment:4 Changed 13 years ago by garycmartin

Tried to nail this with a couple of tricks, but still no luck avoiding the segmentation fault. I tried adding a filter to the resolution of the recorded line so that data and overlap segments would be reduced; also limited the total number of points that can be drawn with any one continuous stroke. A scribbly ball of over 600 points almost always crashes, less than that and crashes are intermittent, I think depending on how much your scribble overlaps.

One stopgap is to make the Circle the first tool that is selected by default (circles are also the most efficient shape to simulate so give the fastest performance). How do folks feel about that UI change?

comment:5 Changed 10 years ago by walter

  • Resolution set to obsolete
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.