Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Visualisers often cause crashes #1721

Open
1 task done
ZwipZwapZapony opened this issue May 27, 2024 · 0 comments
Open
1 task done

[Bug] Visualisers often cause crashes #1721

ZwipZwapZapony opened this issue May 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ZwipZwapZapony
Copy link

ZwipZwapZapony commented May 27, 2024

Operating System

Windows

What's the issue you encountered?

When using the hex::visualize attribute on a pattern and clicking on the eye icon to view the visualised data, ImHex crashes fairly often. (Edit: The crashing is deterministic based on the visualiser data, not a random chance - but it still happens often.)

How can the issue be reproduced?

Create a new file, copy and paste u8 data @ $ [[hex::visualize("abc")]]; into the Pattern Editor, run the pattern, and click on the eye icon in the Pattern Data tab.

All of these (and likely more) cause crashes:

u8 data_invalid @ 0 [[hex::visualize("abc")]]; //"abc" is not a valid visualizer

u8 data_bitmap @ 0 [[hex::visualize("bitmap",this,1,1)]]; //Also crashes if it's u32 (which would be enough bytes for a 1x1 RGBA8 bitmap),
//does not crash if it's an array (unless the array has too few bytes for width x height RGBA8 - u32[1] and u8[4] work the same in that regard)

u8 data_hex_viewer @ 0 [[hex::visualize("hex_viewer",this)]]; //Also crashes if it's an array

float model_vertices[9]; //For data_3d below
model_vertices[0] = -1; //X1
model_vertices[1] = 0;  //Y1
model_vertices[2] = 0;  //Z1
model_vertices[3] = 0;  //X2
model_vertices[4] = 0;  //Y2
model_vertices[5] = 1;  //Z2
model_vertices[6] = 1;  //X3
model_vertices[7] = 0;  //Y3
model_vertices[8] = 0;  //Z3
u8 data_3d @ 0 [[hex::visualize("3d",model_vertices,null)]]; //Also crashes without ",null"

ImHex Version

v1.33.2, and nightly @ 0b0bf90

ImHex Build Type

  • Nightly or built from sources

Installation type

Portable nightly zip

Additional context?

[Crash log]

@ZwipZwapZapony ZwipZwapZapony added the bug Something isn't working label May 27, 2024
@ZwipZwapZapony ZwipZwapZapony changed the title [Bug] Visualisers cause crashes [Bug] Visualisers often cause crashes May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant