-
Dear Cyril, dear Datoviz users, I would like to build an app, where I can use an UI to cycle through a sequence of heatmap plots. So far, displaying a single heatmap (similar as in the "test_vislib_image_cmap()" function) works fine, but trying to change the plot (uploading a different texture) triggers segmentation faults. For small textures (such as 150 * 150 pixels), updating can work many times without crash, but for bigger data (~1500 * 1500 pixels), often the first update causes the segfault, at least on my system. The code I use for first tests is basically taken from the mentioned test, and consists of two functions (see below), the GUI loop calls the latter ("update_visual") function. The position / texcoords properties are prepared beforehand and not updated with the GUI callback, but putting this in there doesn't seem to change anything. The segfault is triggered by the line
in the "dvz_buffer_upload" function within "vklite.c". There is a high likelyhood that I misuse the library in some way, and I would be grateful for hints on how to do this correctly. Note that I did try something similar with the Python wrapper and also ran into crashes. Thanks, and kind regards! Wolfgang `static DvzTexture* build_texture(DvzContext* context, uint32_t S)
} void update_visual(DvzCanvas* canvas, DvzVisual* visual) {
}` |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
A few suggestions:
If that still doesn't work, could you post the full script? |
Beta Was this translation helpful? Give feedback.
-
Hello Cyril, hopefully I don't have to bug you too often anymore, but the follow-up question concerns basically the last thing I wanted to try for my sandbox app: updates that involve changing the texture size. I played around with the "dvz_texture_resize()" function + reallocating the tex_data buffer, but doing this with an active texture seems to be a really bad idea :-) Everything involving "dvz_texture_resize()" results either in a "VK_ERROR_DEVICE_LOST" error (validation layer deactivated) or a segfault during "vkQueueSubmit". Is there some way to change "texture size" on the fly? My next approach would be to tear down and restart the DvzApp upon any update involving a change of the texture size, which would be totally OK for now. But perhaps I am just missing something, as before :-) In any case, thanks a lot for all your time and effort you are putting into this. This is an amazing library already in this early stage. With surprisingly few real alternatives, at least based on my research. |
Beta Was this translation helpful? Give feedback.
-
That's one of the things that should be much more robust in the upcoming version. Could you post your code? Perhaps you could try to "pause" the GPU before and after resizing the texture ( Another approach may be to allocate a large texture (as large as your largest texture) and only allocate part of it depending on your needs, but I don't remember if this branch of the code supports binding part of a texture in a graphics pipeline. |
Beta Was this translation helpful? Give feedback.
A few suggestions:
If that still doesn't work, could you post the f…