Hello Paul (and others),

I'm currently testing my onewire installation with owtcl and an I2C adapter. 
It works more or less. I found out there is a nasty bug which is triggered by 
OW::finish, but *only* for the DS2482 I2C adapter, not DS9490 or DS9097U, 
which I tested, too. So I doubt it's a problem with owtcl, should be inside 
owlib.

Please see the attached Tcl script and log. Start with

        ./ow_finish_bug /dev/i2c-6 

or similar to try yourself. /dev/ttyS0 or usb for other adapter work, too, and 
don't show the bug.

I used CVS from last week for this test.

Kind regards

        Jan
-- 
Es ist zehn Uhr abends... Wissen Sie, wo ihre Quellcodes sind?
  DEBUG: FS_OWQ_create of uncached
   CALL: PARSENAME path=[uncached]
  DEBUG: In FS_dir(uncached)
   CALL: DIRECTORY path=uncached
  DEBUG: Start of directory path=uncached device=00 00 00 00 00 00 00 00
  DEBUG: BUS_first: Empty bus -- no presence pulse
  DEBUG: Selecting a path (and device) path=uncached SN=00 00 00 00 00 00 00 00 
last path=00 00 00 00 00 00 00 00
  DEBUG: Clearing root branch
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 read status ok
  DEBUG:   Transaction send = 0
  DEBUG:   Transaction end = 0
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: BUS_next return = -19 | 00 00 00 00 00 00 00 00
  DEBUG: Cache_Add_Device 00 00 00 00 00 00 00 00 bus=0
  DEBUG: Add to cache sn 00 00 00 00 00 00 00 00 pointer=(nil) index=-1 size=4
  DEBUG: Start of directory path=uncached device=00 00 00 00 00 00 00 00
  DEBUG: BUS_first: Empty bus -- no presence pulse
  DEBUG: Selecting a path (and device) path=uncached SN=00 00 00 00 00 00 00 00 
last path=00 00 00 00 00 00 00 00
  DEBUG: Clearing root branch
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 read status ok
  DEBUG:   Transaction send = 0
  DEBUG:   Transaction end = 0
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: BUS_next return = -19 | 00 00 00 00 00 00 00 00
  DEBUG: Cache_Add_Device 00 00 00 00 00 00 00 00 bus=7
  DEBUG: Add to cache sn 00 00 00 00 00 00 00 00 pointer=(nil) index=-1 size=4
  DEBUG: Start of directory path=uncached device=00 00 00 00 00 00 00 00
  DEBUG: BUS_first: Empty bus -- no presence pulse
  DEBUG: Selecting a path (and device) path=uncached SN=00 00 00 00 00 00 00 00 
last path=00 00 00 00 00 00 00 00
  DEBUG: Clearing root branch
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 read status ok
  DEBUG:   Transaction send = 0
  DEBUG:   Transaction end = 0
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: BUS_next return = -19 | 00 00 00 00 00 00 00 00
  DEBUG: Cache_Add_Device 00 00 00 00 00 00 00 00 bus=1
  DEBUG: Add to cache sn 00 00 00 00 00 00 00 00 pointer=(nil) index=-1 size=4
  DEBUG: Start of directory path=uncached device=00 00 00 00 00 00 00 00
  DEBUG: BUS_first: Empty bus -- no presence pulse
  DEBUG: Selecting a path (and device) path=uncached SN=00 00 00 00 00 00 00 00 
last path=00 00 00 00 00 00 00 00
  DEBUG: Clearing root branch
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 read status ok
  DEBUG:   Transaction send = 0
  DEBUG:   Transaction end = 0
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: BUS_next return = -19 | 00 00 00 00 00 00 00 00
  DEBUG: Cache_Add_Device 00 00 00 00 00 00 00 00 bus=2
  DEBUG: Add to cache sn 00 00 00 00 00 00 00 00 pointer=(nil) index=-1 size=4
  DEBUG: Start of directory path=uncached device=00 00 00 00 00 00 00 00
  DEBUG: BUS_first: Empty bus -- no presence pulse
  DEBUG: Selecting a path (and device) path=uncached SN=00 00 00 00 00 00 00 00 
