Only search projects.blender.org
Log In
New Account
Home
My Page
Projects
Blender 2.x BF release
Summary
Activity
Tracker
SCM
Files
Blender 2.6 Bug Tracker: Browse
[#25006] Particle system crash (missing check for negative index)
Date:
2010-12-02 00:09
Priority:
3
State:
Closed
Submitted by:
Christopher Barrett (
terrachild
)
Assigned to:
Janne Karhu (jhk)
Category:
Rendering
Status:
Fixed / Closed
Relates to:
Duplicates:
Patches:
Summary:
Particle system crash (missing check for negative index)
Detailed description
I've detailed a problem that has persisted and verified by others in the following post on the forum here:
http://blenderartists.org/forum/showthread.php?t=192658&highlight=
It involves a file you can download here:
Star Trek Blender:
http://stblender.iindigo3d.com
And downloaded this blender file of the original Enterprise:
http://stblender.iindigo3d.com/model...ration1701.zip
Please read the forum thread for details of the problem.
Followup
Message
Date
: 2010-12-02 02:11
Sender
:
Alexander Kuznetsov
particle_system.c
line 350: pa->num_dmcache= psys_particle_dm_face_lookup(ob, dm, pa->num, pa->fuv, pa->num < totelem ? nodearray[pa->num] : NULL);
pa->num is -1, so last argument becomes nodearray[-1] instead of NULL
This causing execution of particle.c, line 1613
where is node= nodearray[-1] causing memory violation
I'm not familiar with particle system.
I dunno if pa->num can be -1. If so may be we can use
http://www.pasteall.org/17270/diff
Date
: 2010-12-02 05:02
Sender
:
Campbell Barton
pa->num < totelem ? nodearray[pa->num] : NULL
can be replaced with...
(unsigned int)pa->num < totelem ? nodearray[pa->num] : NULL
But best Janne look into this one.
Date
: 2010-12-02 15:53
Sender
:
Janne Karhu
Hmm, this is a bit tricky. It didn't crash for me, but I see where the problem is.
First of all particles don't really work well with a build modifier before them. In the beginnig there's no geometry to emit from, so the particles don't really know what to do.
This is actually what the "pa->num == -1" means, there was no geometry found to emit from. It shouldn't crash in any case though, so I added a check for this in the code. Hopefully this fixes the crash for you. None the less I suggest making some changes to the file so that the particles have some good geometry to emit from.
Please re-check with a new build after r33425 and report back here.
Date
: 2010-12-06 08:28
Sender
:
Christopher Barrett
The Problem has been corrected, and it renders fine even without changes to the build modifier.
Date
: 2010-12-06 15:17
Sender
:
Janne Karhu
Great to hear, thanks for reporting back! Closing the report.
Attached Files:
No Files Currently Attached
Changes:
Field
Old Value
Date
By
Resolution
Investigate
2010-12-06 15:17
jhk
close_date
2010-12-06 15:17
2010-12-06 15:17
jhk
status_id
Open
2010-12-06 15:17
jhk
Resolution
Approved
2010-12-02 15:53
jhk
summary
32 bit render works, but 64 bit crashes with the same file.
2010-12-02 06:45
campbellbarton
Resolution
New
2010-12-02 05:02
campbellbarton
assigned_to
none
2010-12-02 05:02
campbellbarton