Support:Bugs and solutions

From COMKAT wiki

Jump to: navigation, search

Contents

How this system works

  1. If you encounter an error, please read the 'Known bugs and solutions' section below to find if this error has been reported and solved. If not, please report this bug in the 'Report new bugs' section.
  2. As this page is being 'watched' by COMKAT developers, any changes to this page will trigger the wiki to send us an e-mail notifying us of the new bug report.
  3. Then we will look at the bug report, provide an answer and solution and reply to the user who reported it via e-mail.
  4. Once this bug is resolved, we will move the report from the 'Report new bugs' section to the 'Known bugs and solutions' section.

NOTE: This page will not contain the bug reports for the previous releases of COMKAT if this bug has been resolved in the new version.

How to submit a bug report

  1. Search to see if this bug has been reported previously. Use the wiki search functions at the top of this page.
  2. Get the following information of your system:
    1. Operating system (and whether it's a 64-bit system with the MATLAB command 'computer')
    2. MATLAB version (use commands 'ver' and 'mexext' in MATLAB)
    3. COMKAT version
  3. Copy the following text.
Bug reported by Xin Li. Email: xli51@jhu.edu

OS: Microsoft Windows XP Version 5.1 (Build 2600: Service Pack 3) (32bit)

MATLAB: MATLAB Version 7.1.0.246 (R14) Service Pack 3

COMKAT: R3.2

Bug description: 
When using the 'analyzeFit', there is always error information below. 
??? Error using ==> mtimes
Inner matrix dimensions must agree.
Error in ==> compartmentModel.analyzeFit at 34
if (abs(Jot'*d) > 0.1* abs(d.'*A*d)),

But when I try to run the following code in the 'analyzeFit' function separately, it works.

fjac = full(jac);
[uu,ss,vv]=svd(fjac'*fjac); % jac is to include weighting
covar = vv*diag(1./diag(ss))*uu';
corr = covar./(sqrt(diag(covar)) * sqrt(diag(covar))');
sdev = sqrt(diag(covar));

% rfm2 20021212 added test for gradient
% covariance matrix is calculated assuming gradient is "small".  test this 
d = 0.005*pfit(:) + 1e-10;  % small pertubation to parameter estimate
Jot = fjac'*residual(:);
A = fjac'*fjac;  % approximate Hessian
if (abs(Jot'*d) > 0.1* abs(d.'*A*d)),
    fprintf(['analyzeFit: Covariance matrix estimate is not valid because gradient is ' ...
        'too large.  \nTry fitting again but with more stringent convergence tolerance.\n']);
end


Attachment(optional):

Additional contact information (optional):

4. Then click 'Edit' (in the footer) near the bottom of this page. (You must be logged in to edit.)
5. Paste the text into the edit box under '== New bugs waiting for response =='.
6. Edit the pasted text according to the bug you found.
7. When finished click 'Save page'. You may also include attachments such as .mat or .m files.

Go to Support:Detailed tutorial on bug report for a more detailed step-by-step instruction with pictures.


Known bugs and solutions

Download and installation

Problem: Cannot download COMKAT

When I clicked the link to COMKAT download, the download did not start and I got a 'HTTP 403 Forbidden' error message.

Solution: Log in before you download the COMKAT files.

The COMKAT web server requires you to register and log in before you download the COMKAT files.

Problem: fdgcmd.m in the examples folder crashes with an error

The fitting function in the example fdgcmd.m returns this error

fdgcmd('INVERSE') plotOption = 1 ??? Input argument "cm" is undefined. 
Error in ==> fitfunc at 54 parmToChange = get(cm, 'SensitivityName'); 
Error in ==> optim\private\snls at 423 [newfvec,newA] = feval(funfcn{3},xargin{:},varargin{:}); 
Error in ==> optim\private\lsqncommon at 220 [x,FVAL,LAMBDA,JACOB,EXITFLAG,OUTPUT,msg]=... 
Error in ==> lsqcurvefit at 174 [x,Resnorm,FVAL,EXITFLAG,OUTPUT,LAMBDA,JACOB] = ... 
Error in ==> compartmentModel.fit at 145 [newParmVal,resnorm,residual,exitFlag,output,lambda,jacobian] = lsqcurvefit('fitfunc', initParmVal, [], data, lb, ub, ...
Error in ==> fdgcmd at 208 pfit = fit(cm, pinit, lb, ub);

Solution: 'lsqcurvefit' was changed in MATLAB 2006a

This error arises because the newer MATLAB function
lsqcurvefit
has a different argument passing. In MATLAB version earlier than R2006, the lsqcommon passes an extra argument which is empty. That is why there is an unused argument
fitfunc.m
. However, this is fixed in R2006a and later so now the cm is passed as "unused". If you are using MATLAB 2006a or later, to solve this problem as a workaround, edit the
fitfunc.m
and insert the following lines in line 38: if nargin<3 cm=unused; end

Problem: Parameter estimates obtained using two different computers are different

I use two computers, one xp sp1 with MATLAB v7 sp1, the other is sp2. The estimated value from both computers are different. I have checked many times that I use the same data. Would it be possible to happen?

Solution: This behavior is to be expected

The default optimizer of COMKAT is lsqcurvefit. As it is a function of the MATLAB optimization toolbox, in different versions of MATLAB the fitting results may differ. So the fitted values could be slightly different under different service packs. However, the optimizer
LMWLS
is a function of COMKAT so it will not change in different MATLAB versions. So if you use this optimizer you are more likely to get identical parameter estimates regardless the MATLAB version. On the other hand, there may be platform differences that cause numeric roundoff to be different and this could impact parameter estimates so small differences in estimates are not unexpected.

Problem: Undefined command/function 'pxEval'

I just downloaded and attempted to install the latest version of COMKAT. When attempting to validate the first calculation, I get the following error message:

??? Undefined command/function 'pxEval'.

Solution: MATLAB 7 does not recognize the 'mexwin32' file extension

This error was generated because MATLAB 7 does not recognize the 'mexwin32' extension. We have fixed this issue by updating the COMKAT_R3.zip file. Please download and re-install it again. Or you may manually fix this by searching for all '.mexwin32' files and change their extension to '.dll'.

COMKAT command line functions

Problem: When I set a property of a compartment model, the property does not get changed

When I tried to set a certain property of COMKAT compartment model, why wasn't the property changed?

Solution: Capture the revised model object from the returned value

A common mistake is that you used a command without assigning the correct output like: set(cm,'ParameterName',pnames). The correct usage is: cm=set(cm,'ParameterName',pnames);.

Problem: Using a 64-bit Windows system, I get an Invalid MEX-file error

Under the 64-bit Windows system, when doing curve fitting I get the following error message:
Invalid MEX-file

Solution: 64-bit MATLAB does not install Visual C++ library that is required

This problem is caused by the fact that, when you install 64-bit MATLAB, it does not automatically install the Visual C re-distributable for you. But for 32-bit MATLAB it does. Since we compile our mex files using Visual Studio 2008, you will have to install the Visual Studio 2008 re-distributable in order to run the mex files.
Please go to Microsoft website: http://www.microsoft.com/downloads/details.aspx?familyid=bd2a6171-e2d6-4230-b809-9a8d7548c1b6&displaylang=en to download and install the re-distributables. If the link is broken, google Microsoft Visual C++ 2008 Redistributable Package x64.

COMKAT GUI

Problem: 'Return to GUI' button is missing

Main_GUI -> Model drawer -> I cannot find the 'Return to GUI' button when using the Model drawer.

Solution: Be sure to do all steps to run this

You have to implement every step including 'check model compatibility' and 'Return to GUI' will be enabled.

Problem: Using the 'one sample' with 'Inputest' tool causes an error

When launching the estimate process with 'Use one sample' I obtain the following error message :

 cvodesGenmod5:Error. Function fengInput does not exist??? 
??? Error using ==> fmincon at 517 
FMINCON cannot continue because user supplied objective function failed with the following error: 
Error using ==> cvodesGenmod5 cvodesGenmod5: Error.  Problem in evalInput.  Error status=1

Solution: Correct the program or download updated version of COMKAT

Please replace line 18 of COMKAT_R3.1\comkat_GUI\SIME_FDG_8_1sam.m by 'cm = addInput(cm, 'Cp', 1, 0, 'fengInputByPar', 'pfeng'); %"P"-type input'.

COMKAT Image Tool

Problem: When I try to create and name a new VOI, I get an error

get the following error when I try to create and name a new VOI:
??? Undefined function or variable 'name'. 
Error in ==> VOI.VOI at 16
out.name = name;  % what user calls the region

Solution: Correct program or download updated version of COMKAT

This is identified as a COMKAT bug. It will be fixed in the next release. For the workaround, edit line 16 of COMKATROOT/@VOI/VOI.m and make it:
out.name = varargin{1};

Miscellaneous

Problem: Cannot run Glucose Minimal Model from Validation Suite

When launching the validation process 'Glucose Minimal Model', I obtain the following error message:
Kinetic function kinGMM is missing.

Solution: Add the folder 'examples' to your MATLAB path

Please add the folder 'examples' under COMKAT root folder into your MATLAB path. This bug will be fixed in a recent COMKAT revision.

Problem: uitable errors

When running under deployed mode, uitable generates errors for missing functions 'arrayviewfunc'

Solution: Get an updated version of MATLAB or use the MATHWORKS solution

Refer to MATLAB website http://www.mathworks.cn/support/bugreports/details.html?rp=449936 for solution. This bug has been fixed in MATLAB R2008b and later. This bug does not appear under MATLAB.

Problem: Trouble reading in 2-byte integer micro PET data

Bug reported by Landon Locke. Email: Landon25@virginia.edu OS: Microsoft Windows XP Version 5.1 (Build 2600: Service Pack 2) MATLAB: MATLAB Version 7.7.0.471 (R2008b) COMKAT: R3.2

Bug description: When I try to load in a PET image data set that is 4-byte integer using readASPIRo, the code works fine. If the PET data was reconstructed as 2-byte integer, then the code fails and the following error is displayed in MATLAB:

??? Error using ==> reshape To RESHAPE the number of elements must not change.

Error in ==> readASIPro>readSegsFrames at 622

       fileData = reshape(fileData, [sz(1:3)] );

Error in ==> readASIPro>getPixelData at 508

           [data, segidx, subheader_out] = readSegsFrames(fid, sz, 'int16',
           frame, segment, delta, outputformat, subheader);

Error in ==> readASIPro at 391

           [data, si, sh_out] = getPixelData(fs_data, mh.data_type, sz, frame,
           segment, [], outputformat, sh);

Solution: Use the updated readASIPro.m

Reconstructing images with 2-byte pixels is a somewhat newer capability. Click here File:ReadASIPro.m to get the updated version of readASIPro.m and save it to the 'ImageReadingFunctions\Siemens-CTI microPET' folder. This updated version will be included in the future releases of COMKAT.


Problem: MATLAB crashes upon launching COMKAT

Bug reported by Xin Li xli51@jhu.edu

OS: Microsoft windows XP, PCWIN

MATLAB: MATLAB Version Version 7.1

COMKAT: COMKAT R3.2

Bug description: When launching COMKAT I obtain the following error message:

------------------------------------------------------------------------
       Segmentation violation detected at Mon Jun 08 17:34:57 2009
------------------------------------------------------------------------

Configuration:
  MATLAB Version:   7.1.0.246 (R14) Service Pack 3
  MATLAB License:   162077
  Operating System: Microsoft Windows XP
  Window System:    Version 5.1 (Build 2600: Service Pack 3)
  Processor ID:     x86 Family 15 Model 2 Stepping 7, GenuineIntel
  Virtual Machine:  Java 1.5.0 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
  Default Charset:  windows-1252

Register State:
  EAX = dd000000  EBX = dd000000
  ECX = 00cd7754  EDX = 785f284c
  ESI = 012f2e10  EDI = 0f6d8520
  EBP = 00cd777c  ESP = 00cd7754
  EIP = 78751031  FLG = 00010286

Stack Trace:
  [0] m_interpreter.dll:public: virtual void __thiscall FunctionHandleWorkspaceCI::customLoad(class mcos::COSInterfacePtr,class mcos::COSValue,class mcos::COSDataTypePtr)(0x11295f00, 0x11016d20, 0x113f9a20, 0x003c4b20 "Ô._x´._x") + 401 bytes
  [1] mcos.dll:public: virtual void __thiscall mcos::COSClassI::customLoad(class mcos::COSInterfacePtr,class mcos::COSValue,class mcos::COSDataTypePtr)(0x11295f00, 0x11016d20, 0x00cd7784, 0x003c4b20 "Ô._x´._x") + 102 bytes
  [2] mcos.dll:$L96755(0x00cd7864, 3875564, 0, 0x00cd7878) + 134 bytes
  [3] mcos.dll:public: virtual class mcos::COSInterfacePtr __thiscall mcos::File::getInterface(unsigned int)const (0x00cd7864, 1, 0x110162e0, 0) + 32 bytes
...

Solution: Use a newer version of MATLAB

MATLAB R14SP3 does not run COMKAT correctly. We recommend MATLAB 2008a. Older versions of MATLAB may mostly run COMKAT.


Problem: Aligment of MRI and PET images is inaccurate

Bug reported by Yash Gandhi. Email: ygandhi@buffalo.edu

OS: Microsoft Windows 7 Ultimate Edition (64bit)

MATLAB: MATLAB Compiler Runtime v78 (MCR)

COMKAT: Standalone version 3,2

Bug description: Alignment of MRI and PET dataset is not accurate. The MRI dataset resolution is better than the PET dataset. As a result when the two images are aligned, the MRI dataset is bigger than the PET dataset and if I use the MRI dataset as a reference to draw a region of interest, the time activity curve obtained is incorrect. I have attached an image of the alignment and a region of interest and the time activity curve obtained using the mri dataset and another one using the pet dataset. The two tac's are significantly different. Is there a way to match the resolutions of the two datasets? Also, the MRI dataset is for the entire animal but only part of the image is displayed on the screen.


Attachment(optional):

Additional contact information (optional):


Solution: Fix the information in the image files

Yash Gandhi sent Muzic the images.

The image files had incorrect values of the pixel size (spacing).

COMKAT uses such size information to determine how to interpolate the data sets to achieve a common number of mm of anatomy per screen pixel. When this information is incorrect, the size of the subject (number of screen pixels) will be inconsistent between images.


Problem: COMKAT crashes when attempting to save results into Excel

Bug reported by Jon Price. Email: jonathan.price@icr.ac.uk

OS: Mac OS X El Capitan V 10.11.6 (64bit)

MATLAB: MATLAB Version 9.0.0.341360 (R2016a)

COMKAT: R4.1a

Bug description: Estimation report not being exported

After fitting of my data, I try saving the estimation report (File --> Export Estimation Report) but there is no file saved. MATLAB reports the following:

Error using actxserver (line 90) Server creation failed. Invalid ProgID 'Excel.Application'.

Error in xlsheets (line 77) Excel = actxserver('Excel.Application');


Error in main_GUI>file_save_report_Callback (line 4054)

           xlsheets({'Estimation results','Estimation stats','Method
           summary','Residual'},strcat(pathname,filename));


Error in gui_mainfcn (line 95)

       feval(varargin{:});

Error in main_GUI (line 67)

   gui_mainfcn(gui_State, varargin{:});


Error in loadProjectData>@(hObject,eventdata)main_GUI('file_save_report_Callback',hObject,eventdata,guidata(hObject)) Error while evaluating Menu Callback

I would like to be able to view the errors on the fitted parameters.

Many thanks

Solution: Please use Windows

This feature is not supported on Mac OS. At the moment we have little active development on Mac OS. Perhaps a member of the COMKAT community could implement a solution for Mac OS.


Problem: COMKAT model drawer gene errors

Bug reported by Jon Price. Email: jonathan.price@icr.ac.uk

OS: Mac OS X El Capitan V 10.11.6 (64bit)

MATLAB: MATLAB Version 9.0.0.341360 (R2016a)

COMKAT: R4.1a

Bug description: Error in scan time in Model drawer Gene

I would like to use the Model drawer Gene to create a new model. I have followed the steps in the Gene and used the typical parameters suggested (http://comkat.case.edu/index.php?title=Support%3ADocuments%3AManual%3ACOMKAT_GUI#Customizing_COMKAT_GUI). However when I specify the outputs I get the error message "Bad Scan time. Error in evaluating scan time. Undefined function 'functions' for input arguments of type 'double' ". I have tried other time values but get the same error.

Many thanks for your help.

Jon

Attachment(optional):

Additional contact information (optional):

Solution: Fix some compatible issues for the new MABLAB version

Some compatible issues were found for the model drawer generator. We have fixed the problems and posted the updated COMKAT versions for Windows (R4.2a) and Mac (R4.1a) on the COMKAT wiki.


New bugs waiting for response

Problem: GUI 'Estimate' button returns error

Bug reported by Kathleen Francis. Email: knf2@rice.edu

OS: Microsoft Windows 8.1 (64-bit)

MATLAB: MATLAB Version: 8.1.0.604 (R2013a)

COMKAT: R4.0a

Bug description: I've tried using the COMKAT GUI to estimate parameters for an FDG two-tissue-compartment model, using my data sets for inputs and outputs. When I press the 'Estimate' button on the GUI, I get the following error:

Error using snls (line 48) Objective function is returning undefined values at initial point. lsqcurvefit cannot continue.

Error in lsqncommon (line 150)

   [xC,FVAL,LAMBDA,JACOB,EXITFLAG,OUTPUT,msgData]=...

Error in lsqcurvefit (line 253) [xCurrent,Resnorm,FVAL,EXITFLAG,OUTPUT,LAMBDA,JACOB] = ...

Error in compartmentModel/fit (line 156) [newParmVal,resnorm,residual,exitFlag,output,lambda,jacobian] = lsqcurvefit('fitfunc', initParmVal, [], data, lb, ub, ...

Error in main_GUI>fitCompartment_Callback (line 2480) [pfit modelFit] = fit(cm, pinit, lb, ub);

Error in gui_mainfcn (line 96)

       feval(varargin{:});

Error in main_GUI (line 67)

   gui_mainfcn(gui_State, varargin{:});

Error in guidemfile/@(hObject,eventdata)main_GUI('fitCompartment_Callback',hObject,eventdata,guidata(hObject))


Error while evaluating uicontrol Callback


I have tried using different data sets, as well as using the Feng input, but always get the same error.


I also get the following warning when I select the input data set:

Warning: The input to STR2FUNC "C:\Users\Kathleen\Desktop\Research Data\FDG\Exported Data\RCA1_15d_FDG_heart_COMKAT_DATA.csv" is not a valid function name. This will generate an error in a future release. > In loadTimeConcFromFile at 75

 In input2>WBFile1Browse_Callback at 1666
 In gui_mainfcn at 96
 In input2 at 59
 In guidemfile>@(hObject,eventdata)input2('WBFile1Browse_Callback',hObject,eventdata,guidata(hObject))
 In uiwait at 82
 In input2>input2_OpeningFcn at 305
 In gui_mainfcn at 221
 In input2 at 57
 In main_GUI>getInputData_Callback at 1719
 In gui_mainfcn at 96
 In main_GUI at 67
 In guidemfile>@(hObject,eventdata)main_GUI('getInputData_Callback',hObject,eventdata,guidata(hObject)) 


I think this might be the source of the error, but I don't know how I could fix it, or why it would not normally be a problem.


Additional contact information (optional):

Problem: Editting Frame Durations in Image Tool

Bug reported by Joel Dunn. Email:joel.dunn@kcl.ac.uk

OS: Microsoft Windows XP SP3

MATLAB: MATLAB Version 7.8.0.347 (R2009a)

COMKAT: COMKAT R3.2

Bug description: When reading dynamic Analyze images, I cannot edit the frame duration in the table. Clicking "Cancel" closes the table. The following warnings and errors appear when "OK" is clicked. The same warnings & errors also occur in the Standalone (MCR 7.8). Although the frame time table is editable in that case, you can't OK-it without getting these errors (i.e. you can't save your changes to frame durations etc).

Warning: Single input behavior is obsolete and will be removed in a
         future release of MATLAB. Use C={X} instead. 
> In mat2cell at 54
  In ReadAnalyze at 63
  In ImageVolumeData.read_analyze at 10
  In comkatimagetool>loadImageCallback at 449
  In gui_mainfcn at 96
  In comkatimagetool at 26
??? Undefined variable "outtable" or class "outtable.version".

Error in ==> ctable.get at 6
if outtable.version>7.6

Error in ==> FrameDur_Info>OK_Callback at 106
            if (iscell(get(handles.OutputData,'Data')))

Error in ==> gui_mainfcn at 96
        feval(varargin{:});

Error in ==> FrameDur_Info at 42
    gui_mainfcn(gui_State, varargin{:});
 
??? Error using ==> waitfor
Error while evaluating uicontrol Callback


Problem: Validation/Makefile problem

Enter bug description here

Bug reported by Kevin. Email: kleu@mednet.ucla.edu

OS: Mac OS X Version 10.6.8 (32bit)

MATLAB: MATLAB Version 7.14.0.739 (R2012a) 

COMKAT: R3.2

Bug description: 

Tried running the validation suite, but got the following message: Undefined function 'pxEval' for input arguments of type 'compartmentModel'. I then tried to use makefile and got the following message:

Warning: The P-code file compileHidden.p was generated prior to MATLAB version 7.5 (R2007b) and will not be supported in a future
release.  Use pcode to regenerate compileHidden.p using MATLAB R2007b or later. 
> In makefile at 34 
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c:190:20: error: malloc.h: No such file or directory
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c: In function 'setup':
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c:825: warning: assignment discards qualifiers from pointer target type
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c:1117: warning: assignment discards qualifiers from pointer target type
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c:1153: warning: assignment discards qualifiers from pointer target type
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c:1231: warning: assignment discards qualifiers from pointer target type
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c:1288: warning: assignment discards qualifiers from pointer target type
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c:1329: warning: assignment discards qualifiers from pointer target type
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c:1411: warning: assignment discards qualifiers from pointer target type
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c:1534: warning: assignment discards qualifiers from pointer target type
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c:1632: warning: assignment discards qualifiers from pointer target type
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c: In function 'mexFunction':
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c:3252: warning: cast from pointer to integer of different size
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c:3438: warning: assignment discards qualifiers from pointer target type
/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c:3471: warning: format '%d' expects type 'int', but argument 7 has type 'long int'

    mex: compile of ' "/private/tmp/tpba7ee21b_f0fa_4bcb_ab5e_77510aafc60b/cvodesGenmod5.c"' failed.

Undefined function or variable 'ME'.

Error in /DATA/COMKAT_R3/utilities/compileHidden.p>compileHidden (line 23)


Error in makefile (line 34)
compileHidden;

Attachment(optional):

Additional contact information (optional):