SEGV during file IO

Neil Williams linux at codehelp.co.uk
Fri Oct 14 18:20:35 EDT 2005


On Friday 14 October 2005 10:57 pm, Chris Shoemaker wrote:
> Currently, it seems that any file open or save causes SEGV.

:-(

Nothing like that from this end. Anyone else?

Do the tests in src/backend/file operate successfully? (All are now fixed).

> Crash is in gnc_should_log.  It seems that log_module is not
> a valid (char *) but instead has value 0xa.

In which source file?
 
> But, this doesn't seem to happen until file backend module is loaded.

I haven't had any seg faults with the problem with the business file backend 
handlers but I have now fixed that problem locally.

(Thereagain, I'm still with the build as of my last commit, I haven't had time 
to update today's changes.)

The simple fix for the business file handlers is to simply comment out the 
lines in gncmod-business-backend-file.c that try to load (the non existent) 
file backend gnc_module using guile (it's now a GModule, loaded separately).

/*
  file = gnc_module_load("gnucash/backend/file", 0);
  if(!file) {
    gnc_module_unload (bus_core);
    return FALSE;
  }
*/

It would be wise to also comment out the unload code too:

/*
  if (file)
    unload = gnc_module_unload(file);
*/

Note: the gnc-backend-file is loaded automatically, the business file handlers 
and the business objects are still loaded using Guile in gnucash. I have a 
method without guile for cashutil, however the business objects and business 
file handlers remain a separate shared library (but not a module) in 
cashutil. It remains possible to use this method in gnucash and allow an 
optional build without the business code.

I've got a much more robust and suitable fix that checks that other things are 
in place before assuming the file backend exists (!) but that may be suitable 
for your immediate problems.

Unfortunately, the current commit process is too involved for me to start it 
at this time of night and paid employment means it's unlikely to get into CVS 
until probably Sunday.

-- 

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20051014/8deafd0c/attachment.bin


More information about the gnucash-devel mailing list