You are correct on the C++ statement Bot. However, I'm not entirely new to
it, no.

Anyways, I set a breakpoint on my Jetski's  Think function. This gets called
when the level is loaded. I go into the BaseClass::Think() function, which
takes me into vehicle_base.cpp's Think. Then we go back to
fourwheelvehiclephysics.cpp's think function. Once I step over
m_pVehicle->Update, I error.

// Set save data.
    float carSpeed = fabs( INS2MPH( carState.speed ) );
    m_nLastSpeed = m_nSpeed;
    m_nSpeed = ( int )carSpeed;
    m_nRPM = ( int )carState.engineRPM;
    m_nHasBoost = vehicleData.engine.boostDelay;    // if we have any boost
delay, vehicle has boost ability

    m_pVehicle->Update( gpGlobals->frametime, m_controls);


So now I know that there is a problem with it thinking... How do I track it
down from here?
Here's the Jetski's think function: http://pastebin.com/m3f9cfeec , but it
never executes anything past BaseClass::Think();. Where can I go from here
to try and determine what is wrong? It doesn't have any errors on the
::Precache() or  ::Spawn() functions.

Here's the entire cpp file. http://pastebin.com/m7da2b209


On Sun, Jul 19, 2009 at 1:16 PM, Joel R. <[email protected]> wrote:

