Max
I believe TEST TWO END might also have go through fine. The message just
wasn't printed out. Segfault does it -- it eats up some of the messages in
the out stream buffer. You can get all the outputs in gdb though.
>From the stack you provided yesterday, the segfault signal happened when the
Workplace info is received by the client.It's the second message received
from the server when you login. When I ran gdb, I created a breakpoint at
*
b AsioClient.cpp:176*
and then looked at the value in current
*p current *
after the statement
char* current = m_input_buffer;
The first one, "LS\n", was fine. The second one, "WL \n", I felt may be
carrying junk characters. So tried to set it zero.
Thanks
Naveen
On Wed, Jun 23, 2010 at 11:01 AM, Max Bossino <m...@miragroupware.org> wrote:
> Hi Naveen,
>
> On 23 Jun 2010, at 06:44, naveen akarapu wrote:
>
> > I think replacing the line AsioClient:48:
> >
> > *m_input_buffer = '\0';
> >
> > with
> >
> > memset(m_input_buffer, '\0', INPUT_BUFFER_SIZE);
> >
> > might fix your segfault. Let me know if it works.
>
> I tried this, but I'm afraid it doesn't work. I made the change you
> suggested above. I also changed the first reference to front() in
> AsioClient::receive to:
>
> ------
> cout << "TEST ONE START" << endl;
> cout << "IN: " << (m_message_queue.front()) << endl;
> cout << "TEST ONE END" << endl;
> ------
>
> Finally, I also changed the second reference to front() to:
>
> ------
> cout << "TEST TWO START" << endl;
> Msg::Parse( m_message_queue.front() );
> cout << "TEST TWO END" << endl;
> ------
>
> When I ran Mira Client, this is the output I received. The way I used it
> was that, after starting the application, I first created a new user, and
> then I tried logging in with this new user account. Mira Client quit after
> logging in:
>
> ------
> $ ./mira_client
> FilesUtility Loaded
> 127.0.0.1
> adding to buffer...
> bytes_transferred: 11
> TEST ONE START
> IN: UA 3 test7
> TEST ONE END
> TEST TWO START
> TEST TWO END
> 127.0.0.1
> adding to buffer...
> bytes_transferred: 3
> TEST ONE START
> IN: LS
> TEST ONE END
> TEST TWO START
> Segmentation fault
> ------
>
> Notice how 'TEST TWO END' is processed successfully the first time, when
> the user is created, but not the second time, when I log in. Could it be a
> problem with Msg::Parse?
>
> Regards,
>
> Max Bossino
> Project Manager
> http://miragroupware.org
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Mira-development mailing list
> Mira-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mira-development
>
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Mira-development mailing list
Mira-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mira-development