Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Physics error "Pair not present" - TopDownRPG and Physics Sample #88

Closed
aurodev opened this issue Aug 9, 2018 · 7 comments
Closed

Physics error "Pair not present" - TopDownRPG and Physics Sample #88

aurodev opened this issue Aug 9, 2018 · 7 comments
Assignees

Comments

@aurodev
Copy link

@aurodev aurodev commented Aug 9, 2018

TopDownRPG crashes at runtime after upgrading in GameStudio v3.0.0.3 Dev build
Also occurs with a new 3.0.0.3 dev build generated sample.

Physics Sample displays the same "Pair not present" error
when switching screens after "Shoot the cubes"

System
OS/device including version:
Windows 8.1 64bit, 8GB AMD FX 6350 6 core

Graphics Chipset
AMD Radeon HD 7700 Series
Memory Size 1024 MB
Radeon Software Version 17.4.4


VS 2017 Debugger


System.Exception
HResult=0x80131500
Message=Pair not present.
Source=Xenko.Physics
StackTrace:
at Xenko.Physics.Simulation.ContactRemoval(ContactPoint contact, PhysicsComponent component0, PhysicsComponent component1) in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Physics\Simulation.cs:line 1077
at Xenko.Physics.Simulation.EndContactTesting() in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Physics\Simulation.cs:line 1214
at Xenko.Physics.Bullet2PhysicsSystem.Update(GameTime gameTime) in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Physics\Bullet2PhysicsSystem.cs:line 105
at Xenko.Games.GameSystemCollection.Update(GameTime gameTime) in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Games\GameSystemCollection.cs:line 98
at Xenko.Games.GameBase.Update(GameTime gameTime) in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Games\GameBase.cs:line 918
at Xenko.Games.GameBase.UpdateAndProfile(GameTime gameTime) in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Games\GameBase.cs:line 926
at Xenko.Games.GameBase.TickInternal() in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Games\GameBase.cs:line 677
at Xenko.Games.GameBase.Tick() in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Games\GameBase.cs:line 510
at Xenko.Games.GamePlatform.Tick() in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Games\GamePlatform.cs:line 173
at Xenko.Games.GamePlatform.OnRunCallback() in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Games\GamePlatform.cs:line 143
at Xenko.Games.GameWindowWinforms.<>c__DisplayClass19_0.b__0() in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Games\Desktop\GameWindow.Windows.Desktop.cs:line 196
at Xenko.Games.WindowsMessageLoop.Run(Control form, RenderCallback renderCallback, Boolean useApplicationDoEvents) in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Games\Desktop\WindowsMessageLoop.cs:line 226
at Xenko.Games.GameWindowWinforms.Run() in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Games\Desktop\GameWindow.Windows.Desktop.cs:line 188
at Xenko.Games.GamePlatform.Run(GameContext gameContext) in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Games\GamePlatform.cs:line 120
at Xenko.Games.GameBase.Run(GameContext gameContext) in C:\Users\Greg\Documents\Xenko\sources\engine\Xenko.Games\GameBase.cs:line 462
at TopDownRPG2.TopDownRPG2App.Main(String[] args) in C:\Users\Greg\Documents\XenkoProjects\TopDownRPG2\TopDownRPG2\TopDownRPG2.Windows\TopDownRPG2App.cs:line 11

Call Stack


Xenko.Games.dll!Xenko.Games.GameBase.TickInternal() Line 677 C#
Xenko.Games.dll!Xenko.Games.GameBase.Tick() Line 510 C#
Xenko.Games.dll!Xenko.Games.GamePlatform.Tick() Line 173 C#
Xenko.Games.dll!Xenko.Games.GamePlatform.OnRunCallback() Line 143 C#
Xenko.Games.dll!Xenko.Games.GameWindowWinforms.Run.AnonymousMethod__0() Line 196 C#
Xenko.Games.dll!Xenko.Games.WindowsMessageLoop.Run(System.Windows.Forms.Control form, Xenko.Games.WindowsMessageLoop.RenderCallback renderCallback, bool useApplicationDoEvents) Line 226 C#
Xenko.Games.dll!Xenko.Games.GameWindowWinforms.Run() Line 188 C#
Xenko.Games.dll!Xenko.Games.GamePlatform.Run(Xenko.Games.GameContext gameContext) Line 120 C#
Xenko.Games.dll!Xenko.Games.GameBase.Run(Xenko.Games.GameContext gameContext) Line 462 C#
TopDownRPG2.Windows.exe!TopDownRPG2.TopDownRPG2App.Main(string[] args) Line 11 C#


