Game engine bugs #39075

Closed
opened 2014-03-09 21:39:59 +01:00 by Richard R · 13 comments

System Information
windows 7 ult, 2.4gz celeron, 2gb ram, Geforce 8400 GS

Blender Version
blender 2.7

Short description of error 1
Collision sensor doesn't trigger properly when world/physics/physics steps/substeps is greater than 1.

Steps to reproduce 1
Create an object that constantly collides with another object. have either object have a collision sensor hooked to a "and" controller, which is hooked to some actuator that will change a property or do something. Start the game engine with substeps set higher than 1. You will see that the collision sensor isn't registering every collision.

Short description of error 2
A collision sensor is triggered twice: once on the initial collision, 2nd on the rebound (if there is a material physics elasticity greater than 0).

Steps to reproduce 2
Create a plane, scale it up a bit. Attach a material, enable Physics, then set the elasticity to 1.0. Set the physics type to Static, enable Collision Bounds, and set bounds type to Box. Create a cube. Set the physics type to Dynamic, enable Collision Bounds, and set bounds type to Box. Create a new Text in the script window. On the first line, type: print("test"). Add a collision sensor to the cube, then attach it to a Python controller. Set the Script box to Text. Run the game engine and notice that "test" is printed twice to the console.

Short description of error 3
Keyboard sensor sends a positive pulse twice because it registers both the keypress and key release. The same thing happens with the Mouse sensor, that it registers both the mouse button down and mouse button up.

Steps to reproduce 3
Create a new Text in the script window. On the first line, type: print("test"). Add a Keyboard sensor to the cube. Set the Key to whatever you want (spacebar for example). Attach it to a Python controller. Set the Script box to Text. Run the game and press the keyboard key you set it to. Notice that "test" is printed twice to the console.

Short description of error 4
A Message sensor is triggered twice when it receives a message.

Steps to reproduce 4
Create a cube. Add a Message sensor and connect it to a python controller. Create a new text block and type in the following:

from bge import logic

cont = logic.getCurrentController()
obj = cont.owner

print("test", obj['prop'])

	In the Python controller, set the Script to "Text". Add a new game property and set its type to Timer. Leave the name as "prop". Create another cube. Attach a "Always" sensor. Hook it to a "And" controller, then hook the controller to a "Message" actuator. In the "Message" actuator, set the "To:" field to your first cube object. In the "Subject" field, type in whatever you want. Run the game engine. You should get something similar to this:
	
	test 0.0333333
	test 0.05

Short description of error 5
In a script, changes to a KX_VertexProxy color, in GLSL mode, produces no visual changes even if vertex colors are enabled on the object. This works in Multitexture mode; however, the effect seems to apply on one polygon (it should apply on all polygons that share the vertex).

Short description of error 6
Material physics properties (friction, elasticity) apply, even if the material physics is disabled. Objects that use the triangle mesh collision type don't work unless Material physics is enabled.

Steps to reproduce 6
Create a cube and scale it along its Y axis a ways. Position it somewhere along the -X axis. Set the physics to Static and enable "Collision Bounds" then set the type to Box. In the material settings, add a new material and disable its Physics. Create a UV Sphere. Scale it down a ways. Set the Physics type to Dynamic. Enable "Collision Bounds" and set the type to Sphere. Go into wireframe mode and lower the Attributes/Radius down until you see the dotted circle is close to the sphere's edge. Create a new material and disable its physics. Attach a "Always" sensor, hook it to a "And" controller, then hook it to a "Motion" actuator. Set the Motion Force to -6.0 in the X field. Run the game engine and notice the sphere colliding the box and not bouncing. On the sphere, change the Material/Physics Elasticity to 1.0 and don't enable physics. Run the simulation again, the same result. Enable Material/Physics and run the simulation. Same result. Now select the box and set the Material/Physics Elasticity to 1.0 and don't enable physics. Run the simulation and notice the sphere bounce off the cube. You can see the problem, that both objects need Elasticity to be set greater than 0 to get results, regardless if Material/Physics is enabled or disabled.

