Re: [Tcl-nap-users] Interpolation in f32 arrays causes crash
Brought to you by:
dav480,
peter_turner
From: <Pet...@cs...> - 2009-08-18 00:50:26
|
Hi, The "set datatype" method was introduced in version 6.4. It looks like the datatype modifier does not set the null value in the adjusted nao. It then appears that the interpolation algorithm cannot cope with a NULL pointer to the missing value slot in the NAO. A work around is to set the missing value before doing the interpolation. $x set datatype f32 $x set missing 1nf32 or what ever value you want. I have not exhaustively checked this out but it appears: 1. The "set datatype" operation is not setting the missing value in the modified NAO. One can argue if this is a good idea or not. For example going from f32 to f64 with an initial NaN missing value should perhaps copy that missing value. Going from i32 to f64 it is less clear what to do. 2. The interpolation algorithm is crashing out on the NULL pointer to the missing value. Hopefully this will be fixed in the next release! Cheers Peter -----Original Message----- From: baseotto p. (pb406) [mailto:pb...@ec...] Sent: Tuesday, 18 August 2009 1:28 AM To: tcl...@li... Subject: [Tcl-nap-users] Interpolation in f32 arrays causes crash Hey all, I've come across the following issue and wonder if there is a known work-around. NAP seems to crash when I try to work with interpolated values in f32 arrays, as shown below. The interpreter works as expected for non-interpolated values in f32 arrays. To reproduce the bug - Tcl: ActiveTcl 8.4.19.1 Interactive interpreter: both wish and tkcon 2.5 (Desktop) 49 % nap "x = {0 0}" ::NAP::14-14 (Desktop) 50 % [nap "x 0.5"] 0 (Desktop) 51 % $x set datatype f32 (Desktop) 52 % [nap "x 0.5"] *crash* The crash is caught by a Visual Studio background process, giving me the following message box: "Assertion failed! Program: C:\Program Files\Tcl84\bin\wish84.exe File: /cygdrive/c/dav480/tcl/nap/generic/napLib.c,m4 Line: 2136 Expression: naoPtr For more information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts (Press Retry to debug the application - JIT must be enabled) <<Abort>> <<Retry>> <<Ignore>>" Kind regards, ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Tcl-nap-users mailing list Tcl...@li... https://lists.sourceforge.net/lists/listinfo/tcl-nap-users |