last path=00 00 00 00 00 00 00 00
  DEBUG: Clearing root branch
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 read status ok
  DEBUG:   Transaction send = 0
  DEBUG:   Transaction end = 0
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: BUS_next return = -19 | 00 00 00 00 00 00 00 00
  DEBUG: Cache_Add_Device 00 00 00 00 00 00 00 00 bus=3
  DEBUG: Add to cache sn 00 00 00 00 00 00 00 00 pointer=(nil) index=-1 size=4
  DEBUG: Start of directory path=uncached device=00 00 00 00 00 00 00 00
  DEBUG: BUS_first: Empty bus -- no presence pulse
  DEBUG: Selecting a path (and device) path=uncached SN=00 00 00 00 00 00 00 00 
last path=00 00 00 00 00 00 00 00
  DEBUG: Clearing root branch
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 read status ok
  DEBUG:   Transaction send = 0
  DEBUG:   Transaction end = 0
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: BUS_next return = -19 | 00 00 00 00 00 00 00 00
  DEBUG: Cache_Add_Device 00 00 00 00 00 00 00 00 bus=4
  DEBUG: Add to cache sn 00 00 00 00 00 00 00 00 pointer=(nil) index=-1 size=4
  DEBUG: Start of directory path=uncached device=00 00 00 00 00 00 00 00
  DEBUG: BUS_first: Empty bus -- no presence pulse
  DEBUG: Selecting a path (and device) path=uncached SN=00 00 00 00 00 00 00 00 
last path=00 00 00 00 00 00 00 00
  DEBUG: Clearing root branch
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 read status ok
  DEBUG:   Transaction send = 0
  DEBUG:   Transaction end = 0
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: BUS_next return = -19 | 00 00 00 00 00 00 00 00
  DEBUG: Cache_Add_Device 00 00 00 00 00 00 00 00 bus=5
  DEBUG: Add to cache sn 00 00 00 00 00 00 00 00 pointer=(nil) index=-1 size=4
  DEBUG: Start of directory path=uncached device=00 00 00 00 00 00 00 00
  DEBUG: BUS_first: Empty bus -- no presence pulse
  DEBUG: Selecting a path (and device) path=uncached SN=00 00 00 00 00 00 00 00 
last path=00 00 00 00 00 00 00 00
  DEBUG: Clearing root branch
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 read status ok
  DEBUG:   Transaction send = 0
  DEBUG:   Transaction end = 0
  DEBUG: DS2482 read status ok
  DEBUG: DS2482 Reset
  DEBUG: BUS_next return = -19 | 00 00 00 00 00 00 00 00
  DEBUG: Cache_Add_Device 00 00 00 00 00 00 00 00 bus=6
  DEBUG: Add to cache sn 00 00 00 00 00 00 00 00 pointer=(nil) index=-1 size=4
   CALL: PARSENAME path=[uncached/bus.7]
  DEBUG: ParsedName_destroy uncached/bus.7
   CALL: PARSENAME path=[uncached/bus.6]
  DEBUG: ParsedName_destroy uncached/bus.6
   CALL: PARSENAME path=[uncached/bus.5]
  DEBUG: ParsedName_destroy uncached/bus.5
   CALL: PARSENAME path=[uncached/bus.4]
  DEBUG: ParsedName_destroy uncached/bus.4
   CALL: PARSENAME path=[uncached/bus.3]
  DEBUG: ParsedName_destroy uncached/bus.3
   CALL: PARSENAME path=[uncached/bus.2]
  DEBUG: ParsedName_destroy uncached/bus.2
   CALL: PARSENAME path=[uncached/bus.1]
  DEBUG: ParsedName_destroy uncached/bus.1
   CALL: PARSENAME path=[uncached/bus.0]
  DEBUG: ParsedName_destroy uncached/bus.0
   CALL: PARSENAME path=[uncached/settings]
  DEBUG: ParsedName_destroy uncached/settings
   CALL: PARSENAME path=[uncached/system]
  DEBUG: ParsedName_destroy uncached/system
   CALL: PARSENAME path=[uncached/statistics]
  DEBUG: ParsedName_destroy uncached/statistics
   CALL: PARSENAME path=[uncached/structure]
  DEBUG: ParsedName_destroy uncached/structure
  DEBUG: FS_dir_both out ret=0
  DEBUG: FS_OWQ_destroy of uncached
  DEBUG: ParsedName_destroy uncached
   CALL: Clear Cache
   CALL: Closing input devices
