GE crashes when object from other scene is ended after adding it #41599

Closed
opened 2014-08-27 13:40:42 +02:00 by Kayran Schmidt · 17 comments

System Information
Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.140303-2144)

         Language: German (Regional Setting: German)

System Manufacturer: Hewlett-Packard

     System Model: HP Pavilion dv7 Notebook PC
             BIOS: InsydeH2O Version 03.60.48F.17
        Processor: Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz (4 CPUs), ~2.3GHz
           Memory: 8192MB RAM

Available OS Memory: 8140MB RAM

        Page File: 3061MB used, 13215MB available
      Windows Dir: C:\Windows
  DirectX Version: DirectX 11

graphic cards:
Radeon (TM) HD 6490M
Mobile Intel(R) HD Graphics

Blender Version
official 7.1

Short description of error

its simple:
when the game runs a overlay scene is added
when you press enter, a textobject from a invisible layer of this overlay scene is added to the overlay scene, and has an framecount of 120 frames to disappear.

the bug:
when the ~ 2 seconds of the 120 frames are over, the program crashes,

and there is another bug related to:
the new object should be added at the coordinates of the plane present in the overlay layer, but its added somewhere else, thou every time at the same position

the script:

import bge
import GameLogic

con = bge.logic.getCurrentController()
scene = bge.logic.getCurrentScene()
ownerobject = con.owner
keyboard = bge.logic.keyboard

def main():

  
#a counter for time measure, it counts the logic steps
  
#overlay scene
  if 'addedOverlay'not in ownerobject:
      bge.logic.addScene("overlay", 1)
      ownerobject['addedOverlay'] = True
      
#get the scene list
  for scenex in bge.logic.getSceneList():
      ownerobject[scenex.name] = scenex
          
          
  
#define that on pressing enter, writemode is activated
  if keyboard.events[bge.events.ENTERKEY] == bge.logic.KX_INPUT_JUST_ACTIVATED:
      
      print(ownerobject["overlay"].objects)
      
      ownerobject["overlay"].addObject(ownerobject["overlay"].objectsInactive["commandList"], ownerobject["overlay"].objects["Plane"], 120)
      
      print(ownerobject["overlay"].objects)

main()

  

bug.blend

Exact steps for others to reproduce the error
just press p and then enter

**System Information** Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.140303-2144) ``` Language: German (Regional Setting: German) ``` System Manufacturer: Hewlett-Packard ``` System Model: HP Pavilion dv7 Notebook PC BIOS: InsydeH2O Version 03.60.48F.17 Processor: Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz (4 CPUs), ~2.3GHz Memory: 8192MB RAM ``` Available OS Memory: 8140MB RAM ``` Page File: 3061MB used, 13215MB available Windows Dir: C:\Windows DirectX Version: DirectX 11 ``` graphic cards: Radeon (TM) HD 6490M Mobile Intel(R) HD Graphics **Blender Version** official 7.1 **Short description of error** its simple: when the game runs a overlay scene is added when you press enter, a textobject from a invisible layer of this overlay scene is added to the overlay scene, and has an framecount of 120 frames to disappear. the bug: when the ~ 2 seconds of the 120 frames are over, the program crashes, and there is another bug related to: the new object should be added at the coordinates of the plane present in the overlay layer, but its added somewhere else, thou every time at the same position the script: import bge import GameLogic con = bge.logic.getCurrentController() scene = bge.logic.getCurrentScene() ownerobject = con.owner keyboard = bge.logic.keyboard def main(): ``` ``` #a counter for time measure, it counts the logic steps ``` ``` #overlay scene ``` if 'addedOverlay'not in ownerobject: bge.logic.addScene("overlay", 1) ownerobject['addedOverlay'] = True ``` #get the scene list ``` for scenex in bge.logic.getSceneList(): ownerobject[scenex.name] = scenex ``` #define that on pressing enter, writemode is activated ``` if keyboard.events[bge.events.ENTERKEY] == bge.logic.KX_INPUT_JUST_ACTIVATED: print(ownerobject["overlay"].objects) ownerobject["overlay"].addObject(ownerobject["overlay"].objectsInactive["commandList"], ownerobject["overlay"].objects["Plane"], 120) print(ownerobject["overlay"].objects) ``` main() ``` ``` [bug.blend](https://archive.blender.org/developer/F106985/bug.blend) **Exact steps for others to reproduce the error** just press p and then enter
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @Winnetou

