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 件)
Amal Raj
2023 年 3 月 13 日
This should override the renderer to painter:
app.UIAxes.Renderer = 'painters';
参考
カテゴリ
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!