Segfault on startup found

Subject: Segfault on startup found
From: sam th (
Date: Sat May 27 2000 - 16:18:23 CDT

Hash: SHA1

Recently, Joaquin reported a problem with AbiWord crashing on startup.
This happens to me too, so after a little fun with GDB and Bonsai, I
figured out what happend, and who was to blame. :-)

What happens is that in XAP_UnixFrame::_fe::focus_in_event()
there is a call to pFrame->getCurrentView(). Except, as this GDB output
shows, it doesn't exist.

(gdb) print *pFrame VVVVVVVVVVVVVV
$2 = {<XAP_Frame> = {m_app = 0x82c7198, m_pDoc = 0x831c120, m_pView = 0x0,
    m_pViewListener = 0x0, m_lid = 4294967295, m_pScrollObj = 0x0,
Now, this function was written by hj, and commited by Martin, and hasn't
been revised since. (Joaquin's changes are just indentation.)

Adding the following guard:

                return FALSE;

before both line 45 and line 63 (where the same problem exists) seems to
eliminate the problem. The return value is always false anyway, so that
isn't a problem. If no one objects, I'll just commit that change. It
probably isn't the right solution, but it's better than crashing.

                                     sam th
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see


This archive was generated by hypermail 2b25 : Sat May 27 2000 - 16:18:28 CDT