Short description of error 7
If a child object (has a parent) that is connected to a edit object actuator->add object, is scaled, it adds objects that are also scaled. I don't know if this is supposed to happen or is a bug.

Short description of error 8
In scripting, assigned attributes to bge.logic are not cleaned up when exiting from the standalone player (might be only bge.texture specific). When exiting after a bge.texture and source are assigned to bge.logic, it generates the following error: Error Totblock: 2

This is fixed using the atexit module to call a function on exiting. The callback function deletes the attribute from bge.logic. The code is attacked to a Python controller and hooked to a "Always" sensor, with "True level triggering" enabled, and Frequency set to 2. The following code generates the error without the "cleanup" function.

from bge import texture, logic
from atexit import register

cont = logic.getCurrentController()

def cleanup():
if hasattr(logic, 'video'):
delattr(logic, 'video')

def playVideo():
cont = logic.getCurrentController()
obj = cont.owner
if not cont.sensors['Delay'].positive:
return
- the creation of the texture must be done once: save the
- texture object in an attribute of bge.logic module makes it persistent
if not hasattr(logic, 'video'):
- register(cleanup) # atexit function. Without this. an error is printed to the console
- identify a static texture by name
matID = texture.materialID(obj, 'IMstars1_still.jpg')
# create a dynamic texture that will replace the static texture
logic.video = texture.Texture(obj, matID)
# define a source of image for the texture, here a movie
movie = 'C:\blender\projects\tunnel_output\stars.avi'
logic.video.source = texture.VideoFFmpeg(movie)
#logic.video.source.scale = True
logic.video.source.repeat = -1
# quick off the movie, but it wont play in the background
logic.video.source.play()

# you need to call this function every frame to ensure update of the texture.
logic.video.refresh(True)

playVideo()

Short description of error 9
After I recorded animation with "Record Animation" both enabled on the Game menu and object physics properties, it doesn't update or show that I have an animation until I scrub the keyframes or switch windows.

Short description of error 10
Physics->Lock Translation doesn't seem to work.

Short description of error 11
Text Curves are rendered larger in the bge than their viewport scale; and, materials/textures are not applied.

Short description of error 12
A bounding box with dotted lines covers my objects just outside their edges as shown in the 2 images. I discovered they are collision bounds; but, it makes my objects look very aliased in the viewport. Adjusting the margin doesn't show any changes in the viewport.

blender7_strange_boundingbox.jpg

blender7_strange_boundingbox_glsl.jpg

