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

repeated histogram_start for adAcquire? #56

Open
newville opened this issue Oct 11, 2024 · 1 comment
Open

repeated histogram_start for adAcquire? #56

newville opened this issue Oct 11, 2024 · 1 comment

Comments

@newville
Copy link
Contributor

@TomQD-94 I'm seeing occasional segfaults of the xspress3App that I am not sure I fully understand. It seems to happen most often when I start a "second run", as for a second row of a map. That is, the first row of a map completes, including writing the HDF5 file. My scanning code then resets some parameters and starts the next row. When starting the xspress3 may cause the segfault.

Starting at line 1215 of xspress3Epics.cpp (

else if (function == ADAcquire) {
)

Curiously, at line 1233 (

)

the code has

	  setupITFG();
	  xsp3_status = xsp3->histogram_start(xsp3_handle_, -1 );
	  if (xsp3_status != XSP3_OK) {
	    checkStatus(xsp3_status, "xsp3_histogram_start", functionName);
	    status = asynError;

	  } else {
	    setupITFG(); 
	    xsp3_status = xsp3->histogram_start(xsp3_handle_, -1 );
		
	    if (xsp3_status != XSP3_OK) {
	      checkStatus(xsp3_status, "xsp3_histogram_start", functionName);
	      status = asynError;
	    }

I think that repeated call to setupITF() and xsp3->histogram_start() must be a mistake, no?

I'm not convinced that this is the only problem I am seeing, but commenting out the second set seems to help and not cause any different problems. Do you think this should be removed?

@newville newville changed the title repeated histogram_start for adAcuire? repeated histogram_start for adAcquire? Oct 11, 2024
@TomQD-94
Copy link
Contributor

Hi Matt,

I think you are right, I can't see the logic in calling it twice.

Additionally, this call is not on some of the other branches in this repository, but it is on the fork I made when doing some Mk2 changes so it is hard to see when or why this was added.

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

No branches or pull requests

2 participants