code runs perfectly in matlab, compiles in matlab compiler 4.14 perfetly, starts running, runs perfect in all functions, yet freezes when operating one specific task...

3 Ansichten (letzte 30 Tage)
I am using Matlab 2010 , 32 bit.... It is installed on a 64 bit windows 7....
All my work is done through the 32 bit domain, there is no 64 intereference. Only the destination of the file is directly on C.
I have several m files, that I compiled using Matlab compiler 4.14 (included in matlab).... I made sure I added all the paths to the main file, and the program compiles perfectly....
I have to mention that the program runs perfectly when its directly run from matlab.
However, when I compile the program, and produce the exe file (windows standalone application), all parts of the GUI seem to be working fine, such as the open, view camera, play movie and so on....
When I press Record movie, the exe file freezes, and it shows the the file is "Not Responding". I end up "ending the task" of the exe file to exit the whole thing.
I donwloaded visual C++ , and sdk, yet did not help. I went as far as downloading java , and stilll , nothing.
What i can't get over is that the program works perfectly when run through matlab directly.
When a coding error occurs, i hear a beep in my speakers, to know the this was a coding issue. Yet i hear no beep when it is frozen.
My two questions are:
1- Previous Matlab compiler versions included the DOS so i would be able to track the error and read what happens. This is not the case in this compiler. I cant track the error, i have to depend on hearing the beep. How do i include the DOS with the launch of the exe so i would visually see the error.
2- Let say that there is no error whatsover, why does it freeze when there are no problems when executed through matlab directly?
I appreraciate all the help.
  6 Kommentare
Kaustubha Govind
Kaustubha Govind am 6 Mai 2011
Charles: I don't know of any issues in deployed applications with addframe, but it might be worth putting in some "disp" statements in your code to monitor the progress - this might help you narrow down the issue. Also, you can use "memory" to monitor available memory.
Walter Roberson
Walter Roberson am 6 Mai 2011
I would suggest using the Windows Dependency Walker, http://www.dependencywalker.com/ to cross-check that all needed functions are in place.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Charles
Charles am 9 Mai 2011
I figured it out the next day....
I sat down debugging every line of the code step by step....
The freezing occured when a "uicontrol" was used, and the button on the uicontrol launched the video recording mode.
As soon as I press "Record", the uicontrol window is closed, and the recording mode is directly run after that.
What i did is closed the uicontrol window, paused the code for 2 seconds, and ran the video recording after that.
In the matlab compiler, without a pause, the code would start recording, yet it would still try to exit the uicontrol.... Which causes the freezing.
Who would have known that a simple pause function could go all the way.
A big thanks to all who shared comments and had suggestions.

Weitere Antworten (1)

naila
naila am 14 Jan. 2014
Hi, I also installed MATLAB 2010 version of 32 bit on 64 bit window 7 ultimate. But it need MATLAB Compiler 4.14 for processing the code. you already have Compiler 4.14 please can you forward me that.
really Thanks

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by