bugBeaver - Bugs: bug #23124, Segmentation fault when starting...

 
 

bug #23124: Segmentation fault when starting Beaver 0.3.0 and Beaver 0.3.1

Submitted by:  Double 12 <double12>
Submitted on:  Wed 30 Apr 2008 07:28:14 PM UTC  
 
Category: NoneSeverity: 4 - Important
Priority: 7 - HighItem Group: None
Status: FixedPrivacy: Public
Assigned to: Double 12 <double12>Open/Closed: Closed
Release: NoneReproducibility: Every Time
Size (loc): NonePlanned Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 08 Jun 2008 11:54:13 AM UTC, comment #9:

Nice patch, pango_description_free(desc) actually works!
I hope you can join the development team soon.

Double 12 <double12>
Project MemberIn charge of this item.
Sun 08 Jun 2008 09:50:13 AM UTC, comment #8:

I just quickly looked over the code the other day and fixed the problem. Because there are so little comments, I just removed the code. ^^

If you still want the possibility to change the font, this patch should also fix the problem. pango objects must be freed with the special functions, they can't be freed by g_free.

(file #15815)

Tobias Heinzen <teal>
Project Member
Sat 07 Jun 2008 09:44:27 PM UTC, comment #7:

UPDATE: there's even another segfault in prefs.c:
g_free(desc) in function apply_font

But if we remove the Pango object code from prefs.c, it is not possible anymore to set a certain font or view a font in the preview box.
So there are two possibilities:
1. Leave the Pango object code and just remove the g_free call
2. Remove the Pango object code and remove the possibility to choose a font from the program. Standard (and only) font will be Arial.

I'd say we choose option 2! It keeps the program simple, avoids memory leaks and makes the program a little bit faster.

Double 12 <double12>
Project MemberIn charge of this item.
Sat 07 Jun 2008 09:23:26 PM UTC, comment #6:

Err...the Pango object is not for fixing some font problems.
It changes the font used in the editor to Courier :P

I removed the Pango object code (as in your patch). Now the font in the editor is Arial instead of Courier. But actually Arial looks much better, so I think we'll just leave it this way :) Plus there's no leakage of memory.

Double 12 <double12>
Project MemberIn charge of this item.
Sat 07 Jun 2008 05:42:08 PM UTC, comment #5:

Well I did not see any purpose for the pango objects. Probably they're there to fix some font problems, but I'm not sure. Also I'm not a big fan of memory leaks ^^

If you guys need any help, let me know. I like the project and I was in need of a small editor. I've got some great ideas (or at least I think) too, so just send me a mail or so.

Tobias Heinzen <teal>
Project Member
Sat 07 Jun 2008 04:27:33 PM UTC, comment #4:

@teal: Thank you for supplying this patch!

I found exactly the same g_free() calls that caused the segfault. You couldn't know this (it was discussed on the mailinglist), but we are going to release a small bugfix release based on Beaver 0.3.0, including:
- Solving segfaults by removed g_free() calls
- Adding Python syntax highlighting
- Using new AboutWindow.
Future versions will be based on 0.3.0 instead of 0.3.1, because our program has less dependencies then.

By the way: I just removed the g_free() calls that free a pointer, you also removed the creation of the pointer.
Is this necesssary, or is just removing the g_free() call also right?

Double 12 <double12>
Project MemberIn charge of this item.
Sat 07 Jun 2008 10:23:09 AM UTC, comment #3:

The attached patch solved the problem for me (Ubuntu 8.04). The patch is for the downloaded source code (beaver-0.3.1) from the homepage, with -DGTK_ENABLE_DEPRECATED activated.

Patch should be tested for other distribution as well if some other bugs will occur.

(file #15806)

Tobias Heinzen <teal>
Project Member
Thu 01 May 2008 05:58:07 PM UTC, comment #2:

Ubuntu just says "segmentation fault".
Zenwalk is more descriptive:
[code]*** glibc detected *** beaver: free(): invalid pointer: 0x080b6f80 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7876bcd]
/lib/libc.so.6(cfree+0x90)[0xb787a350]
/usr/lib/libglib-2.0.so.0(g_free+0x2c)[0xb798c53c]
beaver[0x805ea79][/code]

Double 12 <double12>
Project MemberIn charge of this item.
Wed 30 Apr 2008 07:34:15 PM UTC, comment #1:

Beaver 0.3.0 and Beaver 0.3.1 give a segmentation fault when starting the program. The program just doesn't start.

We need to fix this, it may seriously harm the popularity of Beaver, as seen here, for example:
http://bugs.gentoo.org/show_bug.cgi?id=189353

Double 12 <double12>
Project MemberIn charge of this item.
Wed 30 Apr 2008 07:28:14 PM UTC, original submission:
Double 12 <double12>
Project MemberIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #15815:  beaver-0.3.1-font_fix.patch added by teal (2KiB - text/x-diff - fixes pango free problem)
file #15806:  beaver-settings_fix.patch added by teal (2KiB - text/x-diff - fixes segfaults on Ubuntu 8.04)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by enygmata (Updated the item)
  • -unavailable- added by teal (Updated the item)
  • -unavailable- added by aelthwin (Updated the item)
  • -unavailable- added by double12 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 17 Feb 2009 07:13:08 PM UTCenygmataOpen/ClosedOpen=>Closed
    Mon 14 Jul 2008 08:49:48 PM UTCdouble12StatusReady For Test=>Fixed
    Sun 08 Jun 2008 10:29:00 AM UTCdouble12StatusNone=>Ready For Test
      Assigned toaelthwin=>double12
    Sun 08 Jun 2008 09:50:13 AM UTCtealAttached File-=>Added beaver-0.3.1-font_fix.patch, #15815
    Sat 07 Jun 2008 10:23:09 AM UTCtealAttached File-=>Added beaver-settings_fix.patch, #15806
    Fri 02 May 2008 09:45:42 AM UTCdouble12Assigned todouble12=>aelthwin
    Thu 01 May 2008 04:29:44 PM UTCaelthwinAssigned toNone=>double12
    Wed 30 Apr 2008 07:34:15 PM UTCdouble12ReproducibilityNone=>Every Time

    Back to the top


    Powered by Savane 3.1-cleanup1