MouseLook actuator raises an Assert error #43748

Closed
opened 2015-02-20 14:33:03 +01:00 by Dalai Felinto · 6 comments

System Information
OSX 10.9

Blender Version
Broken: (example: 2.7.3.8 de4dcda5)

Short description of error

Exact steps for others to reproduce the error
Open mouse_actuator.blend, start the game (P) and mouse the mouse.

I get a crash with the following backtrace:

ASSERT /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_MouseActuator.cpp:319: !m_mouse failed.

Program received signal SIGTRAP, Trace/breakpoint trap.
- 0  0x00007fff84686866 in __pthread_kill ()
- 1  0x00007fff8392e35c in pthread_kill ()
- 2  0x00000001015e019d in KX_MouseActuator::getMousePosition (this=0x109c4f900, pos=0x7fff5fbfd770) at /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_MouseActuator.cpp:319
- 3  0x00000001015df4f4 in KX_MouseActuator::Update (this=0x109c4f900) at /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_MouseActuator.cpp:131
- 4  0x0000000101660c4b in SCA_IActuator::Update (this=0x109c4f900, curtime=0.47045370737711584, frame=true) at /Users/dfelinto/blender/git/blender/source/gameengine/GameLogic/SCA_IActuator.cpp:51
- 5  0x000000010166ef56 in SCA_LogicManager::UpdateFrame (this=0x109c3d510, curtime=0.47045370737711584, frame=true) at /Users/dfelinto/blender/git/blender/source/gameengine/GameLogic/SCA_LogicManager.cpp:225
- 6  0x00000001016169a6 in KX_Scene::LogicUpdateFrame (this=0x10a101200, curtime=0.47045370737711584, frame=true) at /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_Scene.cpp:1667
- 7  0x00000001015d228c in KX_KetsjiEngine::NextFrame (this=0x117a60560) at /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_KetsjiEngine.cpp:681
- 8  0x000000010149f626 in BL_KetsjiNextFrame (ketsjiengine=0x117a60560, C=0x109e182d8, win=0x117a9f768, scene=0x10a1ff208, ar=0x117abbb88, keyboarddevice=0x10a149000, mousedevice=0x10a055e00, draw_letterbox=0) at /Users/dfelinto/blender/git/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp:136
- 9  0x000000010149ec9e in StartKetsjiShell (C=0x109e182d8, ar=0x117abbb88, cam_frame=0x7fff5fbff2f0, always_use_expand_framing=1) at /Users/dfelinto/blender/git/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp:574
- 10 0x00000001002d2507 in game_engine_exec (C=0x109e182d8, op=0x117a4f768) at /Users/dfelinto/blender/git/blender/source/blender/editors/space_view3d/view3d_view.c:1648
- 11 0x000000010013422e in wm_operator_invoke (C=0x109e182d8, ot=0x10f21c408, event=0x109c3f688, properties=0x1179539b8, reports=0x0, poll_only=false) at /Users/dfelinto/blender/git/blender/source/blender/windowmanager/intern/wm_event_system.c:1046
- 12 0x00000001001337d4 in wm_handler_operator_call (C=0x109e182d8, handlers=0x117abbcd0, handler=0x117938568, event=0x109c3f688, properties=0x1179539b8) at /Users/dfelinto/blender/git/blender/source/blender/windowmanager/intern/wm_event_system.c:1637
- 13 0x0000000100132a93 in wm_handlers_do_intern (C=0x109e182d8, event=0x109c3f688, handlers=0x117abbcd0) at /Users/dfelinto/blender/git/blender/source/blender/windowmanager/intern/wm_event_system.c:1897
- 14 0x000000010012e8d5 in wm_handlers_do (C=0x109e182d8, event=0x109c3f688, handlers=0x117abbcd0) at /Users/dfelinto/blender/git/blender/source/blender/windowmanager/intern/wm_event_system.c:2006
- 15 0x000000010012e292 in wm_event_do_handlers (C=0x109e182d8) at /Users/dfelinto/blender/git/blender/source/blender/windowmanager/intern/wm_event_system.c:2345
- 16 0x00000001001238ae in WM_main (C=0x109e182d8) at /Users/dfelinto/blender/git/blender/source/blender/windowmanager/intern/wm.c:487
- 17 0x000000010011f1b7 in main (argc=1, argv=0x7fff5fbff780) at /Users/dfelinto/blender/git/blender/source/creator/creator.c:1765

To create the file from scratch all you need is a Mouse Actuator with Look mode linked to a Mouse Sensor with Movement mode.
Note: This only happens in debug mode + crash on asserts. It should be investigated nonetheless.

