Forum Discussion
Non-negative number required error while appending tables
NOTE:
I decompiled the assemblies that Power BI runs on and hooked up my debugger to drill down and find out whats going on and I was correct. The culprit is a bug in the Microsoft.MashupEngine.dll assembly, not something wrong with any data source. It will occur when the report is big enough.
Specifically:
The ReadPage and WritePage methods of the Microsoft.Mashup.EngineHost.Services.TransformingPagedStream class both use the following line (or equivalent because the decompiler may not be accurate as far as semantics)
this.inputStream.Seek((long) (page * this.inputPageSize), SeekOrigin.Begin);
'page' is a 32-bit integer here and so is 'this.inputPageSize'. So when the page number of the stream seek operation gets high enough, the page*this.inputPageSize multiplication operation eventually gets larger than the max 32-bit integer value of 2,147,483,647, which causes the operation to return a negative number due to the overflow.
That value is *then* converted to a long. What needs to happen is that the 'page' or 'this.inputPageSize' 32-bit integer needs to be a long in the first place so that the multiplication operation does not cause an overflow (or one of them needs to be cast at the time of the multiplication operation).
This negative number result is passed down through a few other functions until it hits the spot where we are seeing this exception in the stack-trace provided by the original poster.
Hope a dev can see this and patch it - seems like a pretty big bug.
Layman's terms:
This is a PBI Desktop bug, not a data source bug or something wrong with the way you built your report. The only thing you can really do until it gets patched is try and shrink your data source(s) so none of them hit this limitation.
Thanks everyone for your hard work in trying to figure out this problem. Based on this Power BI Administrator's recommendation, I submitted a support ticket to Power BI support and included the information from this post as well as a link to this post for reference. The support site is telling me that I should hear back from Power BI support within one day. I'll let everyone know what I hear.
- Anonymous7 years agoNot applicable
Power BI support responded the same day that I submitted the support ticket (yesterday) and reached out to me to set up a screen sharing session to go through the issue we've been experiencing. The support person was very nice to work with. We captured some screenshots and gathered some log files, which will be passed on to the Power BI product development team for review.
- motoroto7 years agoFrequent Visitor
Hello, we are having the same issue. Did you get to solve it?
B rgds,
- boylec7 years agoAdvocate II’m working with a pro support rep on it the last two days. He said the latest October release of PBI Desktop should have patched the bug. I’ve yet to try it. Are you using the latest Power BI Desktop?