dplotdll - array too big
Posted: Fri Aug 19, 2016 12:37 pm
Dave,
We have a VB.net app that plots in dplot (in use ~10 yrs). Lately, we have large data files (~2 Gb) that sometimes fail to plot. We don't try to plot all channels for the full recording, but even fairly reasonable selections hit Dplot limits. This is calling "DPlot_Plot" in the 64-bit dplotdll.dll w/ format "DATA_XYYY", "SCALE_LINEARX_LINEARY". In a test, w/ fixed 8,536,064 x-values, it plots 6 channels (51,216,384 y-values), but not 7 chans (59,752,448 y-values). The later shows "7 x 8536064" in status bar (correct), but doesn't move on to "Finding extents" w/ hourglass like 6 channels does. The screen is blank and "Hide Curves" lists only "0: Curve #0", which indicates it gave up. In several cases, I saw an "array error" box flash by. Plotting the 6 chans takes ~30 sec.
Hint: Try what I use on my VB side (found in a search). To enable "large arrays" in Windows 7 64-bit w/ Framework 4.5, in folder w/ dplot.exe, add file named "Dplot.exe.config" w/ xml lines below to request more RAM from Windows. You will get other xml entries if (like me) you start an "app.config" in the Visual Studio project, then manually add the <runtime> entry. If you "publish", you find it simply renames the "app.config" file to the exe name, as a flag for Windows. You don't need to "publish", indeed I don't since it buries the app files deep in each user's profile folders. I just copy the run files in Explorer from the project's "\bin" to a run folder. You will still be limited to arrays w/ 2 Gb elements (multiply indices if multi-dimensional), but Dplot is hanging long before that (my data array is fine on VB side: elements = 7 chan x 59,752,448 samples), so below may work. Actually, I can try simply adding this config file once I get on a PC w/ admin rights.
<?xml version="1.0"?> <configuration>
<runtime> <gcAllowVeryLargeObjects enabled="true" /> </runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
We have a VB.net app that plots in dplot (in use ~10 yrs). Lately, we have large data files (~2 Gb) that sometimes fail to plot. We don't try to plot all channels for the full recording, but even fairly reasonable selections hit Dplot limits. This is calling "DPlot_Plot" in the 64-bit dplotdll.dll w/ format "DATA_XYYY", "SCALE_LINEARX_LINEARY". In a test, w/ fixed 8,536,064 x-values, it plots 6 channels (51,216,384 y-values), but not 7 chans (59,752,448 y-values). The later shows "7 x 8536064" in status bar (correct), but doesn't move on to "Finding extents" w/ hourglass like 6 channels does. The screen is blank and "Hide Curves" lists only "0: Curve #0", which indicates it gave up. In several cases, I saw an "array error" box flash by. Plotting the 6 chans takes ~30 sec.
Hint: Try what I use on my VB side (found in a search). To enable "large arrays" in Windows 7 64-bit w/ Framework 4.5, in folder w/ dplot.exe, add file named "Dplot.exe.config" w/ xml lines below to request more RAM from Windows. You will get other xml entries if (like me) you start an "app.config" in the Visual Studio project, then manually add the <runtime> entry. If you "publish", you find it simply renames the "app.config" file to the exe name, as a flag for Windows. You don't need to "publish", indeed I don't since it buries the app files deep in each user's profile folders. I just copy the run files in Explorer from the project's "\bin" to a run folder. You will still be limited to arrays w/ 2 Gb elements (multiply indices if multi-dimensional), but Dplot is hanging long before that (my data array is fine on VB side: elements = 7 chan x 59,752,448 samples), so below may work. Actually, I can try simply adding this config file once I get on a PC w/ admin rights.
<?xml version="1.0"?> <configuration>
<runtime> <gcAllowVeryLargeObjects enabled="true" /> </runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>