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.
|
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)
|
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.
|
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.
|
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.
|
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?
|
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)
|
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]
|
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
|
Wed 30 Apr 2008 07:28:14 PM UTC, original submission:
|