*** glibc detected *** /usr/bin/tclsh: double free or corruption (!prev): 
0x08118e00 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7ce9fc4]
/lib/libc.so.6(cfree+0x9c)[0xb7ceb95c]
/opt/owfs/lib/libow-2.7.so.13(DirblobClear+0x29)[0xb7bbd489]
/opt/owfs/lib/libow-2.7.so.13(FreeIn+0x172)[0xb7bbaad2]
/opt/owfs/lib/libow-2.7.so.13(FreeInAll+0x34)[0xb7bbad44]
/opt/owfs/lib/libow-2.7.so.13(LibStop+0x72)[0xb7bc9d62]
/opt/owfs/lib/libow-2.7.so.13(API_finish+0x3f)[0xb7bb5cef]
/opt/owfs/lib/libowcapi-2.7.so.13(OW_finish+0x17)[0xb7f0d1e7]
/usr/share/tcl/owtcl-0.2/ow.so(Owtcl_Delete+0x26)[0xb7f116b6]
/usr/lib/libtcl8.5.so[0xb7e1325b]
/usr/lib/libtcl8.5.so[0xb7e13e4f]
/usr/lib/libtcl8.5.so(Tcl_EvalEx+0x2e)[0xb7e146fe]
/usr/lib/libtcl8.5.so(Tcl_FSEvalFileEx+0x14f)[0xb7e84b5f]
/usr/lib/libtcl8.5.so(Tcl_Main+0x392)[0xb7e8d962]
/usr/bin/tclsh(main+0x39)[0x8048759]
/lib/libc.so.6(__libc_start_main+0xe5)[0xb7c945f5]
/usr/bin/tclsh[0x8048621]
======= Memory map: ========
08048000-08049000 r-xp 00000000 09:00 159033     /usr/bin/tclsh8.5
08049000-0804a000 r--p 00000000 09:00 159033     /usr/bin/tclsh8.5
0804a000-0804b000 rw-p 00001000 09:00 159033     /usr/bin/tclsh8.5
080b8000-0811c000 rw-p 080b8000 00:00 0          [heap]
b5aea000-b5aeb000 ---p b5aea000 00:00 0
b5aeb000-b62eb000 rw-p b5aeb000 00:00 0
b62eb000-b62ec000 ---p b62eb000 00:00 0
b62ec000-b6aec000 rw-p b62ec000 00:00 0
b6aec000-b6aed000 ---p b6aec000 00:00 0
b6aed000-b72ed000 rw-p b6aed000 00:00 0
b72ed000-b72ee000 ---p b72ed000 00:00 0
b72ee000-b7aee000 rw-p b72ee000 00:00 0
b7aee000-b7af5000 r-xp 00000000 09:00 279870     /usr/lib/libdns_sd.so.1.0.0
b7af5000-b7af6000 r--p 00006000 09:00 279870     /usr/lib/libdns_sd.so.1.0.0
b7af6000-b7af7000 rw-p 00007000 09:00 279870     /usr/lib/libdns_sd.so.1.0.0
b7af7000-b7b2d000 r-xp 00000000 09:00 178694     /lib/libdbus-1.so.3.4.0
b7b2d000-b7b2e000 r--p 00035000 09:00 178694     /lib/libdbus-1.so.3.4.0
b7b2e000-b7b2f000 rw-p 00036000 09:00 178694     /lib/libdbus-1.so.3.4.0
b7b2f000-b7b3e000 r-xp 00000000 09:00 91535      
/usr/lib/libavahi-client.so.3.2.4
b7b3e000-b7b3f000 r--p 0000e000 09:00 91535      
/usr/lib/libavahi-client.so.3.2.4
b7b3f000-b7b40000 rw-p 0000f000 09:00 91535      
/usr/lib/libavahi-client.so.3.2.4
b7b40000-b7b4c000 r-xp 00000000 09:00 14766      /lib/libgcc_s.so.1
b7b4c000-b7b4d000 r--p 0000b000 09:00 14766      /lib/libgcc_s.so.1
b7b4d000-b7b4e000 rw-p 0000c000 09:00 14766      /lib/libgcc_s.so.1
b7b4e000-b7b62000 r-xp 00000000 09:00 86470      /lib/libpthread-2.8.so
b7b62000-b7b63000 r--p 00013000 09:00 86470      /libAbgebrochen

#!/usr/bin/tclsh
package require ow

eval OW::init $argv
OW::set_error_level 9
OW::set_error_print 2

OW::get uncached
OW::finish

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to