DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Paste Crash DIAdem

Hi All,

 

BUG 1131814 has been filed with R&D, describing this issue.  Hopefully it will be addressed in an upcoming DIAdem version.

 

Apologies,

Brad Turpin

Principal Technical Support Engineer

National Instruments

0 Kudos
Message 21 of 26
(1,173 Views)

Hey Josh,

 

I'm going to first comment on Bug #1079879 in this post, then I'll post again about the copy-paste corollary, once I've tested that and come to some conclusions.  But first off, Bug #1079879 is now officially closed with DIAdem 2020 SP1 listed as the fixed version.  I reproduced this DIAdem crash with your code in DIAdem 2017, 2018, 2019, 2020.  Today I tried it with DIAdem 2020 SP1, and it did not crash.  Instead it threw an error saying the layout couldn't be saved entirely.  Let me explain why this is progress.

 

The core issue that R&D discovered was that the Text Object in REPORT relies on a dispatch interface to an invisible RTF-control that is paired with the REPORT object.  This dispatch interface to the RTF-control was a 32bit protocol.  The communication between 64bit DIAdem through this 32bit protocol worked most of the time-- as long as the "pointer" wasn't too large.  Incomplete communication compounded and lead to invalid addresses which caused the crash of the host application DIAdem.  R&D mentioned that loading up lots of data in the Data Portal lead to references larger than 32bit being passed through to the RTF-control, thus the dependency on a full Data Portal.  R&D says they have converted the dispatch communication from 32bit to 64bit, so the underlying problem that has been occurring with a full Data Portal ever since DIAdem went 64bit, will in DIAdem 2020 SP1 and future versions no longer occur.

 

Brad Turpin

Principal Technical Support Engineer

NI

0 Kudos
Message 22 of 26
(1,127 Views)

Hi Josh,

 

I tested your suggested approach to load up the Windows clipboard with DIAdem Data Portal data using the same script that created data for the REPORT Text object bug.  When I try to paste the loaded Windows clipboard to Excel, my DIAdem 2020 SP1 crashes, just like you say it has been doing for you.

 

Initially I tried to lump in your clipboard pasting out of DIAdem issue with another one from a different customer who was pasting data into DIAdem using the clipboard.  That was the Bug #1131814, and in hindsight that was a bad idea on my part, as the recipe I provided ended up not being a crash but a super slow execution.  That is, not a bug, per se, but a performance enhancement request.

 

So now I have created your own Bug #1200308 for just this issue, including the VBScript that I used to reproduce it in DIAdem 2020 SP1.  I apologize for the lost time.  Hopefully R&D will now (really) get to the bottom of it soon.

 

Brad Turpin

Principal Technical Support Engineer

National Instruments

 

Brad

0 Kudos
Message 23 of 26
(1,120 Views)

Hi Josh,

 

R&D has looked into the Bug with the reproducing code and come to some conclusions.  There was an underlying problem with DIAdem's rendering of the selected data into a clipboard string-- it was a lingering issue stemming from 32bit times which caused trouble in 64bit DIAdem when very large data amounts caused it to cross the 32bit boundary.  This has now been fixed in the DIAdem 2021 code base, so that's the good news.  The bad news is that the data set your reproducing code creates still takes about 9 minutes to render into a clipboard string-- so it will work in DIAdem 2021, but huge data sets and the Windows clipboard are fundamentally not harmonious companions.

 

For the particular use case of transferring lots of data values to Excel, you might consider exporting the selected data to a TDMS file and then using the Excel TDM Add-in to load the data into Excel.  This should work much faster as a pure transfer mechanism.

 

Brad Turpin

Principal Technical Support Engineer

NI

0 Kudos
Message 24 of 26
(1,109 Views)

Brad,

Thanks so much for the update!

 

We generally don't copy and paste that much data at a time, but copying a "large" amount of data was the most reliable method to reproduce the bug.  You can generally copy a few channels without crashing, but the threshold was vague so I went "big" to force the crash every time.

 

So long as the crash is fixed, people will figure out on their own just how much data they're willing to wait on copy and paste vs. exporting with one of the various other methods built-into or scripted for DIAdem...

 

We generally advise our users against copying "large" amounts of data due to the old clipboard limitations (would just cut off data at some point).

 

Thanks!

-Josh

0 Kudos
Message 25 of 26
(1,097 Views)

Brad,

I just verified that DIAdem 2021 appears to handle pasting (both with large datasets loaded, and large amounts of data being copied) externally without crashing.

 

Thanks again!

-Josh

0 Kudos
Message 26 of 26
(1,026 Views)