T3D 3.51 Engine Crash
by Howard Dortch · in Torque 3D Professional · 05/04/2014 (9:52 am) · 15 replies
I have a helmet to mount on a character
datablock ShapeBaseImageData(Helmet)
{
shapeFile = "art/shapes/actors/common/helmet.dts"; //shapes/soldier/helmet.dts";
mountPoint = 2;
};
Here is the call
%player.mountImage(Helmet,1);
All is well if I run the game solo
If I connect from another computer over a LAN, mounting the helmet crashes the engine here
// Eject shell casing on every state change (client side only)
shapeImage.cpp line 2591 0xC0000005: Access violation reading location 0x298dd97c.
I comment out the mountImage call and client remote runs fine.
Any Clue as to what is wrong here?
datablock ShapeBaseImageData(Helmet)
{
shapeFile = "art/shapes/actors/common/helmet.dts"; //shapes/soldier/helmet.dts";
mountPoint = 2;
};
Here is the call
%player.mountImage(Helmet,1);
All is well if I run the game solo
If I connect from another computer over a LAN, mounting the helmet crashes the engine here
// Eject shell casing on every state change (client side only)
shapeImage.cpp line 2591 0xC0000005: Access violation reading location 0x298dd97c.
I comment out the mountImage call and client remote runs fine.
Any Clue as to what is wrong here?
#2
Far out part is it crashes in a place where eject shell casing was commented. So either I have to assign more values to the datablock or there is a bug in net connections and shapeImages
Thanks...
05/04/2014 (5:28 pm)
Yes any ShapeBaseImage over a LAN will crash it. I can make a real object and mount it using the exact same dts and it works fine.Far out part is it crashes in a place where eject shell casing was commented. So either I have to assign more values to the datablock or there is a bug in net connections and shapeImages
Thanks...
#4
Does the image declaration need anything besides the object to load and the mountpoint?
I mounted the lurker gun just fine so there has to be something it requires like a class reference or something else.
I used mountObject() and it mounted with no problems so the dts object is valid
05/13/2014 (11:56 am)
Bump anyone?Does the image declaration need anything besides the object to load and the mountpoint?
I mounted the lurker gun just fine so there has to be something it requires like a class reference or something else.
I used mountObject() and it mounted with no problems so the dts object is valid
#5
05/13/2014 (12:10 pm)
And just for fun I changed the shapefile pointer to my helmet in the lurker code and it mounts just fine so I guess a helmet needs projectiles and muzzlevectors and all the other data associated with a weapon? This has to be a bug.
#7
docs.garagegames.com/torque-3d/official/content/documentation/Scripting/Advanced...
I think you'd be better off starting with the full example and then removing things piece by piece. ShapeBaseImageData is a finite state machine and has states. Perhaps adding:
Will fix it? I think it's happening because of this line:
github.com/GarageGames/Torque3D/blob/master/Engine/source/T3D/shapeImage.cpp#L23...
It expects there to be a state 0 which I don't believe is being sent over network due to the lack of data. That's my guess anyway.
05/22/2014 (8:21 am)
If I had to guess it's because there's no states in your ShapeBaseImageData. Take a look at this:docs.garagegames.com/torque-3d/official/content/documentation/Scripting/Advanced...
I think you'd be better off starting with the full example and then removing things piece by piece. ShapeBaseImageData is a finite state machine and has states. Perhaps adding:
// Initial start up state stateName[0] = "default";
Will fix it? I think it's happening because of this line:
github.com/GarageGames/Torque3D/blob/master/Engine/source/T3D/shapeImage.cpp#L23...
It expects there to be a state 0 which I don't believe is being sent over network due to the lack of data. That's my guess anyway.
#8
Seems like this could be put in the C++ class instance and save alot of trouble for games not using guns.
Thanks much for the reply !!
05/22/2014 (9:49 am)
Initial test shows the stateName[0] = "default"; allowed me to mount a helmet as a client to a dedicated server on a different machine. I will test some others to make sure (150 items) Seems like this could be put in the C++ class instance and save alot of trouble for games not using guns.
Thanks much for the reply !!
#9
EDIT: Bizarre that it should crash on line 2591. That just grabs a reference to one of the StateData objects.
05/22/2014 (5:08 pm)
Well that's slightly insane. I can't believe nobody's seen this before. We should definitely get a proper source-side fix for this that doesn't involve setting a default state name.EDIT: Bizarre that it should crash on line 2591. That just grabs a reference to one of the StateData objects.
#10
It might be a good deal easier to create a simple object (anything above SceneObject) and mount that to the player. ShapeBase is also technically a little heavy for this use, but it would be pretty easy to modify Item to handle mounting properly.
05/31/2014 (12:48 pm)
Just to take this in a different direction, I don't think an Image is really what you need to just render a helmet on your Player. ShapeBaseImage is a very complicated state machine intended to represent really complicated mounted objects with lots of animations and actions, so it's a bit heavy to use for a static prop. The name throws people off I believe (an "image," that sounds right for mounting shapes to the body).It might be a good deal easier to create a simple object (anything above SceneObject) and mount that to the player. ShapeBase is also technically a little heavy for this use, but it would be pretty easy to modify Item to handle mounting properly.
#11
05/31/2014 (3:03 pm)
The benefit of using an Image is that you don't have to create a new object - Images are just datablocks. and since you can't mount TSStatics, all you're left with are ShapeBase descendents. StaticSHape is probably a lighter-weight solution than Item, though I can't remember now if it mounts properly either...
#12
It is from habit that I use the image for mounting helmets etc for years and all my assets are set up that way.
Probably a discussion to have for the future of the engine. Torque has always been skewed to shooters. My game has no guns. If we want to use torque for RPG, MMO things we might consider how we approach these issues.
Thanks all for the responses.
06/02/2014 (5:57 am)
An object and an Image mount differently. I never could understand why we needed both. An object with a pointer to a state machine or null seems to work in my mind. It is from habit that I use the image for mounting helmets etc for years and all my assets are set up that way.
Probably a discussion to have for the future of the engine. Torque has always been skewed to shooters. My game has no guns. If we want to use torque for RPG, MMO things we might consider how we approach these issues.
Thanks all for the responses.
#13
Any help?
06/06/2014 (6:04 am)
And while we are here I just discovered when I mount an image or an object in the back of my truck on a mountNode and drive the vehicle around in 3d person, the object mounted in the bed jitters like it is trying to catch up. I have been using this same method for the last couple version of torque with no issues, this version breaks that ability.Any help?
#14
Afaik you have collision detection when mounting an object.
Please correct me if I am wrong.
06/06/2014 (12:23 pm)
Quote:An object and an Image mount differentlyFor all I know is that an object will be mounted with its origen while an image will use the mountPoint node (or again its origin if none exist).
Quote:I never could understand why we needed both.
Afaik you have collision detection when mounting an object.
Please correct me if I am wrong.
#15
Collisions should be on both since both point to the same dts object which has collisions defined.
Thanks
06/06/2014 (3:21 pm)
Yeah mount node is the issue / difference when I mount a helmet object the opening of the helmet sits on top of the head. A helmet image sits over the head properly.Collisions should be on both since both point to the same dts object which has collisions defined.
Thanks
Torque Owner Daniel Buckmaster
T3D Steering Committee