Added subscriber: @Winnetou
Author

pls do not make up your minds about the comments, i forgot to delete them, as i came across this error wehn programming a game, hence the comments

and i want to thank blender society for ever effort in advance

w

pls do not make up your minds about the comments, i forgot to delete them, as i came across this error wehn programming a game, hence the comments and i want to thank blender society for ever effort in advance w
Author

sry that i didnt write all these comments in my post, but i just discovered something interesting:
it only crashes with textobjects, cubes or anything else works fine....

sry that i didnt write all these comments in my post, but i just discovered something interesting: it only crashes with textobjects, cubes or anything else works fine....

Added subscriber: @raco

Added subscriber: @raco

Edit:

Looking at your blend more carefully made me realize I didn't reproduce it exactly as was explained. Sorry about that. I could reproduce it and my conclusion is that adding an object in an overlay scene through the controller of an object in the background scene causes Blender to crash.

In the blend attached you can see clearly that the same script works if it's run through the controller of the spawner in the overlay scene. However, if you deactivate it in the Logic Brick editor and activate the 'add_text' brick in the background scene instead, then the crash occurs.

Overlay_scene_add_object_bug.blend

I remember this crash was discussed somewhere, so it could be that this was reported already.

Edit: Looking at your blend more carefully made me realize I didn't reproduce it exactly as was explained. Sorry about that. I could reproduce it and my conclusion is that adding an object in an overlay scene through the controller of an object in the background scene causes Blender to crash. In the blend attached you can see clearly that the same script works if it's run through the controller of the spawner in the overlay scene. However, if you deactivate it in the Logic Brick editor and activate the 'add_text' brick in the background scene instead, then the crash occurs. [Overlay_scene_add_object_bug.blend](https://archive.blender.org/developer/F107380/Overlay_scene_add_object_bug.blend) I remember this crash was discussed somewhere, so it could be that this was reported already.
Author

if it is already in discussion somewhere, i didn't find it as i searched the bug, sry
anyway, i found a other way to my goal, though,

and i am happy to had the opportunity to be part of blender developement once...

thank you for your comment

if it is already in discussion somewhere, i didn't find it as i searched the bug, sry anyway, i found a other way to my goal, though, and i am happy to had the opportunity to be part of blender developement once... thank you for your comment
Member

Added subscriber: @JorgeBernalMartinez

Added subscriber: @JorgeBernalMartinez
Member

@raco: I just checked your example and I can not reproduce the crash. In both options that you point out, I obtain the word "text" without any crash.
tested with current master (2.72RC)

@raco: I just checked your example and I can not reproduce the crash. In both options that you point out, I obtain the word "text" without any crash. tested with current master (2.72RC)

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Raf Colson self-assigned this 2014-09-28 12:14:28 +02:00

Thanks lordloki. It seems to be fixed in 2.72RC.

Edit: Nope, I was wrong. Didn't test if it crashed on endObject(). But it does.

Thanks lordloki. It seems to be fixed in 2.72RC. Edit: Nope, I was wrong. Didn't test if it crashed on endObject(). But it does.

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'

Sorry guys, it's still broken. Press Return to add object, wait a second until Blender crashes when its removed from the scene.

Overlay_scene_remove_added_object_bug.blend

Sorry guys, it's still broken. Press Return to add object, wait a second until Blender crashes when its removed from the scene. [Overlay_scene_remove_added_object_bug.blend](https://archive.blender.org/developer/F113372/Overlay_scene_remove_added_object_bug.blend)
Raf Colson removed their assignment 2014-09-28 12:26:48 +02:00
Member

@raco: I confirm the bug now :-)

@raco: I confirm the bug now :-)
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Jorge Bernal self-assigned this 2015-03-15 10:57:48 +01:00
Member

Added subscriber: @panzergame

Added subscriber: @panzergame
Member

Closed by @panzergame commit 176ecd9c9

Thanks for reporting.

Closed by @panzergame commit 176ecd9c9 Thanks for reporting.
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#41599
No description provided.