errors on loadnet / savenet

Help
BrettC
2007-08-19
2013-04-16
  • BrettC

    BrettC - 2007-08-19

    Any ideas why a file that calls PNL High loadnet / savenet will crash when the script/program is finished?  The script/program will complete, but will not exit gracefully.  I see this both with pnl scripts and using python wrappers of PNL.  This occurs with gcc 4.1.2, iirc it also happened with gcc 3.4.

    For example, contents of PNL/high/examples/Tests/saveload.pnl are:

    clear()
    loadnet("alarm.xml")
    savenet("net.xml")
    comparefiles("alarm.xml", "net.xml", "save\load")

    This script will crash every time, unless both loadnet and savenet lines are removed (neither clear nor comparefiles cause problems):

    brett@brett-noX:~/documents/PNL/PNL/high/examples/Tests$ example -s saveload.pnl

    Execution of script from 'saveload.pnl':

    save\load: Ok

    End of script
    *** glibc detected *** example: free(): invalid pointer: 0xb7cb8d64 ***
    ======= Backtrace: =========
    /lib/tls/i686/cmov/libc.so.6[0xb79d87cd]
    /lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb79dbe30]
    /usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb7b99d11]
    /usr/local/lib/libhigh-0.2.so.23(_ZN4pnlw12PersistSSMapD0Ev+0x35)[0xb7c61ec5]
    /usr/local/lib/libpnl-0.2.so.23(_ZN3pnl15CPersistenceZooD1Ev+0x3f)[0xb7efe17f]
    /usr/local/lib/libpnl-0.2.so.23[0xb7efe1f9]
    /lib/tls/i686/cmov/libc.so.6(__cxa_finalize+0xa9)[0xb799dcc9]
    /usr/local/lib/libpnl-0.2.so.23[0xb7d51473]
    /usr/local/lib/libpnl-0.2.so.23[0xb7f6816c]
    /lib/ld-linux.so.2[0xb7ff09ee]
    /lib/tls/i686/cmov/libc.so.6(exit+0xe9)[0xb799d9d9]
    /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe4)[0xb7986ec4]
    example(__gxx_personality_v0+0xed)[0x804e2f1]
    ======= Memory map: ========
    08048000-080b1000 r-xp 00000000 08:01 113365     /usr/local/bin/example
    080b1000-080b3000 rw-p 00069000 08:01 113365     /usr/local/bin/example
    080b3000-080d4000 rw-p 080b3000 00:00 0          [heap]
    b7800000-b7821000 rw-p b7800000 00:00 0
    b7821000-b7900000 ---p b7821000 00:00 0
    b796f000-b7971000 rw-p b796f000 00:00 0
    b7971000-b7aac000 r-xp 00000000 08:01 567748     /lib/tls/i686/cmov/libc-2.5.so
    b7aac000-b7aad000 r--p 0013b000 08:01 567748     /lib/tls/i686/cmov/libc-2.5.so
    b7aad000-b7aaf000 rw-p 0013c000 08:01 567748     /lib/tls/i686/cmov/libc-2.5.so
    b7aaf000-b7ab2000 rw-p b7aaf000 00:00 0
    b7ab2000-b7abd000 r-xp 00000000 08:01 534400     /lib/libgcc_s.so.1
    b7abd000-b7abe000 rw-p 0000a000 08:01 534400     /lib/libgcc_s.so.1
    b7abe000-b7ae3000 r-xp 00000000 08:01 567756     /lib/tls/i686/cmov/libm-2.5.so
    b7ae3000-b7ae5000 rw-p 00024000 08:01 567756     /lib/tls/i686/cmov/libm-2.5.so
    b7ae5000-b7bc4000 r-xp 00000000 08:01 147693     /usr/lib/libstdc++.so.6.0.8
    b7bc4000-b7bc7000 r--p 000de000 08:01 147693     /usr/lib/libstdc++.so.6.0.8
    b7bc7000-b7bc9000 rw-p 000e1000 08:01 147693     /usr/lib/libstdc++.so.6.0.8
    b7bc9000-b7bcf000 rw-p b7bc9000 00:00 0
    b7bcf000-b7bd1000 r-xp 00000000 08:01 567754     /lib/tls/i686/cmov/libdl-2.5.so
    b7bd1000-b7bd3000 rw-p 00001000 08:01 567754     /lib/tls/i686/cmov/libdl-2.5.so
    b7bd3000-b7bd4000 rw-p b7bd3000 00:00 0
    b7be2000-b7be3000 rw-p b7be2000 00:00 0
    b7be4000-b7cb5000 r-xp 00000000 08:01 178127     /usr/local/lib/libhigh-0.2.so.23.0.0
    b7cb5000-b7cb9000 rw-p 000d0000 08:01 178127     /usr/local/lib/libhigh-0.2.so.23.0.0
    b7cb9000-b7fd8000 r-xp 00000000 08:01 292237     /usr/local/lib/libpnl-0.2.so.23.0.0
    b7fd8000-b7fe1000 rw-p 0031f000 08:01 292237     /usr/local/lib/libpnl-0.2.so.23.0.0
    b7fe1000-b7fe3000 rw-p b7fe1000 00:00 0
    b7fe3000-b7ffc000 r-xp 00000000 08:01 534357     /lib/ld-2.5.so
    b7ffc000-b7ffe000 rw-p 00019000 08:01 534357     /lib/ld-2.5.so
    bfa67000-bfa7c000 rw-p bfa67000 00:00 0          [stack]
    fbffe000-fbfff000 r-xp 00000000 00:00 0          [vdso]
    Aborted (core dumped)
    brett@brett-noX:~/documents/PNL/PNL/high/examples/Tests$ ls -altrh
    total 140K
    -rw-r--r-- 1 brett brett   98 2005-02-01 04:48 saveload.pnl
    -rw-r--r-- 1 brett brett  26K 2005-02-01 04:48 EvidForStructurelearn.csv
    -rw-r--r-- 1 brett brett   98 2005-02-01 04:48 createModel.pnl
    -rw-r--r-- 1 brett brett  117 2005-02-01 04:48 alevid.csv
    -rw-r--r-- 1 brett brett  540 2005-02-01 11:37 TestStruct.pnl
    -rw-r--r-- 1 brett brett 1009 2005-02-01 11:37 learn.pnl
    -rw-r--r-- 1 brett brett  696 2005-02-01 11:37 inference.pnl
    -rw-r--r-- 1 brett brett  703 2005-02-01 11:37 evidence.pnl
    -rw-r--r-- 1 brett brett  461 2005-02-01 11:37 alarmTest.pnl
    -rw-r--r-- 1 brett brett 1.3K 2005-02-01 11:37 alarmModel.pnl
    -rw-r--r-- 1 brett brett  171 2005-02-01 11:39 TestStruct.cmp
    -rw-r--r-- 1 brett brett   14 2005-02-01 11:39 saveload.cmp
    -rw-r--r-- 1 brett brett  219 2005-02-01 11:39 learn.cmp
    -rw-r--r-- 1 brett brett  446 2005-02-01 11:39 inference.cmp
    -rw-r--r-- 1 brett brett   79 2005-02-01 11:39 evidence.cmp
    -rw-r--r-- 1 brett brett   17 2005-02-01 11:39 createModel.cmp
    -rw-r--r-- 1 brett brett   53 2005-02-01 11:39 alevid2.csv
    -rw-r--r-- 1 brett brett 3.3K 2005-03-19 03:56 StructureLearnedNet.xml
    -rw-r--r-- 1 brett brett 4.1K 2005-03-19 03:56 learnem2.xml
    -rw-r--r-- 1 brett brett 4.1K 2005-03-19 03:56 learnem1.xml
    -rw-r--r-- 1 brett brett 4.1K 2005-03-19 03:56 learnbayes.xml
    -rw-r--r-- 1 brett brett 4.0K 2005-03-19 03:56 alarm.xml
    drwxr-xr-x 2 brett brett 4.0K 2007-08-19 02:51 CVS
    drwxr-xr-x 5 brett brett 4.0K 2007-08-19 03:18 ..
    -rw-r--r-- 1 brett brett 4.0K 2007-08-19 03:59 net.xml
    drwxr-xr-x 3 brett brett 4.0K 2007-08-19 03:59 .
    brett@brett-noX:~/documents/PNL/PNL/high/examples/Tests$

     
    • BrettC

      BrettC - 2007-08-19

      Just confirmed same problem using gcc/g++ 3.4

      Also, should mention that the save/load works, all 'make check' tests passed for g++-3.4 (not for 4.1.2); yet inclusion of save/load causes the script/program to crash when finished.  I wonder if it's a reference-counting issue?

      Here is a complete example, with source, output, errors, and gdb:

      brett@brett-noX:~/documents/PNL/pypnl$ cat proto1.pnl
      #!/usr/local/bin/example -s

      //proto1.pnl - create and sample sprinkler n/w
      AddNode("discrete^Cloudy", "true false")
      AddNode("discrete^Sprinkler", "true false")
      AddNode("discrete^Rain", "true false")
      AddNode("discrete^WetGrass", "true false")
      AddArc("Cloudy", "Sprinkler Rain")
      AddArc("Sprinkler Rain", "WetGrass")
      SetPTabular("Cloudy^true", "0.6")
      SetPTabular("Cloudy^false", "0.4")
      SetPTabular("Sprinkler^true Sprinkler^false", "0.1 0.9", "Cloudy^true")
      SetPTabular("Sprinkler^true Sprinkler^false", "0.5 0.5", "Cloudy^false")
      SetPTabular("Rain^true Rain^false", "0.8 0.2", "Cloudy^true");
      SetPTabular("Rain^true Rain^false", "0.2 0.8", "Cloudy^false")
      SetPTabular("WetGrass^true WetGrass^false", "0.99 0.01", "Rain^true Sprinkler^true ")
      SetPTabular("WetGrass^true WetGrass^false", "0.9 0.1", "Sprinkler^true Rain^false")
      SetPTabular("WetGrass^true WetGrass^false", "0.9 0.1", "Sprinkler^false Rain^true")
      SetPTabular("WetGrass^true WetGrass^false", "0.0 1.0", "Sprinkler^false Rain^false")
      GenerateEvidences(500)
      SaveEvidBuf("proto1.csv")

      print("")
      print("Cloudy family:")
      print("parents")
      GetParents("Cloudy")
      print("children")
      GetChildren("Cloudy")
      print("")
      print("Sprinkler family:")
      print("parents")
      GetParents("Sprinkler")
      print("children")
      GetChildren("Sprinkler")
      print("")
      print("Rain family:")
      print("parents")
      GetParents("Rain")
      print("children")
      GetChildren("Rain")
      print("")
      print("WetGrass family:")
      print("parents")
      GetParents("WetGrass")
      print("children")
      GetChildren("WetGrass")

      SaveNet("proto1.xml")

      brett@brett-noX:~/documents/PNL/pypnl$

      brett@brett-noX:~/documents/PNL/pypnl$ example -s proto1.pnl

      Execution of script from 'proto1.pnl':

      Cloudy family:
      parents

      children
      Sprinkler Rain

      Sprinkler family:
      parents
      Cloudy
      children
      WetGrass

      Rain family:
      parents
      Cloudy
      children
      WetGrass

      WetGrass family:
      parents
      Sprinkler Rain
      children

      End of script
      *** glibc detected *** example: free(): invalid pointer: 0xb7b0c844 ***
      ======= Backtrace: =========
      /lib/tls/i686/cmov/libc.so.6[0xb77897cd]
      /lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb778ce30]
      /usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb794ad11]
      /usr/local/lib/libhigh-0.2.so.23(_ZN4pnlw12PersistSSMapD0Ev+0x35)[0xb7a70f6b]
      /usr/local/lib/libpnl-0.2.so.23(_ZN3pnl15CPersistenceZooD1Ev+0x5b)[0xb7e101c1]
      /usr/local/lib/libpnl-0.2.so.23[0xb7e10489]
      /lib/tls/i686/cmov/libc.so.6(__cxa_finalize+0xa9)[0xb774ecc9]
      /usr/local/lib/libpnl-0.2.so.23[0xb7bcbb8b]
      /usr/local/lib/libpnl-0.2.so.23[0xb7e9a70c]
      /lib/ld-linux.so.2[0xb7f3b9ee]
      /lib/tls/i686/cmov/libc.so.6(exit+0xe9)[0xb774e9d9]
      /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe4)[0xb7737ec4]
      example(__gxx_personality_v0+0x159)[0x804ff81]
      ======= Memory map: ========
      08048000-080bf000 r-xp 00000000 08:01 296488     /usr/local/bin/example
      080bf000-080c1000 rw-p 00077000 08:01 296488     /usr/local/bin/example
      080c1000-0828f000 rw-p 080c1000 00:00 0          [heap]
      b7600000-b7621000 rw-p b7600000 00:00 0
      b7621000-b7700000 ---p b7621000 00:00 0
      b7720000-b7722000 rw-p b7720000 00:00 0
      b7722000-b785d000 r-xp 00000000 08:01 567748     /lib/tls/i686/cmov/libc-2.5.so
      b785d000-b785e000 r--p 0013b000 08:01 567748     /lib/tls/i686/cmov/libc-2.5.so
      b785e000-b7860000 rw-p 0013c000 08:01 567748     /lib/tls/i686/cmov/libc-2.5.so
      b7860000-b7863000 rw-p b7860000 00:00 0
      b7863000-b786e000 r-xp 00000000 08:01 534400     /lib/libgcc_s.so.1
      b786e000-b786f000 rw-p 0000a000 08:01 534400     /lib/libgcc_s.so.1
      b786f000-b7894000 r-xp 00000000 08:01 567756     /lib/tls/i686/cmov/libm-2.5.so
      b7894000-b7896000 rw-p 00024000 08:01 567756     /lib/tls/i686/cmov/libm-2.5.so
      b7896000-b7975000 r-xp 00000000 08:01 147693     /usr/lib/libstdc++.so.6.0.8
      b7975000-b7978000 r--p 000de000 08:01 147693     /usr/lib/libstdc++.so.6.0.8
      b7978000-b797a000 rw-p 000e1000 08:01 147693     /usr/lib/libstdc++.so.6.0.8
      b797a000-b7980000 rw-p b797a000 00:00 0
      b7980000-b7982000 r-xp 00000000 08:01 567754     /lib/tls/i686/cmov/libdl-2.5.so
      b7982000-b7984000 rw-p 00001000 08:01 567754     /lib/tls/i686/cmov/libdl-2.5.so
      b7984000-b7985000 rw-p b7984000 00:00 0
      b7993000-b7994000 rw-p b7993000 00:00 0
      b7995000-b7b09000 r-xp 00000000 08:01 296484     /usr/local/lib/libhigh-0.2.so.23.0.0
      b7b09000-b7b0d000 rw-p 00174000 08:01 296484     /usr/local/lib/libhigh-0.2.so.23.0.0
      b7b0d000-b7f21000 r-xp 00000000 08:01 292237     /usr/local/lib/libpnl-0.2.so.23.0.0
      b7f21000-b7f2c000 rw-p 00413000 08:01 292237     /usr/local/lib/libpnl-0.2.so.23.0.0
      b7f2c000-b7f2e000 rw-p b7f2c000 00:00 0
      b7f2e000-b7f47000 r-xp 00000000 08:01 534357     /lib/ld-2.5.so
      b7f47000-b7f49000 rw-p 00019000 08:01 534357     /lib/ld-2.5.so
      bfc74000-bfc8a000 rw-p bfc74000 00:00 0          [stack]
      fbffe000-fbfff000 r-xp 00000000 00:00 0          [vdso]
      Aborted (core dumped)
      brett@brett-noX:~/documents/PNL/pypnl$

      brett@brett-noX:~/documents/PNL/pypnl$ gdb
      GNU gdb 6.6-debian
      Copyright (C) 2006 Free Software Foundation, Inc.
      GDB is free software, covered by the GNU General Public License, and you are
      welcome to change it and/or distribute copies of it under certain conditions.
      Type "show copying" to see the conditions.
      There is absolutely no warranty for GDB.  Type "show warranty" for details.
      This GDB was configured as "i486-linux-gnu".
      (gdb) set args -s /home/brett/documents/PNL/pypnl/proto1.pnl
      (gdb) show args
      Argument list to give program being debugged when it is started is "-s /home/brett/documents/PNL/pypnl/proto1.pnl".
      (gdb) file example
      Reading symbols from /usr/local/bin/example...done.
      Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
      (gdb) run
      Starting program: /usr/local/bin/example -s /home/brett/documents/PNL/pypnl/proto1.pnl

      Execution of script from '/home/brett/documents/PNL/pypnl/proto1.pnl':

      Cloudy family:
      parents

      children
      Sprinkler Rain

      Sprinkler family:
      parents
      Cloudy
      children
      WetGrass

      Rain family:
      parents
      Cloudy
      children
      WetGrass

      WetGrass family:
      parents
      Sprinkler Rain
      children

      End of script
      *** glibc detected *** /usr/local/bin/example: free(): invalid pointer: 0xb7b6b844 ***
      ======= Backtrace: =========
      /lib/tls/i686/cmov/libc.so.6[0xb77e87cd]
      /lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb77ebe30]
      /usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb79a9d11]
      /usr/local/lib/libhigh-0.2.so.23(_ZN4pnlw12PersistSSMapD0Ev+0x35)[0xb7acff6b]
      /usr/local/lib/libpnl-0.2.so.23(_ZN3pnl15CPersistenceZooD1Ev+0x5b)[0xb7e6f1c1]
      /usr/local/lib/libpnl-0.2.so.23[0xb7e6f489]
      /lib/tls/i686/cmov/libc.so.6(__cxa_finalize+0xa9)[0xb77adcc9]
      /usr/local/lib/libpnl-0.2.so.23[0xb7c2ab8b]
      /usr/local/lib/libpnl-0.2.so.23[0xb7ef970c]
      /lib/ld-linux.so.2[0xb7f9a9ee]
      /lib/tls/i686/cmov/libc.so.6(exit+0xe9)[0xb77ad9d9]
      /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe4)[0xb7796ec4]
      /usr/local/bin/example(__gxx_personality_v0+0x159)[0x804ff81]
      ======= Memory map: ========
      08048000-080bf000 r-xp 00000000 08:01 296488     /usr/local/bin/example
      080bf000-080c1000 rw-p 00077000 08:01 296488     /usr/local/bin/example
      080c1000-0828f000 rw-p 080c1000 00:00 0          [heap]
      b7600000-b7621000 rw-p b7600000 00:00 0
      b7621000-b7700000 ---p b7621000 00:00 0
      b777f000-b7781000 rw-p b777f000 00:00 0
      b7781000-b78bc000 r-xp 00000000 08:01 567748     /lib/tls/i686/cmov/libc-2.5.so
      b78bc000-b78bd000 r--p 0013b000 08:01 567748     /lib/tls/i686/cmov/libc-2.5.so
      b78bd000-b78bf000 rw-p 0013c000 08:01 567748     /lib/tls/i686/cmov/libc-2.5.so
      b78bf000-b78c2000 rw-p b78bf000 00:00 0
      b78c2000-b78cd000 r-xp 00000000 08:01 534400     /lib/libgcc_s.so.1
      b78cd000-b78ce000 rw-p 0000a000 08:01 534400     /lib/libgcc_s.so.1
      b78ce000-b78f3000 r-xp 00000000 08:01 567756     /lib/tls/i686/cmov/libm-2.5.so
      b78f3000-b78f5000 rw-p 00024000 08:01 567756     /lib/tls/i686/cmov/libm-2.5.so
      b78f5000-b79d4000 r-xp 00000000 08:01 147693     /usr/lib/libstdc++.so.6.0.8
      b79d4000-b79d7000 r--p 000de000 08:01 147693     /usr/lib/libstdc++.so.6.0.8
      b79d7000-b79d9000 rw-p 000e1000 08:01 147693     /usr/lib/libstdc++.so.6.0.8
      b79d9000-b79df000 rw-p b79d9000 00:00 0
      b79df000-b79e1000 r-xp 00000000 08:01 567754     /lib/tls/i686/cmov/libdl-2.5.so
      b79e1000-b79e3000 rw-p 00001000 08:01 567754     /lib/tls/i686/cmov/libdl-2.5.so
      b79e3000-b79e4000 rw-p b79e3000 00:00 0
      b79f2000-b79f3000 rw-p b79f2000 00:00 0
      b79f4000-b7b68000 r-xp 00000000 08:01 296484     /usr/local/lib/libhigh-0.2.so.23.0.0
      b7b68000-b7b6c000 rw-p 00174000 08:01 296484     /usr/local/lib/libhigh-0.2.so.23.0.0
      b7b6c000-b7f80000 r-xp 00000000 08:01 292237     /usr/local/lib/libpnl-0.2.so.23.0.0
      b7f80000-b7f8b000 rw-p 00413000 08:01 292237     /usr/local/lib/libpnl-0.2.so.23.0.0
      b7f8b000-b7f8d000 rw-p b7f8b000 00:00 0
      b7f8d000-b7fa6000 r-xp 00000000 08:01 534357     /lib/ld-2.5.so
      b7fa6000-b7fa8000 rw-p 00019000 08:01 534357     /lib/ld-2.5.so
      bff7d000-bff92000 rw-p bff7d000 00:00 0          [stack]
      fbffe000-fbfff000 r-xp 00000000 00:00 0          [vdso]

      Program received signal SIGABRT, Aborted.
      0xfbffe410 in __kernel_vsyscall ()
      (gdb)

      ######

      from the error:
      *** glibc detected *** /usr/local/bin/example: free(): invalid pointer: 0xb7b6b844 ***
      and:
      b7b68000-b7b6c000 rw-p 00174000 08:01 296484     /usr/local/lib/libhigh-0.2.so.23.0.0

      It would seem the error is in libhigh, not too surprising.  But exactly why?

      #######

      (gdb) bt
      #0  0xfbffe410 in __kernel_vsyscall ()
      #1  0xb77aadf0 in raise () from /lib/tls/i686/cmov/libc.so.6
      #2  0xb77ac641 in abort () from /lib/tls/i686/cmov/libc.so.6
      #3  0xb77e09bb in ?? () from /lib/tls/i686/cmov/libc.so.6
      #4  0x00000006 in ?? ()
      #5  0xbff90814 in ?? ()
      #6  0x00000400 in ?? ()
      #7  0xb78a77a8 in ?? () from /lib/tls/i686/cmov/libc.so.6
      #8  0x00000017 in ?? ()
      #9  0xbff919b5 in ?? ()
      #10 0x00000016 in ?? ()
      #11 0xb78a77c1 in ?? () from /lib/tls/i686/cmov/libc.so.6
      #12 0x00000002 in ?? ()
      #13 0xb78a47d4 in ?? () from /lib/tls/i686/cmov/libc.so.6
      #14 0x00000017 in ?? ()
      #15 0xb78a77c5 in ?? () from /lib/tls/i686/cmov/libc.so.6
      #16 0x00000004 in ?? ()
      #17 0xbff90d8f in ?? ()
      #18 0x00000008 in ?? ()
      #19 0xb78a77cb in ?? () from /lib/tls/i686/cmov/libc.so.6
      #20 0x00000005 in ?? ()
      #21 0xc95d70a0 in ?? ()
      #22 0xb7a08900 in ?? () from /usr/local/lib/libhigh-0.2.so.23
      ---Type <return> to continue, or q <return> to quit---
      #23 0xb7a088cf in ?? () from /usr/local/lib/libhigh-0.2.so.23
      #24 0x00000000 in ?? ()
      (gdb)

      ####

      So it seems that libhigh are conflicting about trying to do free() on some object.  Anyone agree?  Why?

       
    • BrettC

      BrettC - 2007-08-23

      Browsing CVS, in PNL/high/tests/TestLimid.cpp, lines 920-921, I found:

      //        TestPigs();           // does not work under Linux
      //        testSaveLoadLIMID();    // does not work under Linux

      Actually, they do work, but perhaps they were taken out because they do generate this problem when the program is finished.

       
    • Brian Milch

      Brian Milch - 2007-08-24

      I just checked in changes to c_pgmtk/src/pnlPersistence.cpp and c_pgmtk/include/pnlPersistence.hpp that fix this bug.  You were right that the problem had to do with freeing memory: the PersistenceZoo in pnlPersistence.cpp was calling "delete" on the CPersistence objects that were registered with it, but these objects weren't allocated with "new" in libhigh -- they were allocated statically.  I changed the PersistenceZoo so it no longer deletes CPersistence objects. 

      You can get the updated versions of these files from the Sourceforge CVS repository.  I've also checked in changes recently that fix compilation errors in gcc 4.1.

      Please let me know if this doesn't fix the problem for you.
      --Brian

       
    • BrettC

      BrettC - 2007-08-30

      Very nice!  It does fix the problem in many cases; unfortunately, not in all.

      I haven't yet isolated the unique factor that causes the problem (same glibc error on free() due to bad pointer), but I will post when I find it.

      Thanks!
      Brett

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks