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

Segmentation fault when trying to invoke the keyboard shortcut help #12

Closed
tmadlener opened this issue Jun 28, 2024 · 0 comments · Fixed by #13
Closed

Segmentation fault when trying to invoke the keyboard shortcut help #12

tmadlener opened this issue Jun 28, 2024 · 0 comments · Fixed by #13

Comments

@tmadlener
Copy link
Contributor

The changes in #11 broke the display of the keyboard shortcut help leading to a segmentation fault when trying to toggle them.

This was originally reported in key4hep/key4hep-spack#603

The problem is this loop here (at least that is what gdb claims):

CED/src/server/glced.cc

Lines 601 to 610 in cc537ca

for(i=NUMBER_DATA_LAYER;i<NUMBER_DETECTOR_LAYER+NUMBER_DATA_LAYER;i++){
snprintf(label,MAX_STR_LEN+1, "(%s) [%c] %s%i: %s", isLayerVisible(i)?"X":"_",detec_layer_keys[-1*NUMBER_DATA_LAYER+i], ((i)<10)?"0":"", (i), layerDescription[i]);
if(strlen(label) >= MAX_STR_LEN){
label[MAX_STR_LEN-3]='.';
label[MAX_STR_LEN-2]='.';
label[MAX_STR_LEN-1]='.';
label[MAX_STR_LEN]=0;
}
shortcuts.push_back(label);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant