Crash when activating collisions after cell change

Everything about development and the OpenMW source code.
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Crash when activating collisions after cell change

Post by gus » 29 Jan 2012, 11:32

I noticed that every time you change cell and the try to activate collisions, you get a crash.

User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Crash when activating collisions after cell change

Post by Zini » 29 Jan 2012, 11:41

Confirmed. Another regression, probably from the mwrender refactoring :(

jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Crash when activating collisions after cell change

Post by jhooks1 » 29 Jan 2012, 21:18

It is npc and creature physics that is causing this, if you comment out insertObject() for them it works. Don't know how to fix this yet.

jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Crash when activating collisions after cell change

Post by jhooks1 » 29 Jan 2012, 23:52

Got this sort of fixed with my latest commit. You can switch cells and then turn on collision and it will work. If you already have collision turned on though and try to change cells it crashes.

User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Crash when activating collisions after cell change

Post by Zini » 30 Jan 2012, 00:10

Sorry, no. Please revert your last commit. You are potentially breaking the entire world model and definitely parts of the game mechancis. Anyway, working around the problem like this won't do us any good. We need to analyse what exactly the problem is and then properly fix it.

jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Crash when activating collisions after cell change

Post by jhooks1 » 30 Jan 2012, 00:14

Well I just made another commit and it works correctly now, even if collision is already on.

User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Crash when activating collisions after cell change

Post by Zini » 30 Jan 2012, 00:46

Revert please. This may make the physics work, but it breaks other stuff. It is also the wrong way to address the problem.

jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Crash when activating collisions after cell change

Post by jhooks1 » 30 Jan 2012, 01:28

OK

User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Crash when activating collisions after cell change

Post by Zini » 30 Jan 2012, 11:05

Thanks. Sorry for shooting you down like this, but this particular change would have caused countless problems further down the line.

User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Crash when activating collisions after cell change

Post by Zini » 03 Feb 2012, 13:27

I have been reviewing the code in World, Scene, the class hierarchy and the mwrender subsystem for about an hour now without being able to find a flaw in the logic or the implementation. Well, the enable/disable implementation is a bit odd (see tracker), but that does not touch physics at all.

That could mean that the bug is actually in the physics implementation. Or it could mean that I haven' looked hard enough.

I will continue searching for the problem over the next couple of days, but it would be helpful if in parallel an investigation could be done inside the physics system.

Post Reply