**System Information** OSX 10.9 **Blender Version** Broken: (example: 2.7.3.8 de4dcda5) **Short description of error** **Exact steps for others to reproduce the error** Open [mouse_actuator.blend](https://archive.blender.org/developer/F144976/mouse_actuator.blend), start the game (P) and mouse the mouse. I get a crash with the following backtrace: ``` ASSERT /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_MouseActuator.cpp:319: !m_mouse failed. Program received signal SIGTRAP, Trace/breakpoint trap. - 0 0x00007fff84686866 in __pthread_kill () - 1 0x00007fff8392e35c in pthread_kill () - 2 0x00000001015e019d in KX_MouseActuator::getMousePosition (this=0x109c4f900, pos=0x7fff5fbfd770) at /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_MouseActuator.cpp:319 - 3 0x00000001015df4f4 in KX_MouseActuator::Update (this=0x109c4f900) at /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_MouseActuator.cpp:131 - 4 0x0000000101660c4b in SCA_IActuator::Update (this=0x109c4f900, curtime=0.47045370737711584, frame=true) at /Users/dfelinto/blender/git/blender/source/gameengine/GameLogic/SCA_IActuator.cpp:51 - 5 0x000000010166ef56 in SCA_LogicManager::UpdateFrame (this=0x109c3d510, curtime=0.47045370737711584, frame=true) at /Users/dfelinto/blender/git/blender/source/gameengine/GameLogic/SCA_LogicManager.cpp:225 - 6 0x00000001016169a6 in KX_Scene::LogicUpdateFrame (this=0x10a101200, curtime=0.47045370737711584, frame=true) at /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_Scene.cpp:1667 - 7 0x00000001015d228c in KX_KetsjiEngine::NextFrame (this=0x117a60560) at /Users/dfelinto/blender/git/blender/source/gameengine/Ketsji/KX_KetsjiEngine.cpp:681 - 8 0x000000010149f626 in BL_KetsjiNextFrame (ketsjiengine=0x117a60560, C=0x109e182d8, win=0x117a9f768, scene=0x10a1ff208, ar=0x117abbb88, keyboarddevice=0x10a149000, mousedevice=0x10a055e00, draw_letterbox=0) at /Users/dfelinto/blender/git/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp:136 - 9 0x000000010149ec9e in StartKetsjiShell (C=0x109e182d8, ar=0x117abbb88, cam_frame=0x7fff5fbff2f0, always_use_expand_framing=1) at /Users/dfelinto/blender/git/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp:574 - 10 0x00000001002d2507 in game_engine_exec (C=0x109e182d8, op=0x117a4f768) at /Users/dfelinto/blender/git/blender/source/blender/editors/space_view3d/view3d_view.c:1648 - 11 0x000000010013422e in wm_operator_invoke (C=0x109e182d8, ot=0x10f21c408, event=0x109c3f688, properties=0x1179539b8, reports=0x0, poll_only=false) at /Users/dfelinto/blender/git/blender/source/blender/windowmanager/intern/wm_event_system.c:1046 - 12 0x00000001001337d4 in wm_handler_operator_call (C=0x109e182d8, handlers=0x117abbcd0, handler=0x117938568, event=0x109c3f688, properties=0x1179539b8) at /Users/dfelinto/blender/git/blender/source/blender/windowmanager/intern/wm_event_system.c:1637 - 13 0x0000000100132a93 in wm_handlers_do_intern (C=0x109e182d8, event=0x109c3f688, handlers=0x117abbcd0) at /Users/dfelinto/blender/git/blender/source/blender/windowmanager/intern/wm_event_system.c:1897 - 14 0x000000010012e8d5 in wm_handlers_do (C=0x109e182d8, event=0x109c3f688, handlers=0x117abbcd0) at /Users/dfelinto/blender/git/blender/source/blender/windowmanager/intern/wm_event_system.c:2006 - 15 0x000000010012e292 in wm_event_do_handlers (C=0x109e182d8) at /Users/dfelinto/blender/git/blender/source/blender/windowmanager/intern/wm_event_system.c:2345 - 16 0x00000001001238ae in WM_main (C=0x109e182d8) at /Users/dfelinto/blender/git/blender/source/blender/windowmanager/intern/wm.c:487 - 17 0x000000010011f1b7 in main (argc=1, argv=0x7fff5fbff780) at /Users/dfelinto/blender/git/blender/source/creator/creator.c:1765 ``` To create the file from scratch all you need is a Mouse Actuator with Look mode linked to a Mouse Sensor with Movement mode. Note: This only happens in debug mode + crash on asserts. It should be investigated nonetheless.
Author
Owner

Changed status to: 'Open'

Changed status to: 'Open'
Author
Owner

Added subscriber: @dfelinto

Added subscriber: @dfelinto
Sybren A. Stüvel self-assigned this 2015-02-20 14:44:31 +01:00

The assertion seems to be inverted by mistake:

MT_assert(!m_mouse);
const SCA_InputEvent & xevent = m_mouse->GetEventValue(SCA_IInputDevice::KX_MOUSEX);
const SCA_InputEvent & yevent = m_mouse->GetEventValue(SCA_IInputDevice::KX_MOUSEY);

Why would you otherwise assert !m_mouse and still use it in the next lines?

I'll remove the ! and commit.

The assertion seems to be inverted by mistake: ``` MT_assert(!m_mouse); const SCA_InputEvent & xevent = m_mouse->GetEventValue(SCA_IInputDevice::KX_MOUSEX); const SCA_InputEvent & yevent = m_mouse->GetEventValue(SCA_IInputDevice::KX_MOUSEY); ``` Why would you otherwise assert `!m_mouse ` and still use it in the next lines? I'll remove the `!` and commit.

This issue was referenced by 6d9c99422b

This issue was referenced by 6d9c99422b8873d6276af35d884105075077df2e

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 6d9c99422b.

Closed by commit 6d9c99422b.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#43748
No description provided.