Warnings when Drawing Figures in App Designer
6 次查看(过去 30 天)
显示 更早的评论
Hello,
I'm building an audio analysis app in Matlab App Designer. I'm seeing a warning in the command window when a particular figure is generated.
Warning: An error occurred while drawing the scene: Error in web pick traversal: RangeError: Array buffer allocation failed
This warning repeats, filling the command window completely, and the figure never plots.
The warning is triggered by a button down event, which calls a function that plots a heatmap to app.UIAxes using surf(x, y, C). It seems to be an intermittent issue though. It happens most reliably when the size of C is large [2400 x 50000]. When C is [2400 x 10000], and all other variables are held constant, the figure is rendered with no error.
I have had similar issues rendering plots from large variables before on this computer (Windows 10), and have resolved these by forcing MATLAB to use Painter rather than OpenGL. From what I understand though, App Designer uses WebGL to render figures, and I haven't found a way to override this.
It has occurred to me that this warning may only be happening because my machine does not have a dedicated graphics card (It has an Intel Iris). Once deployed, this app needs to run reliably on a wide range of machines, so it does need to work on machines with Iris and similar graphics cards.
I do not need the 3D capabilities of surf(), and so I simply set 'View' to [90 90]. I thought that perhaps using some other (2D only) figure function might work better than surf(). So far none have been appropriate for my application. My preference is to use imagesc(), but I need to be able to scale the Y-axis coordinates of the image logarithmically, and imagesc does not support this. I tried pcolor() but it resulted in even more rendering issues, even with data "C" that is smaller than [2400 x 10000].
Thanks in advance for your help!
1 个评论
Adam Danz
2023-1-19
This will be difficult to troubleshoot here in the forum.
Please contact tech support and include your app, information about your machine, and instructions how to reproduce the problem.
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!