Support:Bugs and solutions

From COMKAT wiki
Revision as of 20:46, 1 August 2011 by Muzic (talk | contribs) (Reverted edits by MuzicTest (Talk); changed back to last version by Muzic)
Jump to navigation Jump to search

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.

New bugs waiting for response

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: Enter new bug title here

Enter bug description here