Executable file not working
Mostrar comentarios más antiguos
I have a GUI, which I created a standalone of it. My GUI works fine in Matlab environment but I know that the executable version is not doing what it was supposed to do. How can I know that where it breaks? How can I debug?
2 comentarios
Walter Roberson
el 16 de Feb. de 2016
Are there any hints about what is going wrong? What do you observe that is different than the non-.exe version?
Praveen Choudhury
el 16 de Feb. de 2016
Respuestas (1)
Image Analyst
el 16 de Feb. de 2016
0 votos
What is the filename? It isn't in a folder where you don't have permission to write to, like c:\program files\matlab for instance? Please copy and paste the complete error message - everything that it spews to the console window.
10 comentarios
Praveen Choudhury
el 16 de Feb. de 2016
Image Analyst
el 16 de Feb. de 2016
Editada: Image Analyst
el 16 de Feb. de 2016
Well a specific error message isn't there - it could be almost anything. It looks like the main routine is createexcelreport_1() and it calls createchecklist_2(), when you then click the Save button in createchecklist_2 and then the error gets generated. Is that right?
Did you look at the FAQ? Otherwise, try putting in as many messages with fprintf() or uiwait(msgbox()) as you can - like before every line in the save button callback showing you what the variable values are.
Otherwise, call tech support.
I presume it runs properly in MATLAB, right? And eWorkbook is a valid object - not null or undefined, right?
Praveen Choudhury
el 16 de Feb. de 2016
Praveen Choudhury
el 16 de Feb. de 2016
Image Analyst
el 16 de Feb. de 2016
Is Excel already open? Type control-shift-Esc before you run the program to double check. It might not be able to save it if it is already open in a prior instance of Excel.
Praveen Choudhury
el 16 de Feb. de 2016
Image Analyst
el 16 de Feb. de 2016
Are you 100% sure that the C:\Praveen\Tools\OBD Checklist\Reports folder exists on the target computer? Check beforehand. Create it if it's not there or select a different folder:
[folder, baseNameNoExt, ext] = fileparts(filename);
if ~exist(folder, 'dir')
message = sprintf('Warning: folder does not exist:\n%s\nWorkbook not saved!', folder);
uiwait(warndlg(message));
else
% Delete any prior file
recycle('on'); % Deleted files will go to recycle bin.
delete(filename);
% Save this one.
eWorkbook.SaveAs(filename);
end
Praveen Choudhury
el 17 de Feb. de 2016
Image Analyst
el 17 de Feb. de 2016
So, just to be clear, your development computer is the same as the target computer that you deployed the compiled app to?
Praveen Choudhury
el 17 de Feb. de 2016
Categorías
Más información sobre Debugging and Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!