Book a Demo

Author Topic: array of ints  (Read 5757 times)

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
array of ints
« on: March 22, 2013, 03:05:52 am »
Hi
I reverse engineered a class that contains the following declaration
Code: [Select]
unsigned short m_exponent[EFPDataSubFrame::m_numThreeAxisSamplesPerSubFrame];

Upon re generating the code the closing bracket and is missing

I went to the attribute properties and examined the container type under the detail tab and it was missing there.
I replaced the missing bracket in EA and pressed the Save button
This displayed a dialog stating

Microsoft Cursor Engine[-2147217887]
Multiple Step Operation generated errors. Check each status value

It appears there is limit on the length that can be entered

Has anyone else come across this or can anyone else reproduce it?

I have reported it to Sparx as a bug

Using V12

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: array of ints
« Reply #1 on: March 22, 2013, 07:26:21 am »
You might look into the dberrors.txt in the %APPDATA% EA folder. But what ever the wrong SQL looks like I'd aim in direction EA as cause of the bug.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: array of ints
« Reply #2 on: March 22, 2013, 08:33:07 am »
The field that stores the array definition does have a limited length, that isn't likely to be changed in the short term. But we should be handling it nicer.

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: array of ints
« Reply #3 on: March 22, 2013, 06:34:05 pm »
Hi
We have several arrays where this happens and every time we re generated code the code is produced in the wrong format.
I cant help thinking that this should be relatively simple to fix.
Using V12

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: array of ints
« Reply #4 on: March 22, 2013, 08:04:06 pm »
Hi
I am using MS SQL as my database
Am I likely to break anything by changing the length of the data field for the the container column in the t_attribute table?
I can do this by editing the sql script used to generate the EA tables, but I dont want to break anything

Has anyone got any advice on this

Thanks
Using V12

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: array of ints
« Reply #5 on: March 22, 2013, 09:29:54 pm »
If you widen up the size and just let EA fill I would guess it should be save. If EA sends the full length to the database (which then truncates) it's likely that EA could handle the amount of data coming back. Depends of course on the way they handle storage internally. If they use fixed size buffers (which I don't hope but can't guarantee) then it depends whether they assert the size of the string assigned. IOW: just give it a try. If EA does not immediately crash, chances are good it will work on longer terms.

q.

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: array of ints
« Reply #6 on: March 22, 2013, 09:32:55 pm »
Hi Qwerty
I have tried this and indeed I can input a longer string
However, when I try to generate code EA refuses and tells me that code generation failed!
Using V12

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: array of ints
« Reply #7 on: March 22, 2013, 09:54:57 pm »
In that case you are doomed to wait for Sparx to correct it. As a "work around" you could shorten the names in the code so they finally fit in EA's buffer.

q.

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: array of ints
« Reply #8 on: March 22, 2013, 09:57:32 pm »
Thanks
Came to that conclusion myself
Using V12