crownengine / crown

The flexible game engine.
https://www.crownengine.org
Other
2.14k stars 154 forks source link

Fatal "unknown event type" with "samples\02-animation" #78

Closed robhshu closed 6 years ago

robhshu commented 6 years ago

(This was the last hurdle to run on Windows!)

In World::update_scene when updating the animation events, and EventHeader with a type of 27 appears.

This is currently unhandled in the switch statement, and throws this fatal error (debug mode):

CE_FATAL("Unknown event type");

This can be ignored to continue running, perhaps downgrade this warning to a log?

robhshu commented 6 years ago

In the samples\01-physics demo there is a similar error for the physics event type.

But this is a buffer overflow as the event type is 0x3F800000 which is a float value of 1.0f!

dbartolini commented 6 years ago

Cannot reproduce this. I tested with both VS2017 and MinGW in debug mode.

robhshu commented 6 years ago

This only occurs with the "win32" platform. It does not occur on "x64".

Some locals:

size = 32 read = 16 (eh) = 0x0f24e510 {type=27 size=0 }

Note the size is 0, so the event is skipped

dbartolini commented 6 years ago

This should do it: https://github.com/dbartolini/crown/commit/b58824c3618654c999ef0952a98b81b96bb67ab6

robhshu commented 6 years ago

Thanks.

The physics event processing will also need this - see:

https://github.com/dbartolini/crown/commit/b58824c3618654c999ef0952a98b81b96bb67ab6#diff-112c1c4fea0725727cda5af8b8cae2e4L182

On 20 February 2018 at 23:57, Daniele Bartolini notifications@github.com wrote:

This should do it: b58824c https://github.com/dbartolini/crown/commit/b58824c3618654c999ef0952a98b81b96bb67ab6

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dbartolini/crown/issues/78#issuecomment-367163960, or mute the thread https://github.com/notifications/unsubscribe-auth/ABkWyFsxLzdV5EwJ8WNxdCdXoD9Nlhuoks5tW1vbgaJpZM4SMn4t .

dbartolini commented 6 years ago

Right, thank you. :)