[us-commits] [ehb54/ultrascan3] 4483a1: us_experiment fixes to handle new protocol load an...

Alexey Savelyev alexsav.science at gmail.com
Fri Jan 31 15:58:34 MST 2020


Gary,

I have been testing your latest changes to AProfile:

I think I found a small yet important bug. I found it because i tested 
the program on 2 of my Linux machines.

The bug is related to seemingly different execution of the 
"get_aprofile_info" query, and more importantly, how query fields are 
read into the program's variables (in 
US_AnalysisProfileGui::inherit_protocol( US_RunProtocol* iProto ) 
function).

particularly, on one of my machines (when protocol load fails, results 
in segfault), the relevant debug statements look as follows:

=============

APG: ipro: name "JohnsonC_EWS-Fli1_DNA-Binding_012920" cPname 
"JohnsonC_EWS-Fli1_DNA-Binding_012920" xml len 0 GUID 
"00000000-0000-0000-0000-000000000000" 
"9f58f29d-fa0f-4e34-8e40-646817053938"
APG: ipro: name GUID "JohnsonC_EWS-Fli1_DNA-Binding_012920" 
"9f58f29d-fa0f-4e34-8e40-646817053938"
APG: ipro:  db stat nrow 0 1 lerr ""
APG: ipro:  ap ID,name,lnxml 0 "-�bU" 0
APG: ipro:  load_db true
APG: ipro:  ap_xml isEmpty true
APGe: inP: aname pname "-�bU" "JohnsonC_EWS-Fli1_DNA-Binding_012920"
=================

As you see, the AProfile name is not read correctly (symbols). This 
results in either segfault from the beginning (while attempting to load 
the protocol), or in a segfault when clicked on AProfile tab (after 
aprofile part of the protocol is misread..)


However, on my other machine (and it looks like on the installation on 
demeler3), aprofile is read correctly:

================

APG: ipro: name "JohnsonC_EWS-Fli1_DNA-Binding_012920" cPname 
"JohnsonC_EWS-Fli1_DNA-Binding_012920" xml len 0 GUID 
"00000000-0000-0000-0000-000000000000" 
"9f58f29d-fa0f-4e34-8e40-646817053938"
APG: ipro: name GUID "JohnsonC_EWS-Fli1_DNA-Binding_012920" 
"9f58f29d-fa0f-4e34-8e40-646817053938"
APG: ipro:  db stat nrow 0 1 lerr ""
APG: ipro:  ap ID,name,lnxml 9 "JohnsonC_EWS-Fli1_DNA-Binding_012920" 1293
APG: ipro:  load_db true
APG: ipro:  ap_xml isEmpty false
APG: ipro:  ap_xml length 1293
APG: ipro:   2kparm pkparm 1 1 kpchan 1
APGe: inP: aname pname "JohnsonC_EWS-Fli1_DNA-Binding_012920" 
"JohnsonC_EWS-Fli1_DNA-Binding_012920"

===================

here, all names are read correctly.


I kinf of confused why behaviors are different on 2 of my Linux machines 
with quite similar environments.

However, I made it work without crashes on both machines with a small 
modification in the code (line ~323 of the us_analysis_profile.cpp):

==========

          else
          {
        while (dbP->next()) <----- this positioning with ::next() seems 
to be very important
          {
            currProf.aprofID     = dbP->value( 0 ).toInt();
            currProf.aprofname   = dbP->value( 1 ).toString();
            ap_xml               = dbP->value( 2 ).toString();
          }

==========

I will commit  the change - just letting you know in case you haven't 
use positioning of the DB record on purpose.


Alexey


P.S. I am testing the dynamic changes in Aprofile GUI caused by changes 
in the other protocol tabs. Seems they are all captured in XML file, but 
only the GUI for "General" tab is not updated.. Will send another e-mail 
on that.


On 1/31/20 12:24 PM, Gary E. Gorbet wrote:
>    Branch: refs/heads/master
>    Home:   https://github.com/ehb54/ultrascan3
>    Commit: 4483a1619ba9f52d06e0029b132469662acc9eae
>        https://github.com/ehb54/ultrascan3/commit/4483a1619ba9f52d06e0029b132469662acc9eae
>    Author: gegorbet <gegorbet at gmail.com>
>    Date:   2020-01-31 (Fri, 31 Jan 2020)
>
>    Changed paths:
>      M programs/us_analysis_profile/us_analysis_profile.cpp
>      M programs/us_analysis_profile/us_analysis_profile.h
>      M programs/us_analysis_profile/us_anapro_utils.cpp
>      M programs/us_experiment/us_exp_utils.cpp
>      M programs/us_experiment/us_experiment_gui_optima.cpp
>      M programs/us_experiment/us_experiment_gui_optima.h
>      M utils/us_protocol_util.cpp
>      M utils/us_run_protocol.h
>
>    Log Message:
>    -----------
>    us_experiment fixes to handle new protocol load and to show proto GUID,ID
>
>
> _______________________________________________
> us-commits mailing list
> us-commits at biophysics.uleth.ca
> http://demeler7.uleth.ca/mailman/listinfo/us-commits


More information about the us-commits mailing list