Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: AddVehicleEx crashing TV.  (Read 702 times)
TripleView
Community Member
*
Posts: 32


« on: July 28, 2011, 07:36:53 AM »

dCar.WheelID(0) = Physics.AddVehicleWheelEx(dCar.VehicleID, 8, 0.31, 0.365, Vector(1, 0, 0), -0.85, -0.15, 1.125, , , , dCar.sLength, dCar.sShock, dCar.sSpring, dCar.Wheel(0))

This code is crashing out TV in C#,.NET,and VB6 for me. I have no idea why, I have used this code before. It will compile but not run.

.NET & VB6 crash out to desktop with no error report.
C#, gives me:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source: "MTV3D65"
StackTrace:
Code:
"   at CTVPhysics.CreateVehicle(CTVPhysics* , Int32 )\r\n   at MTV3D65.TVPhysics.CreateVehicle(Int32 iChassisBody)\r\n   at VehicleStarterKit.frmCanvas.InitObjects() in C:\\Documents and Settings\\Owner\\Desktop\\VehicleStarterKit11\\VehicleStarterKit\\VehicleStarterKit\\VehicleStarterKit\\frmCanvas.cs:line 258\r\n   at VehicleStarterKit.frmCanvas.frmCanvas_Load(Object sender, EventArgs e) in C:\\Documents and Settings\\Owner\\Desktop\\VehicleStarterKit11\\VehicleStarterKit\\VehicleStarterKit\\VehicleStarterKit\\frmCanvas.cs:line 119\r\n   at System.Windows.Forms.Form.OnLoad(EventArgs e)\r\n   at System.Windows.Forms.Form.OnCreateControl()\r\n   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)\r\n   at System.Windows.Forms.Control.CreateControl()\r\n   at System.Windows.Forms.Control.WmShowWindow(Message& m)\r\n   at System.Windows.Forms.Control.WndProc(Message& m)\r\n   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)\r\n   at System.Windows.Forms.ContainerControl.WndProc(Message& m)\r\n   at System.Windows.Forms.Form.WmShowWindow(Message& m)\r\n   at System.Windows.Forms.Form.WndProc(Message& m)\r\n   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n   at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)\r\n   at System.Windows.Forms.Control.SetVisibleCore(Boolean value)\r\n   at System.Windows.Forms.Form.SetVisibleCore(Boolean value)\r\n   at System.Windows.Forms.Control.set_Visible(Boolean value)\r\n   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n   at System.Windows.Forms.Application.Run(Form mainForm)\r\n   at VehicleStarterKit.Program.Main() in C:\\Documents and Settings\\Owner\\Desktop\\VehicleStarterKit11\\VehicleStarterKit\\VehicleStarterKit\\VehicleStarterKit\\Program.cs:line 17\r\n   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r\n   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)\r\n   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\r\n   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n   at System.Threading.ThreadHelper.ThreadStart()"

More Detail:
Code:
System.AccessViolationException was unhandled
  Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
  Source="MTV3D65"
  StackTrace:
       at CTVPhysics.CreateVehicle(CTVPhysics* , Int32 )
       at MTV3D65.TVPhysics.CreateVehicle(Int32 iChassisBody)
       at VehicleStarterKit.frmCanvas.InitObjects() in C:\Documents and Settings\Owner\Desktop\VehicleStarterKit11\VehicleStarterKit\VehicleStarterKit\VehicleStarterKit\frmCanvas.cs:line 258
       at VehicleStarterKit.frmCanvas.frmCanvas_Load(Object sender, EventArgs e) in C:\Documents and Settings\Owner\Desktop\VehicleStarterKit11\VehicleStarterKit\VehicleStarterKit\VehicleStarterKit\frmCanvas.cs:line 119
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
       at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Control.set_Visible(Boolean value)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at VehicleStarterKit.Program.Main() in C:\Documents and Settings\Owner\Desktop\VehicleStarterKit11\VehicleStarterKit\VehicleStarterKit\VehicleStarterKit\Program.cs:line 17
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:
Logged
TripleView
Community Member
*
Posts: 32


« Reply #1 on: July 28, 2011, 04:49:30 PM »

I never had any problems with TV before I used it many times for tons of different things & it's always been so easy to program ANYTHING at all in. Physics used to be just a breeze & still should. Ever since I updated windows & .NET I have been getting: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

I bet some code got changed and TV needs updated to fix these errors.
Does Sylvain still check these forums?
Logged
Dimple
Community Member
*
Posts: 580


« Reply #2 on: July 28, 2011, 08:31:39 PM »

 Smiley

TripleView,

Download this file and use the older Dll in it in your program and see if it works then.  Also read this thread http://www.truevision3d.com/forums/tv3d_sdk_65/question_re_current_tv65_and_car_physics-t20783.0.html;msg140808#msg140808 it talks about this problem.
Logged

Using VB.NET, TV3D 6.5, VISTA
~~~~~~~~~~~~~~~~~~~~~~~

"Know how to ask. There is nothing more difficult for some people, nor for others, easier."

- Baltasar Gracian
TripleView
Community Member
*
Posts: 32


« Reply #3 on: July 28, 2011, 08:48:20 PM »

any idea how to get a hold of all the older dll's?
for c,vb6,ect... not just for .net

it's becoming a real pain trying to get this to work when none of the vehicle physics work right :/
« Last Edit: July 28, 2011, 08:52:57 PM by TripleView » Logged
Dimple
Community Member
*
Posts: 580


« Reply #4 on: July 28, 2011, 08:55:20 PM »

 Smiley

If I can find them I'll zip them up and post them.  Night!
Logged

Using VB.NET, TV3D 6.5, VISTA
~~~~~~~~~~~~~~~~~~~~~~~

"Know how to ask. There is nothing more difficult for some people, nor for others, easier."

- Baltasar Gracian
Dimple
Community Member
*
Posts: 580


« Reply #5 on: July 29, 2011, 09:25:01 PM »

 Sad

TripleView,

I don't seem to have a copy of the TV65 SDK that has the older dlls in it.  My old computer might have them, but its been taken apart and put in storage while I'm looking for a new place to live and work. I'm sorry but you'll have to get them from someone else right now.  Have you tried anyone in IRC?

 
Logged

Using VB.NET, TV3D 6.5, VISTA
~~~~~~~~~~~~~~~~~~~~~~~

"Know how to ask. There is nothing more difficult for some people, nor for others, easier."

- Baltasar Gracian
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks