Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 13420
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: bugs-owner@abisource.com
Hardware:
OS:
Version:
Priority:
Severity:
Target Milestone:
Reporter: Carlos Garnacho <carlos@lanedo.com>
Add CC:
CC:
QA Contact:
URL:
Summary:
Status Whiteboard:
Keywords:

Attachment Type Creator Created Size Flags Actions
Fix confusion between memory allocators patch Carlos Garnacho 2012-10-10 12:41 944 bytes jean.brefort: pass+
Details | Diff
Finish introspection support patch Carlos Garnacho 2012-10-10 12:45 5.60 KB none Details | Diff
Install fix patch Daniel Drake 2012-10-12 19:04 1.14 KB none Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 13420 depends on: Show dependency tree
Show dependency graph
Bug 13420 blocks:

Additional Comments:







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2012-10-10 12:36
I'm attaching two patches that make AbiWidget usable from bindings, most of the
changes are on API documentation comments. Only two lines of code had to
change, provided as a separate patch

------- Comment #1 From Carlos Garnacho 2012-10-10 12:41:26 -------
Created an attachment (id=5620) [details]
Fix confusion between memory allocators

The string returned by those functions is documented as g_free-able, and
gobject-introspection also really expects gchar* to be malloc()'ed. So this
avoids memory corruptions if used from bindings

------- Comment #2 From Carlos Garnacho 2012-10-10 12:45:18 -------
Created an attachment (id=5621) [details]
Finish introspection support

This patch includes gtk-doc fixes and makes sure all relevant API calls are
introspected, a python override file is also included to have libabiword_init()
called implicitly

------- Comment #3 From Daniel Drake 2012-10-12 19:04:20 -------
Created an attachment (id=5622) [details]
Install fix

That last patch wasn't quite working on build systems where the install root is
not / (which is what happens for Fedora builds), since it tries to install to
/. Here is a fix that should probably be rolled in.

------- Comment #4 From Daniel Drake 2012-10-12 19:11:47 -------
The Abi.py overrides segfaults when Abi.init(sys.argv) is executed.

gdb shows that argc is definitely wrong (thats a lot of args!)

#0  0x41fdcdc4 in g_option_context_parse () from /lib/libglib-2.0.so.0
#1  0xb747d24c in AP_Args::parseOptions (this=0xbfff8a84) at ap_Args.cpp:146
#2  0xb72d7868 in libabiword_init (argc=137504704, argv=0x83227c8)
    at ../src/wp/main/gtk/libabiword.cpp:45
#3  0x420d361a in ffi_call_SYSV () from /lib/libffi.so.5
#4  0x420d3381 in ffi_call () from /lib/libffi.so.5

A workaround is to use Abi.init_noargs() in the override. Then the segfault is
gone.

Carlos suggested that GTK+ does something similar in its overrides - maybe
there is a good reason for this.

------- Comment #5 From Jean Brefort 2013-01-02 13:03:56 -------
(From update of attachment 5620 [details])
Trivial patch, please commit

------- Comment #6 From Hubert Figuière 2013-02-07 05:19:36 -------
(In reply to comment #5)
> (From update of attachment 5620 [details] [details])
> Trivial patch, please commit
> 

Need the same fix in the gtk2 version of the widget. Will commit both.

------- Comment #7 From Hubert Figuière 2013-02-20 01:41:55 -------
Committed all three:

trunk@32652
trunk@32662
trunk@32663

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug