Forum Discussion
Non-negative number required error while appending tables
Looking at the stack trace it looks like this is an issue with the mashup engine. It looks like it uses a bunch of file streams under the cover to merge queries or something of that nature. In other words, its storing information in files on the hard disk while generating the preview and reading from those files while mashing everything up.
This exception appears to be occurring because the value being passed to "set_Position(Int64 value)" - referring to a spot in a filestream, is a negative number.
When an integer increases beyond its maximum value, it wraps back to a negative number. For example if the max value of an int was 10, and you tried to increment it up to 11, it would become -10 instead of 11.
The actual maximum value of a 64-bit integer (int64) is high.
18,446,744,073,709,551,615 to be exact.
This many bits would be, in gigabytes:
18,446,744,073,709,551,615/8/1000/1000/1000
=2,305,843,009.21 GB
Guaranteed none of the filestreams the mashup engine is using are large enough to cause that to happen.
However, if the value variable is being derived from any other 32-bit integers somewhere along the code path up to that point: The max value of an int32 is 2,147,483,647. In gigabytes thats:
2,147,483,647/8/1000/1000/1000.
= roughly .268 GB or 268 MB.
If any of the file stream position calculations are being stored in a 32 bit integer in the PBI code, and the size of that filestream is exceeding 268 MB, there is a good chance it is causing that 'value' integer shown in the stack trace to wrap around to -2,147,483,647. Then by the time it hits that line of code an exception gets thrown, because code-based file reader can't find a negative position in a file.
I would experiment with getting rid of columns that you don't need in any of the base data sources being used by the mash up engine in order to try and shrink the size of any file streams. Perhaps it won't reach the 2,147,483,647 bits size and trigger this bug....
I know its a bit of a shot in the dark, but that is my best educated guess of what is occurring.