**System Information** windows 7 ult, 2.4gz celeron, 2gb ram, Geforce 8400 GS **Blender Version** blender 2.7 **Short description of error 1** Collision sensor doesn't trigger properly when world/physics/physics steps/substeps is greater than 1. **Steps to reproduce 1** Create an object that constantly collides with another object. have either object have a collision sensor hooked to a "and" controller, which is hooked to some actuator that will change a property or do something. Start the game engine with substeps set higher than 1. You will see that the collision sensor isn't registering every collision. **Short description of error 2** A collision sensor is triggered twice: once on the initial collision, 2nd on the rebound (if there is a material physics elasticity greater than 0). **Steps to reproduce 2** Create a plane, scale it up a bit. Attach a material, enable Physics, then set the elasticity to 1.0. Set the physics type to Static, enable Collision Bounds, and set bounds type to Box. Create a cube. Set the physics type to Dynamic, enable Collision Bounds, and set bounds type to Box. Create a new Text in the script window. On the first line, type: print("test"). Add a collision sensor to the cube, then attach it to a Python controller. Set the Script box to Text. Run the game engine and notice that "test" is printed twice to the console. **Short description of error 3** Keyboard sensor sends a positive pulse twice because it registers both the keypress and key release. The same thing happens with the Mouse sensor, that it registers both the mouse button down and mouse button up. **Steps to reproduce 3** Create a new Text in the script window. On the first line, type: print("test"). Add a Keyboard sensor to the cube. Set the Key to whatever you want (spacebar for example). Attach it to a Python controller. Set the Script box to Text. Run the game and press the keyboard key you set it to. Notice that "test" is printed twice to the console. **Short description of error 4** A Message sensor is triggered twice when it receives a message. **Steps to reproduce 4** Create a cube. Add a Message sensor and connect it to a python controller. Create a new text block and type in the following: from bge import logic cont = logic.getCurrentController() obj = cont.owner print("test", obj['prop']) In the Python controller, set the Script to "Text". Add a new game property and set its type to Timer. Leave the name as "prop". Create another cube. Attach a "Always" sensor. Hook it to a "And" controller, then hook the controller to a "Message" actuator. In the "Message" actuator, set the "To:" field to your first cube object. In the "Subject" field, type in whatever you want. Run the game engine. You should get something similar to this: test 0.0333333 test 0.05 **Short description of error 5** In a script, changes to a KX_VertexProxy color, in GLSL mode, produces no visual changes even if vertex colors are enabled on the object. This works in Multitexture mode; however, the effect seems to apply on one polygon (it should apply on all polygons that share the vertex). **Short description of error 6** Material physics properties (friction, elasticity) apply, even if the material physics is disabled. Objects that use the triangle mesh collision type don't work unless Material physics is enabled. **Steps to reproduce 6** Create a cube and scale it along its Y axis a ways. Position it somewhere along the -X axis. Set the physics to Static and enable "Collision Bounds" then set the type to Box. In the material settings, add a new material and disable its Physics. Create a UV Sphere. Scale it down a ways. Set the Physics type to Dynamic. Enable "Collision Bounds" and set the type to Sphere. Go into wireframe mode and lower the Attributes/Radius down until you see the dotted circle is close to the sphere's edge. Create a new material and disable its physics. Attach a "Always" sensor, hook it to a "And" controller, then hook it to a "Motion" actuator. Set the Motion Force to -6.0 in the X field. Run the game engine and notice the sphere colliding the box and not bouncing. On the sphere, change the Material/Physics Elasticity to 1.0 and don't enable physics. Run the simulation again, the same result. Enable Material/Physics and run the simulation. Same result. Now select the box and set the Material/Physics Elasticity to 1.0 and don't enable physics. Run the simulation and notice the sphere bounce off the cube. You can see the problem, that both objects need Elasticity to be set greater than 0 to get results, regardless if Material/Physics is enabled or disabled. **Short description of error 7** If a child object (has a parent) that is connected to a edit object actuator->add object, is scaled, it adds objects that are also scaled. I don't know if this is supposed to happen or is a bug. **Short description of error 8** In scripting, assigned attributes to bge.logic are not cleaned up when exiting from the standalone player (might be only bge.texture specific). When exiting after a bge.texture and source are assigned to bge.logic, it generates the following error: Error Totblock: 2 This is fixed using the atexit module to call a function on exiting. The callback function deletes the attribute from bge.logic. The code is attacked to a Python controller and hooked to a "Always" sensor, with "True level triggering" enabled, and Frequency set to 2. The following code generates the error without the "cleanup" function. from bge import texture, logic from atexit import register cont = logic.getCurrentController() def cleanup(): if hasattr(logic, 'video'): delattr(logic, 'video') def playVideo(): cont = logic.getCurrentController() obj = cont.owner if not cont.sensors['Delay'].positive: return - the creation of the texture must be done once: save the - texture object in an attribute of bge.logic module makes it persistent if not hasattr(logic, 'video'): - register(cleanup) # atexit function. Without this. an error is printed to the console - identify a static texture by name matID = texture.materialID(obj, 'IMstars1_still.jpg') # create a dynamic texture that will replace the static texture logic.video = texture.Texture(obj, matID) # define a source of image for the texture, here a movie movie = 'C:\\blender\\projects\\tunnel_output\\stars.avi' logic.video.source = texture.VideoFFmpeg(movie) #logic.video.source.scale = True logic.video.source.repeat = -1 # quick off the movie, but it wont play in the background logic.video.source.play() # you need to call this function every frame to ensure update of the texture. logic.video.refresh(True) playVideo() **Short description of error 9** After I recorded animation with "Record Animation" both enabled on the Game menu and object physics properties, it doesn't update or show that I have an animation until I scrub the keyframes or switch windows. **Short description of error 10** Physics->Lock Translation doesn't seem to work. **Short description of error 11** Text Curves are rendered larger in the bge than their viewport scale; and, materials/textures are not applied. **Short description of error 12** A bounding box with dotted lines covers my objects just outside their edges as shown in the 2 images. I discovered they are collision bounds; but, it makes my objects look very aliased in the viewport. Adjusting the margin doesn't show any changes in the viewport. ![blender7_strange_boundingbox.jpg](https://archive.blender.org/developer/F80462/blender7_strange_boundingbox.jpg) ![blender7_strange_boundingbox_glsl.jpg](https://archive.blender.org/developer/F80464/blender7_strange_boundingbox_glsl.jpg)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @remnar

Added subscriber: @remnar

Added subscriber: @ThomasDinges

Added subscriber: @ThomasDinges

We expect 1 bug only per report, but I will leave this to the Game Engine developers. ;)

