HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A clue: mailer died with signal 13



Hi again Eloy,

Firstly C++ 101:  new is like malloc but generates new objects in memory
rather than raw memory. delete is like free but deletes objects rather than
raw memory.

Its a bit more complicated than that, but anyway.....

>static void cleanup()
>{
>    faxMailApp* a = app;
>    app = NULL;
>    delete a;
>}
...
>As I said before, I know very little about C++ and I don't know what
>"delete a" does in cleanup(), but commenting out this line solves the
>problem and faxmail does not crash anymore and everything works _like a
>charm_.

The delete statement could cause a sigsegv in two ways, by freeing memory
it didnt own ie 'a' is NULL or something in the objects destructor which is
implicitly called.

Looking at the faxMailApp destructor:
faxMailApp::~faxMailApp()
{
    delete client;
    for (u_int i = 0, n = tmps.length(); i < n; i++)
        Sys::unlink(tmps[i]);
}      
client is pointing to an object of type MySendFaxClient(hopefully it is
_not_ NULL)

MySendFaxClient::~MySendFaxClient() {}

no sigsegv there!! , unlink might also do weird stuff if passed a bad
parameter.

PS I might have missed something else obvious in the above but anyway
theres a start!!

PPS Is that rockwell the chip maker you work for?

- Robert

>My working environment is this:
>
>Debian GNU/Linux 2.0
>gcc 2.7.2.3
>g++ from egcs-2.90.27 (not from gcc)
>glibc2 2.0.7pre1
>libg++272
>libstdc++2.8
>
>Please note that I had to apply Robert Colquhoun's patch
>(http://www.trump.net.au/~rjc/hylafax/) to be able to compile HylaFAX 2.0p4
>with egcs.
>
>Someone said that this problem has been mentioned in the list before so I
>guess I am not the only one that was getting the mysterious "mailer died
>with signal 13" problem. I hope that a solution can be found now.
>
>Thanks a lot to those who replied. And thanks in advance to the C++ gurus
>that will (hopefully) expand this further.
>
>E.-
>
>
>--
>

>Eloy A. Paris
>Information Technology Department
>Rockwell Automation de Venezuela
>Telephone: +58-2-9432311 Fax: +58-2-9431645 Cel.: +58-16-234700
>
>"Where does this path lead?" said Alice
>"Depends on where you want to go."  Said the cat
>("Alice in Wonderland", by Lewis Carroll.)
> 




Project hosted by iFAX Solutions