|
From: Gregory N. <gre...@gm...> - 2009-08-04 18:43:01
|
I'm using Visual C++ 2008. I've found the problem in
SMOnlineRoom::UpdateClients().
do
{
//As long as we keep getting data from the socket, keep processing it
length = m_clients[x]->Update(m_packet);
if (length > 0)
ParseData(m_packet, x);
//Check for NULL incase the client switched rooms
} while ((length > 0) && (m_clients[x]));
If the client switched rooms, then m_clients[x] no longer refers to the
client it used to, and in the case of only one client in the vector or the
client being the last element of the vector, x is out-of-bounds. It's not
surprising that it does bounds-checking in a debug build, but apparently it
does it even in the release build.
To fix, I've replaced the loop condition with
} while ((length > 0) && (x < m_clients.size()) && (m_clients[x]));
It appears to work now.
On Mon, Aug 3, 2009 at 1:36 PM, Charles Lohr <ch...@cn...> wrote:
> 1) What compiler are you using for it?
> 2) Uninitialized values changed behavior between VC6 and all .NET
> MSVC's. Using Valgrind in Linux should be able to point the problem out
> instantly.
> 3) Debugger and see where it's crashing?
>
> Charles
>
>
> Gregory Najda wrote:
> > On Windows, the version in the CVS crashes a couple seconds after I
> > create a room. So does the 2.5rc2 source code in the sourceforge
> > release. The precompiled 2.5rc2 Windows release works fine, however.
> > Any idea what the deal with that is?
> >
> > On Mon, Jul 27, 2009 at 6:00 PM, Josh <axl...@gm...
> > <mailto:axl...@gm...>> wrote:
> >
> > The old (stable) version is in the CVS.
> > The new unfinished version is in SVN.
> >
> > Gregory Najda wrote:
> > > Where can I find the code for the stable version that's currently
> > > running on smonline.us <http://smonline.us>
> > <http://smonline.us>? What I am most interested
> > > in is extending the protocol so that more than just artist,
> > title, and
> > > subtitle is used to identify which stepfile to use. I'd like to get
> > > this change implemented on what the server actually runs and in
> > the SM
> > > client relatively soon so that players can benefit from it, without
> > > having to finish up the new SMO version first.
> > >
> >
> ------------------------------------------------------------------------
> > >
> > >
> >
> ------------------------------------------------------------------------------
> > >
> > >
> >
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > Smonline-devs mailing list
> > > Smo...@li...
> > <mailto:Smo...@li...>
> > > https://lists.sourceforge.net/lists/listinfo/smonline-devs
> > >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports
> > 2008 30-Day
> > trial. Simplify your report design, integration and deployment -
> > and focus on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now. http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > Smonline-devs mailing list
> > Smo...@li...
> > <mailto:Smo...@li...>
> > https://lists.sourceforge.net/lists/listinfo/smonline-devs
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> > trial. Simplify your report design, integration and deployment - and
> focus on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now. http://p.sf.net/sfu/bobj-july
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Smonline-devs mailing list
> > Smo...@li...
> > https://lists.sourceforge.net/lists/listinfo/smonline-devs
> >
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Smonline-devs mailing list
> Smo...@li...
> https://lists.sourceforge.net/lists/listinfo/smonline-devs
>
|