We expect 1 bug only per report, but I will leave this to the Game Engine developers. ;)

Added subscriber: @mont29

Added subscriber: @mont29
Mitchell Stokes was assigned by Sergey Sharybin 2014-03-21 09:50:08 +01:00

Added subscribers: @Moguri, @Sergey

Added subscribers: @Moguri, @Sergey

Please on bug per report in the future.

@Moguri, i'll assign it to you and let you to poke other devs if needed :)

Please on bug per report in the future. @Moguri, i'll assign it to you and let you to poke other devs if needed :)
Member

Added subscriber: @JorgeBernalMartinez

Added subscriber: @JorgeBernalMartinez
Member

Scripts actually run twice. Once when the sensor is positive and again when it is negative. Create a reference to the sensor and then check if it is positive.
The comment above is valid for issues 2, 3 and 4

Scripts actually run twice. Once when the sensor is positive and again when it is negative. Create a reference to the sensor and then check if it is positive. The comment above is valid for issues 2, 3 and 4

These really should be separate reports since we have no way to track the status on the individual issues in this report. I cannot reproduce issue 1 (I've attached the file I used), and as mentioned 2-4 have already been invalidated. I think 11 might be a duplicate bug report, and most of these could really use some example files. In short, this report is a mess. I'm thinking about closing it as invalid.

These really should be separate reports since we have no way to track the status on the individual issues in this report. I cannot reproduce issue 1 (I've attached the file I used), and as mentioned 2-4 have already been invalidated. I think 11 might be a duplicate bug report, and most of these could really use some example files. In short, this report is a mess. I'm thinking about closing it as invalid.
Author

This was my first report, in that I thought that I needed to get out everything I observed. I didn't want to write up a bunch of redundant info. But now that I realize it, that these reports could be assigned to different people to work on, so I have been reporting one thing at a time. However, I am thinking that why should I have to included test files. Can't you test your own software? I am willing meet you half way but it is difficult to explain these things and gets quite frustrating.

This was my first report, in that I thought that I needed to get out everything I observed. I didn't want to write up a bunch of redundant info. But now that I realize it, that these reports could be assigned to different people to work on, so I have been reporting one thing at a time. However, I am thinking that why should I have to included test files. Can't you test your own software? I am willing meet you half way but it is difficult to explain these things and gets quite frustrating.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

I'm going to close this bug. If there are still bugs left in here that have do not have other reports, please make reports for them. As for why it is helpful to supply a blendfile, it makes it very obvious to reproduce the bug, and it saves us time. Also, we have a lot of reports to go through, so anything that helps make triage and fixing easier is extremely helpful. Also, we do test our software, but bugs still slip out. We definitely could do better with automated testing and such, but for now we have to work with what we have.

I'm going to close this bug. If there are still bugs left in here that have do not have other reports, please make reports for them. As for why it is helpful to supply a blendfile, it makes it very obvious to reproduce the bug, and it saves us time. Also, we have a lot of reports to go through, so anything that helps make triage and fixing easier is extremely helpful. Also, we do test our software, but bugs still slip out. We definitely could do better with automated testing and such, but for now we have to work with what we have.
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
6 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#39075
No description provided.