Access Violation

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
myraneal
Posts: 26
Joined: Tue Apr 08, 2008 8:00 pm

Access Violation

Post by myraneal »

Hey there,
I think I might have another bug report on my hands. Look at the attached screenie. I also attached the zgeproj file that causes this. When you open up the project and click on the ParticleModel object, the app gives me the error you see in the screenshot. It seems like the access violation happens when it's trying to render something in the Preview Window upon clicking the object.
Also I can't just click OK and continue working; I have to kill the ZGameEditor.exe process from the Task Manager.

Let me know if you need more info.

EDIT: Now I'm pretty sure it happens during whatever it's trying to do when trying to render the ParticleModel in the preview windows because I locked the Preview Window to another object and then clicked on the ParticleModel and no access violation occurs.

EDIT2: Ok, looks like I found the culprit. Adding a RemoveModel at the end of your OnRender state is NOT a good idea :D. I guess the application tries to do everything in the OnRender state when trying to preview the model, and it also does the RemoveModel step which in turn causes an access violation after the deletion of the object from memory. It might be a good idea to put an exception in the code not to launch that expression in the OnRender state.

-Yılmaz
Attachments
access_violation.jpg
access_violation.jpg (204.42 KiB) Viewed 4376 times
cannonshoot.zip
(5.19 KiB) Downloaded 476 times
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Yes there are a few components that are not valid to use in OnRender, also all the Render-components should only be used in OnRender. However the ZDesigner tool still lets you insert components where they do not make sense and that should be fixed. At the very least you should get a error message that informs you about what the problem is instead of a access violation. Thanks for reporting.
Post Reply