Attached is a new bt after updating to latest Free Pascal version 2.6.4. I also tested returning a simple string and that works OK just like integer.
Shared library was compiled with {$OPTIMIZATION OFF} and {$DEBUGINFO ON} switches and hopefully it may give some new clues? Are there any other tests I can run that may reveal helpfull information? PS: Free Pascal source code included just for reference. /CJ
... root@VB-Xubuntu-1404:/home/christer/Documents/Gambas 3/Projects/libtest# gdb gbx3 GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from gbx3...done. (gdb) run Starting program: /usr/bin/gbx3 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". 9 Program received signal SIGSEGV, Segmentation fault. 0xb5e8f97c in LIBVERSION (result=<error reading variable: Cannot access memory at address 0x30>) at /home/christer/Documents/Free Pascal/Projects/lib_snap/test.pas:32 32 LIBVersion:=VERSION; (gdb) bt #0 0xb5e8f97c in LIBVERSION (result=<error reading variable: Cannot access memory at address 0x30>) at /home/christer/Documents/Free Pascal/Projects/lib_snap/test.pas:32 #1 0xb7f573c6 in ffi_call_SYSV () from /usr/lib/i386-linux-gnu/libffi.so.6 #2 0xb7f5714b in ffi_call () from /usr/lib/i386-linux-gnu/libffi.so.6 #3 0x08077a29 in EXTERN_call () at gbx_extern.c:390 #4 0x0807d68e in EXEC_loop () at gbx_exec_loop.c:1210 #5 0x08051015 in EXEC_function_loop () at gbx_exec.c:907 #6 0x0805164e in EXEC_function_real () at gbx_exec.c:871 #7 0x080522f6 in EXEC_public_desc (class=0x81130fc, object=0x81945ac, desc=0x8193244, nparam=0) at gbx_exec.c:1584 #8 0x080656a6 in raise_event (observer=observer@entry=0x81945ac, object=object@entry=0x81945ac, func_id=153, func_id@entry=154, nparam=0) at gbx_api.c:816 #9 0x08067064 in GB_Raise (object=0x81945ac, event_id=21, nparam=0) at gbx_api.c:952 #10 0xb71feb59 in gb_raise_window_Open (sender=0x8194650) at CWindow.cpp:70 #11 0xb71ddeec in gControl::emit (this=0x8194650, signal=0xb71feb26 <gb_raise_window_Open(gMainWindow*)>) at gcontrol.cpp:1654 #12 0xb71ed61c in gMainWindow::emitOpen (this=0x8194650) at gmainwindow.cpp:476 #13 0xb71ed98d in gMainWindow::setVisible (this=0x8194650, vl=true) at gmainwindow.cpp:506 #14 0xb71ffdc1 in gControl::show (this=0x8194650) at gcontrol.h:154 #15 0x08051d39 in EXEC_native () at gbx_exec.c:1334 #16 0x080522b6 in EXEC_public_desc (class=0x81130fc, object=0x0, desc=0xb7230764 <CFormDesc+72>, nparam=0) at gbx_exec.c:1574 #17 0x0804b4aa in main (argc=1, argv=0xbffff094) at gbx.c:391 (gdb) ...
test.pas
Description: Binary data
------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft
_______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user