From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 27803 invoked from network); 13 Nov 1998 19:18:52 -0000 Received: from mail.redhat.com (199.183.24.239) by mail2.redhat.com with SMTP; 13 Nov 1998 19:18:52 -0000 Received: from druid.inprise.com (druid.inprise.com [143.186.11.70]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id OAA04466 for ; Fri, 13 Nov 1998 14:18:51 -0500 Received: from godzilla.inprise.com (mail.inprise.com [10.186.1.4]) by druid.inprise.com (8.8.8+Sun/8.8.7) with ESMTP id LAA07332 for ; Fri, 13 Nov 1998 11:17:23 -0800 (PST) Received: from inprise.com ([143.186.90.116]) by godzilla.inprise.com (Netscape Messaging Server 3.6) with ESMTP id AAA55B1; Fri, 13 Nov 1998 11:17:20 -0800 Message-ID: <364C85B9.5DC8AD59@inprise.com> Date: Fri, 13 Nov 1998 11:17:14 -0800 From: "Nicholas Sallembian" Organization: Inprise Corporation X-Mailer: Mozilla 4.05 [en] (WinNT; U) MIME-Version: 1.0 To: beww@intac.com CC: axp-list@redhat.com Subject: Re: Any C++ on Alpha gfurus out there? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Try this code : const char * EV_UnixMenu::_getItemPath(AP_Menu_Id id) const { for (UT_uint32 k=0; (k < m_nrActualFactoryItems); k++) { _wd * wd = (_wd *)m_menuFactoryItems[k].callback_action; if (wd) if (wd->m_id==id) return m_menuFactoryItems[k].path; } There might be a problem in the order the if expression is evaluated : if wd is NULL and wd->m_id is evaluated first... Crash ! Nicolas Brian E.W. Wood wrote: > I'm trying to compile the most recent versions of AbiWord, a promising project > to create a GPL wysiwyg word processor. > > As of recent versions is has stopped working on my Alpha. It apparently > comtinues to run on Intel machines. > > I'm definitely not a C++ programmer, but I'd like to try and find out what has > happened. > > The program segfaults on the following bit of code: > > const char * EV_UnixMenu::_getItemPath(AP_Menu_Id id) const > { > for (UT_uint32 k=0; (k < m_nrActualFactoryItems); k++) > { > _wd * wd = (_wd *)m_menuFactoryItems[k].callback_action; > if (wd && (wd->m_id==id)) > return m_menuFactoryItems[k].path; > } > > GDB says it segfaults at the if statement. > > UT_uint32 is defined in the header file: > > protected: > UT_uint32 m_nrActualFactoryItems; > UT_Vector m_vecMenuWidgets; > > I realize that this is woefully inadequate information with which to diagnose > the problem but I'm hoping somebody might have an inspired guess as to what > direction I should proceed in. is the uint32 perhaps a problem on the alpha? > > Thanks. > > --- > Brian E.W. Wood beww@intac.com > > -- > To unsubscribe: send e-mail to axp-list-request@redhat.com with > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com