replaceMesh() / LibNew() crashing game engine #38170
Labels
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#38170
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Windows 7 64-bit, AMD RADEON HD 7750
Blender Version
Broken: Recent 2.69 Buildbot Version
Hash
74216cf
Date 1/12/14
Worked: 2.69 Release (Note that the first two bugs don't happen in the release version, but the last one still does)
There's a few errors shown in this blend file. The first two are more critical, while the last one isn't game-breaking, but doesn't work correctly.
LibNewBug.blend
1 - When you use the LibNew() function on a recent version of Blender (like the one I posted above), and then escape out of it, it crashes Blender out.
2 - When you use the replaceMesh() function using a mesh that you know exists (in the example blend, it's the one currently on the object), it crashes Blender without even starting the game engine.
3 - When you use LibNew, it makes a new visual mesh, but not a physical mesh. You can see that the two different cubes share physical meshes in the "LibNewFail" scene.
To reproduce the errors, just switch to the corresponding scenes and press P to play the game engine on the provided blend file. You can also use LibNew() or replaceMesh() on a mesh on a new blend file.
Changed status to: 'Open'
Added subscriber: @solarlune
Added subscriber: @Moguri
It looks like error 1 is caused by 709041, which looks like the threaded depsgraph commit. I wonder if the BGE is missing something for cleanup.
And error 2 is caused by 6a4733
Bumping (?) for more info. I just tried this in the recent Release Candidate for Blender 2.7, and two of the bugs still seem to be there. The replaceMesh bug seems to have been fixed.
Added subscriber: @Sergey
@Moguri, #1 is caused by calloc-ing main in KX_PythonMain.cpp:755, you need to use
BKE_main_new()
to properly allocate bMain. One liner fix :)Other things i'm not sure.
Thanks for the fix sergey. Any idea why we have BKE_main functions defined in BKE_library.h instead of BKE_main.h?
So, now 1 and 2 should be fixed. 3 sounds like a missing feature rather than a bug. I'm not sure if it will be tackled prior to 2.70 being released.
@Moguri, i think it's historical question --
BKE_main_free()
was in BKE_library at the time i've addedBKE_main_new()
. Not really fussed with wither leaving this as is or re-shuffling functions/headers.. You could poke cambo -- he loves doing cleanup like this :)Added subscriber: @raco
@solarlune: Could we maybe open a new task for this third issue (LibNew doesn't update Physics Mesh) so this can be closed? Or change the title?
I would edit the title and change the main text, but even though I'm the owner of the task, for some reason I can't edit it. I can create a new task if necessary.
Added subscriber: @brita
@brita I created a new task related to just the third bug. The first two are already solved. So this could be merged with #40955.
Changed status from 'Open' to: 'Duplicate'
✘ Merged into #40955.