Runtime Crash


[Game]: Error: Unexpected exception. System.Exception: Pair not present.
at Xenko.Physics.Simulation.ContactRemoval(ContactPoint contact, PhysicsCompo
nent component0, PhysicsComponent component1) in C:\Users\Greg\Documents\Xenko\s
ources\engine\Xenko.Physics\Simulation.cs:line 1077
at Xenko.Physics.Simulation.EndContactTesting() in C:\Users\Greg\Documents\Xe
nko\sources\engine\Xenko.Physics\Simulation.cs:line 1214
at Xenko.Physics.Bullet2PhysicsSystem.Update(GameTime gameTime) in C:\Users\G
reg\Documents\Xenko\sources\engine\Xenko.Physics\Bullet2PhysicsSystem.cs:line 10
5
at Xenko.Games.GameSystemCollection.Update(GameTime gameTime) in C:\Users\Gre
g\Documents\Xenko\sources\engine\Xenko.Games\GameSystemCollection.cs:line 98
at Xenko.Games.GameBase.Update(GameTime gameTime) in C:\Users\Greg\Documents
Xenko\sources\engine\Xenko.Games\GameBase.cs:line 918
at Xenko.Games.GameBase.UpdateAndProfile(GameTime gameTime) in C:\Users\Greg
Documents\Xenko\sources\engine\Xenko.Games\GameBase.cs:line 926
at Xenko.Games.GameBase.TickInternal() in C:\Users\Greg\Documents\Xenko\sourc
es\engine\Xenko.Games\GameBase.cs:line 630
System.Exception: Pair not present.
at Xenko.Physics.Simulation.ContactRemoval(ContactPoint contact, PhysicsCompo
nent component0, PhysicsComponent component1) in C:\Users\Greg\Documents\Xenko\s
ources\engine\Xenko.Physics\Simulation.cs:line 1077
at Xenko.Physics.Simulation.EndContactTesting() in C:\Users\Greg\Documents\Xe
nko\sources\engine\Xenko.Physics\Simulation.cs:line 1214
at Xenko.Physics.Bullet2PhysicsSystem.Update(GameTime gameTime) in C:\Users\G
reg\Documents\Xenko\sources\engine\Xenko.Physics\Bullet2PhysicsSystem.cs:line 10
5
at Xenko.Games.GameSystemCollection.Update(GameTime gameTime) in C:\Users\Gre
g\Documents\Xenko\sources\engine\Xenko.Games\GameSystemCollection.cs:line 98
at Xenko.Games.GameBase.Update(GameTime gameTime) in C:\Users\Greg\Documents
Xenko\sources\engine\Xenko.Games\GameBase.cs:line 918
at Xenko.Games.GameBase.UpdateAndProfile(GameTime gameTime) in C:\Users\Greg
Documents\Xenko\sources\engine\Xenko.Games\GameBase.cs:line 926
at Xenko.Games.GameBase.TickInternal() in C:\Users\Greg\Documents\Xenko\sourc
es\engine\Xenko.Games\GameBase.cs:line 630

