Project

General

Profile

Bug #7639

Saving file doesn't work

Added by Kyle Hazelwood about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
High
Category:
Client
Start date:
01/14/2015
Due date:
% Done:

0%

Estimated time:
Spent time:
Duration:

Description

The operators reported that I3 would return error: "Err:insert new rec failed,try to recover old one SQL__SYNTAX". Elog entry 41980.

I3SQLError.PNG (5.12 KB) I3SQLError.PNG DB doesn't like NaN Kyle Hazelwood, 01/15/2015 10:30 AM
I3SQLInsert.PNG (3.85 KB) I3SQLInsert.PNG DB doesn't like one or more float values Kyle Hazelwood, 01/15/2015 10:30 AM
I3SQLInsertDataNaN.PNG (3.84 KB) I3SQLInsertDataNaN.PNG NaNs being passed Kyle Hazelwood, 01/15/2015 10:30 AM
I3Error.gif (25.8 KB) I3Error.gif Original error Kyle Hazelwood, 01/18/2015 12:12 PM
I3Log.PNG (27.4 KB) I3Log.PNG Earliest log record of bug Kyle Hazelwood, 01/18/2015 06:49 PM
I3Log2.PNG (28.5 KB) I3Log2.PNG Amount of bugs recorded Kyle Hazelwood, 01/18/2015 06:50 PM
I3Log3.PNG (6.76 KB) I3Log3.PNG Fudged successful file save Kyle Hazelwood, 01/18/2015 06:50 PM

Related issues

Related to Recycler RF Control Application (PA4225, R3) - Bug #7752: Unable to save filesClosed01/31/2015

History

#1 Updated by Kyle Hazelwood about 6 years ago

  • Description updated (diff)

#2 Updated by Kyle Hazelwood about 6 years ago

The application appears to be passing NaN to the DB for a few float values.

#3 Updated by Kyle Hazelwood about 6 years ago

  • Category set to Client

#5 Updated by Kyle Hazelwood about 6 years ago

So the save feature works as such:

  1. hv.cpp > hv_save()
  2. hv.cpp > hv_convert()
  3. hv.cpp > table.cpp > table_save()
  4. table.cpp > table_rec_w()

Everything appears fine until table_rec_w(). The float array leaving table_save() has no NaNs. As soon as the float array of values is passed to the table_rec_w() routine using the GEN_TABLE struct the float array is padded with some very small values and NaN at indices 231 and 233. I can get the save to complete successfully by overriding the values at indices 231 and 233 with zero.

#6 Updated by Kyle Hazelwood about 6 years ago

This may have been a problem for sometime. The I3 program log shows this error occurring back on December 30, 2014. Unfortunately the log has a 1000 line limit which puts the logger at December 17, 2014. There are no successful file saves recorded other than the one I fudged tonight.

#7 Updated by Kyle Hazelwood about 6 years ago

#8 Updated by Kyle Hazelwood almost 6 years ago

In hv_save() the HV_TABLE object contains a TABLE_HDR object, a float20 for pars and an HV_SLOT52 for slots. The HV_TABLE object is cast to a GEN_TABLE object that contains a TABLE_HDR object and a float236. Each HV_SLOT is 4 floats. That makes a HV_TABLE object actually a TABLE_HDR object and a float228, this is shy 8 floats for the GEN_TABLE object (two HV_SLOTS). The GEN_TABLE object never populates its last 8 float indices leaving in a couple NaNs.

#9 Updated by Kyle Hazelwood almost 6 years ago

  • Status changed from Assigned to Resolved

I'm able to fix the issue completely by increasing the HV_MAX_SLOTS constant in table.h to 54 from 52. This causes the GEN_TABLE struct to be filled completely with zeros as padding. I'm not sure why this problem occurred. There hasn't been any significant updates for years to any of the code responsible for this feature. I'm testing the fix tonight.

#10 Updated by Kyle Hazelwood almost 6 years ago

  • Status changed from Resolved to Closed

The changes are in the latest release of PA1677.

#11 Updated by Kyle Hazelwood almost 6 years ago

  • Related to Bug #7752: Unable to save files added

Also available in: Atom PDF