From: Jim on 12 May 2010 15:30 I've built a MATLAB GUI and can get it to run and respond to button clicks, etc. It works just fine. However, one of my buttons doesn't work and is producing some sort of error. I get the Windows *ding* when I press the button, so I know it's failing. The problem is -- I don't get a command prompt or output window with my MATLAB errors appearing in it. So, I have no idea what the bug is so I can fix it. When I run the same script within MATLAB that button works. So, I can't even go back and try and debug it within MATLAB since the error must be related to running it separately. Thus, I'm at a little bit of an impasse. Any advice on how to force Vista to produce a CMD-like window or some other method of having this posted someplace? For example, could I workaround this via maybe a config option to override stdout and/or stderr to a log file? (If that exists...) Full disclosure -- my GUI connects to CQG, which is a charting tool used by futures traders. I'm using some boilerplate code provided by CQG to get that connection up. And, it does run just fine from within MATLAB, just not as the standalone exe. Thus, it's quite possible (translation -- tremendously probable) that there's some sort of setup issue I need to resolve, like a DLL not in the path. The key is that I won't know what it is until I can read the error... Thanks! Jim
From: Jim on 13 May 2010 11:59 For those interested in this topic, I tried to use the diary function and I have some output now. It's a little puzzling, so I'll have to work my way through it. However, it did provide me something to work with at least. I'm still interested to see if there's another way to redirect the output. But, for now, I at least have an error to look at. - Jim
From: Matthew Whitaker on 13 May 2010 12:21 "Jim " <removethisheader.ortliebj(a)earthlinl.net> wrote in message <hsevkf$gce$1(a)fred.mathworks.com>... > I've built a MATLAB GUI and can get it to run and respond to button clicks, etc. It works just fine. > > However, one of my buttons doesn't work and is producing some sort of error. I get the Windows *ding* when I press the button, so I know it's failing. The problem is -- I don't get a command prompt or output window with my MATLAB errors appearing in it. So, I have no idea what the bug is so I can fix it. > > When I run the same script within MATLAB that button works. So, I can't even go back and try and debug it within MATLAB since the error must be related to running it separately. > > Thus, I'm at a little bit of an impasse. Any advice on how to force Vista to produce a CMD-like window or some other method of having this posted someplace? For example, could I workaround this via maybe a config option to override stdout and/or stderr to a log file? (If that exists...) > > Full disclosure -- my GUI connects to CQG, which is a charting tool used by futures traders. I'm using some boilerplate code provided by CQG to get that connection up. And, it does run just fine from within MATLAB, just not as the standalone exe. Thus, it's quite possible (translation -- tremendously probable) that there's some sort of setup issue I need to resolve, like a DLL not in the path. The key is that I won't know what it is until I can read the error... > > > Thanks! > Jim What you might want to do is add a log file to the parameters on your mcc command when you compile: So some like: -R -logfile -R output.MY_APP_NAME_LOG This will dump all the output including error messages into a text file. Hope this helps Matt W
From: Jim on 14 May 2010 15:21 Ok. I've added the following to my mcc command: -R -logfile -R TestCQG.log And, that resulted in an exception: Error writing to output stream. I read a number of articles on various places about similar problems and they suggested to use 'evalc' to basically eliminate this. So, I wrapped my GUIDE-created GUI with a trivial script that uses evalc to call my GUI, and then built that. But to no avail; still the same error occurs. Any advice/help? Let me know if you need any additional info to help assess btw. Thanks a lot! Jim
From: Matthew Whitaker on 14 May 2010 16:27
"Jim " <removethisheader.ortliebj(a)earthlink.net> wrote in message <hsk7r0$o3d$1(a)fred.mathworks.com>... > Ok. I've added the following to my mcc command: > > -R -logfile -R TestCQG.log > > And, that resulted in an exception: > > Error writing to output stream. > > I read a number of articles on various places about similar problems and they suggested to use 'evalc' to basically eliminate this. So, I wrapped my GUIDE-created GUI with a trivial script that uses evalc to call my GUI, and then built that. But to no avail; still the same error occurs. > > Any advice/help? > > Let me know if you need any additional info to help assess btw. > > > Thanks a lot! > Jim Ok, strange that should give you an error. I have a deployed app where that works like a charm. Try this. If you have a -e in your mcc command replace it with a -m. This should result in a dos window opening with your app. That dos window should get all the output. I'm assuming you are running a Windows system here. |