Alfred,

I'm maintaining my own player structure with information relevant to what
i'm doing.  m_pEdict is a pointer to the players edict.  I pass this
structure to all my functions rather than something like CBaseEntity or
CBasePlayer because it contains the information I need, and when I need the
players edict for engine functions I just use that.

The pointer goes bad right after I create a thread, but only when a user
uses reconnect.  With retry, the pointer is still valid after creating my
thread.  At any rate i'm sure that this is related to reconnect skipping ths
authentication process.  By no longer threading disconnections the problem
disappears.

James


----- Original Message -----
From: "Alfred Reynolds" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 15, 2003 10:47 AM
Subject: RE: [hlcoders] client 'reconnect' results in segfault, 'retry' does
not


> The only real difference between the two is that retry will reauthenticate
> the users whereas reconnect skips this process and goes straight to
putting
> the client in the server (and it only works on clients that have already
> been authenticated).
>
> Where is m_pEdict comming from? You are getting that error because the
edict
> pointer it outside of the in memory list of entities.
>
> - Alfred
>
> James Couzens wrote:
> > does not
> >
> >
> > Botman,
> >
> > Yes, all actions happen through a single thread.  And as I mentioned,
> > if the client uses "retry" everything is fine.  100% of the time,
> > when a client uses "reconnect" instead.  The problem is definately
> > related to the thread however.  Just strange how retry would not
> > cause a problem and reconnect would.
> >
> > If anyone does happen to know (*cough* alfred *cough) the difference
> > between reconnect and retry it would be nice to at least understand
> > why 'reconnect' will poop when using threads.
> >
> > James
> >
> >
> > ----- Original Message -----
> > From: "botman" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, August 15, 2003 5:44 AM
> > Subject: Re: [hlcoders] client 'reconnect' results in segfault,
> > 'retry' does not
> >
> >
> >>> Keeping in mind I am using threads, and doing a few other
> >>> non-standard things.  I am locking mutex appropriately, and as I
> >>> said, when users use retry all is fine.
> >>
> >> You're not calling any Half-Life engine functions inside your
> >> threads are you?
> >>
> >> If you are, that could account for the crashing problem. The
> >> Half-Life engine does not support threads and is not thread safe.
> >> If you are doing engine accesses and you still want to use threads,
> >> make sure ALL engine accesses occur from within a single thread.
> >>
> >> 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
>
>
>


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to