> You can see the values the variables are holding on that line.  Use that to
> figure out which is bonkers.
>
> On Sun, Jul 19, 2009 at 3:01 PM, botman <[email protected]> wrote:
>
> > Maybe this will help...
> >
> > http://msdn.microsoft.com/en-us/library/k0k771bt%28VS.71%29.aspx
> >
> >  From your questions, it sounds like you really don't know C++.  Is that
> > the case?
> >
> > On 7/19/2009 1:50 PM, Matt Hoffman wrote:
> > > I mean, I know which line the code is breaking on. How do I find out
> > which
> > > part of the line (m_pVehicles, or the Update, or gpGlobals, or
> Frametime
> > or
> > > m_Controls, etc) is causing the problem? Or is it caused by the entire
> > line?
> > > Or is there not enough information provided by the engine/crash to help
> > me
> > > here?
> > >
> > >
> > >
> > > On Sun, Jul 19, 2009 at 11:44 AM, Yorg Kuijs<[email protected]>
>  wrote:
> > >
> > >> Ehm the pointer itself would be the null pointer?
> > >> So m_pVehicle is a NULL pointer, not enough to know when or how the
> > >> pointer should get something to point to though.
> > >>
> > >> Matt Hoffman wrote:
> > >>> How do I find which part of that line points to a NULL-pointer?
> > >>>
> > >>> On Sun, Jul 19, 2009 at 11:23 AM, Alexander Hirsch<
> > >> [email protected]>wrote:
> > >>>
> > >>>> Whatever line it is pointing at, that line contains an access to a
> > >>>> NULL-pointer ("Access violation reading location 0x00000000").I have
> > too
> > >>>> little information to find out how to fix that.
> > >>>>
> > >>>> That CXX0030-error could just be because of insufficient
> > >> debug-information
> > >>>> and code-optimazations.
> > >>>>
> > >>>> On Sun, Jul 19, 2009 at 8:08 PM, Matt Hoffman
> > >>>> <[email protected]>wrote:
> > >>>>
> > >>>>
> > >>>>> It crashes at
> > >>>>>
> > >>>>> m_pVehicle->Update( gpGlobals->frametime, m_controls);
> > >>>>>
> > >>>>> in fourwheelvehiclephysics.cpp, with the error: "Unhandled
> exception
> > at
> > >>>>> 0x0e60f730 in hl2.exe: 0xC0000005: Access violation reading
> location
> > >>>>> 0x00000000."
> > >>>>>
> > >>>>> However, I'm not sure/can't find what is actually crashing. If I
> look
> > >>>>>
> > >>>> under
> > >>>>
> > >>>>> gpGlobals>CGlobalVarBase>pSaveData, I find several red X's  saying
> > >>>>> "CXX0030:
> > >>>>> Error: expression cannot be evaluated". I'd say this would be my
> > >> problem,
> > >>>>> but I haven't touched anything to do with save data and normal maps
> > >> don't
> > >>>>> crash, just ones with my Jetski in them... So now I'm throughly
> > >> confused.
> > >>>>> :D
> > >>>>>
> > >>>>> On Sun, Jul 19, 2009 at 10:54 AM, Alexander Hirsch<
> > >>>>>
> > >>>> [email protected]
> > >>>>
> > >>>>>> wrote:
> > >>>>>>
> > >>>>>> Yes, just wait for the crash and analyze it in the debugger.
> > >>>>>>
> > >>>>>> On Sun, Jul 19, 2009 at 7:46 PM, Matt Hoffman
> > >>>>>> <[email protected]>wrote:
> > >>>>>>
> > >>>>>>
> > >>>>>>> I guess maybe the question was of how to debug it. Build it in
> > Debug
> > >>>>>>> Config,
> > >>>>>>> and then put a breakpoint...where? Or just wait until it crashes
> > and
> > >>>>>>>
> > >>>>> then
> > >>>>>
> > >>>>>>> step through?
> > >>>>>>>
> > >>>>>>> /me is new to debugging something this big.
> > >>>>>>>
> > >>>>>>> On Sun, Jul 19, 2009 at 10:04 AM, Alexander Hirsch<
> > >>>>>>>
> > >>>>>> [email protected]
> > >>>>>>
> > >>>>>>>> wrote:
> > >>>>>>>>
> > >>>>>>>> Not having it client-side produces an error, not a crash
> > >>>>>>>>
> > >>>>> though.What's
> > >>>>>
> > >>>>>>>> wrong
> > >>>>>>>> with crashing while it loads? Debugging should work regardless
> of
> > >>>>>>>>
> > >>>> the
> > >>>>
> > >>>>>>>> game-state :S
> > >>>>>>>>
> > >>>>>>>> On Sun, Jul 19, 2009 at 6:59 PM, Matt Hoffman
> > >>>>>>>> <[email protected]>wrote:
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>> I'm trying to resurrect the Jetski from the HL2 Beta. I found
> the
> > >>>>>>>>> serverside
> > >>>>>>>>> file still shipping with Ep2's Mod code so I figured I'd give
> it
> > >>>>>>>>>
> > >>>> a
> > >>>>
> > >>>>>>> shot.
> > >>>>>>>
> > >>>>>>>> I
> > >>>>>>>>
> > >>>>>>>>> got the code to compile, but now it crashes the map if I start
> > >>>>>>>>>
> > >>>> with
> > >>>>
> > >>>>> a
> > >>>>>
> > >>>>>>>>> prop_vehicle_jetski in it. (Added a FGD entry based off the
> > >>>>>>>>>
> > >>>>> Airboat,
> > >>>>>
> > >>>>>>> uses
> > >>>>>>>
> > >>>>>>>>> the Airboat's model). So now my question is, how do I debug
> this
> > >>>>>>>>>
> > >>>>>> crash
> > >>>>>>
> > >>>>>>>>> (Memory could not be read) when it happens on load time? Or
> > >>>>>>>>>
> > >>>> should
> > >>>>
> > >>>>> I
> > >>>>>
> > >>>>>> go
> > >>>>>>
> > >>>>>>>>> about spawning the entity a different way that might be more
> > >>>>>>>>>
> > >>>> prone
> > >>>>
> > >>>>> to
> > >>>>>
> > >>>>>>>>> letting me debug?
> > >>>>>>>>>
> > >>>>>>>>> Also I assume not having a client-side file is going to be bad?
> > >>>>>>>>>
> > >>>>> (And
> > >>>>>
> > >>>>>>> may
> > >>>>>>>
> > >>>>>>>> be
> > >>>>>>>>
> > >>>>>>>>> the source of my crashes even?)
> > >>>>>>>>> _______________________________________________
> > >>>>>>>>> To unsubscribe, edit your list preferences, or view the list
> > >>>>>>>>>
> > >>>>>> archives,
> > >>>>>>
> > >>>>>>>>> please visit:
> > >>>>>>>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >>>>>>>>>
> > >>>>>>>>>
> > >>>>>>>>>
> > >>>>>>>> _______________________________________________
> > >>>>>>>> To unsubscribe, edit your list preferences, or view the list
> > >>>>>>>>
> > >>>>> archives,
> > >>>>>
> > >>>>>>>> please visit:
> > >>>>>>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>> _______________________________________________
> > >>>>>>> To unsubscribe, edit your list preferences, or view the list
> > >>>>>>>
> > >>>> archives,
> > >>>>
> > >>>>>>> please visit:
> > >>>>>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>> _______________________________________________
> > >>>>>> To unsubscribe, edit your list preferences, or view the list
> > archives,
> > >>>>>> please visit:
> > >>>>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>> _______________________________________________
> > >>>>> To unsubscribe, edit your list preferences, or view the list
> > archives,
> > >>>>> please visit:
> > >>>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>> _______________________________________________
> > >>>> To unsubscribe, edit your list preferences, or view the list
> archives,
> > >>>> please visit:
> > >>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >>>>
> > >>>>
> > >>>>
> > >>> _______________________________________________
> > >>> To unsubscribe, edit your list preferences, or view the list
> archives,
> > >> please visit:
> > >>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >>>
> > >>>
> > ------------------------------------------------------------------------
> > >>>
> > >>>
> > >>> Internal Virus Database is out of date.
> > >>> Checked by AVG - www.avg.com
> > >>> Version: 8.5.375 / Virus Database: 270.13.11/2232 - Release Date:
> > >> 07/11/09 17:56:00
> > >>>
> > >>
> > >> _______________________________________________
> > >> To unsubscribe, edit your list preferences, or view the list archives,
> > >> please visit:
> > >> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >>
> > >>
> > > _______________________________________________
> > > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >
> >
> > --
> > Jeffrey "botman" Broome
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to