Unhandled Exception: System.Exception: Pair not present.
at Xenko.Physics.Simulation.ContactRemoval(ContactPoint contact, PhysicsCompo
nent component0, PhysicsComponent component1) in C:\Users\Greg\Documents\Xenko\s
ources\engine\Xenko.Physics\Simulation.cs:line 1077
at Xenko.Physics.Simulation.EndContactTesting() in C:\Users\Greg\Documents\Xe
nko\sources\engine\Xenko.Physics\Simulation.cs:line 1214
at Xenko.Physics.Bullet2PhysicsSystem.Update(GameTime gameTime) in C:\Users\G
reg\Documents\Xenko\sources\engine\Xenko.Physics\Bullet2PhysicsSystem.cs:line 10
5
at Xenko.Games.GameSystemCollection.Update(GameTime gameTime) in C:\Users\Gre
g\Documents\Xenko\sources\engine\Xenko.Games\GameSystemCollection.cs:line 98
at Xenko.Games.GameBase.Update(GameTime gameTime) in C:\Users\Greg\Documents
Xenko\sources\engine\Xenko.Games\GameBase.cs:line 918
at Xenko.Games.GameBase.UpdateAndProfile(GameTime gameTime) in C:\Users\Greg
Documents\Xenko\sources\engine\Xenko.Games\GameBase.cs:line 926
at Xenko.Games.GameBase.TickInternal() in C:\Users\Greg\Documents\Xenko\sourc
es\engine\Xenko.Games\GameBase.cs:line 677
at Xenko.Games.GameBase.Tick() in C:\Users\Greg\Documents\Xenko\sources\engin
e\Xenko.Games\GameBase.cs:line 510
at Xenko.Games.GamePlatform.Tick() in C:\Users\Greg\Documents\Xenko\sources\e
ngine\Xenko.Games\GamePlatform.cs:line 173
at Xenko.Games.GamePlatform.OnRunCallback() in C:\Users\Greg\Documents\Xenko
sources\engine\Xenko.Games\GamePlatform.cs:line 143
at Xenko.Games.GameWindowWinforms.<>c__DisplayClass19_0.b__0() in C:\Use
rs\Greg\Documents\Xenko\sources\engine\Xenko.Games\Desktop\GameWindow.Windows.De
sktop.cs:line 196
at Xenko.Games.WindowsMessageLoop.Run(Control form, RenderCallback renderCall
back, Boolean useApplicationDoEvents) in C:\Users\Greg\Documents\Xenko\sources\e
ngine\Xenko.Games\Desktop\WindowsMessageLoop.cs:line 226
at Xenko.Games.GameWindowWinforms.Run() in C:\Users\Greg\Documents\Xenko\sour
ces\engine\Xenko.Games\Desktop\GameWindow.Windows.Desktop.cs:line 188
at Xenko.Games.GamePlatform.Run(GameContext gameContext) in C:\Users\Greg\Doc
uments\Xenko\sources\engine\Xenko.Games\GamePlatform.cs:line 120
at Xenko.Games.GameBase.Run(GameContext gameContext) in C:\Users\Greg\Documen
ts\Xenko\sources\engine\Xenko.Games\GameBase.cs:line 462
at TopDownRPG2.TopDownRPG2App.Main(String[] args) in C:\Users\Greg\Documents
XenkoProjects\TopDownRPG2\TopDownRPG2\TopDownRPG2.Windows\TopDownRPG2App.cs:line
11

image

image

@aurodev aurodev changed the title TopDownRPG Runtime Crash 3.0.0.3 Dev build Physics error "Pair not present" - TopDownRPG and Physics Sample - Runtime Crash 3.0.0.3 Dev build Aug 9, 2018
@aurodev

This comment has been minimized.

Copy link
Author

@aurodev aurodev commented Aug 10, 2018

@Kryptos-FR Think we could take a look at this?
@xen2
This is a fairly serious issue rendering physics unusable and yet... not a label has been applied.
Bug? or Feature?

@xen2 xen2 added the bug label Aug 10, 2018
@xen2

This comment has been minimized.

Copy link
Member

@xen2 xen2 commented Aug 10, 2018

I stumbled on this issue too before 3.0 release and was quite surprised.

Please note that it's due to a check that happens only in debug mode (not sure if we didn't notice it in 2.x because mostly running physics samples against Xenko release, or if something changed since).

Since it seems to work OK in release build (ignored), I focused on other higher priority fixes as this one seems not trivial to fix. I guess it is now time to fix it.

@xen2

This comment has been minimized.

Copy link
Member

@xen2 xen2 commented Aug 10, 2018

@aurodev as a temporary workaround, please disable the debug exception

@xen2 xen2 added the area-Physics label Aug 10, 2018
@aurodev

This comment has been minimized.

Copy link
Author

@aurodev aurodev commented Aug 10, 2018

Thanks. Will do.

@xen2 xen2 changed the title Physics error "Pair not present" - TopDownRPG and Physics Sample - Runtime Crash 3.0.0.3 Dev build Physics error "Pair not present" - TopDownRPG and Physics Sample Aug 12, 2018
@xen2

This comment has been minimized.

Copy link
Member

@xen2 xen2 commented Aug 12, 2018

Keeping the issue open because we still need to fix the underlying issue.

@xen2 xen2 added the help wanted label Sep 6, 2018
@EternalTamago

This comment has been minimized.

Copy link
Contributor

@EternalTamago EternalTamago commented Mar 25, 2019

It seems that CleanContacts() should use currentFrameContacts instead of previousFrameContacts.
That makes "Pair not present" no longer happen.

@xen2 xen2 self-assigned this Mar 26, 2019
@xen2 xen2 closed this in 93c111a Mar 26, 2019
@xen2

This comment has been minimized.

Copy link
Member

@xen2 xen2 commented Mar 26, 2019

Thanks @EternalTamago !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.