Hello! I have the folowing code that crashes Matlab when used with calllib: str= char(zeros(1,256,'int8'));%allocate buffer string [r, fileName] = calllib('dllDialog','OpFileDlg',strIn, uint32(opt)); C function: BOOL OpFileDlg(PSTR str, UINT opt) After a dialog is shown the copy is done from a string array (which contains the file result) via the following function: void DoubleZeroCopy(str, fileName) void DoubleZeroCopy(char* dest, char *source) { UINT i = 0; while(TRUE) { dest[i] = source[i]; if((source[i]== 0)&&(source[i-1]==0)) break; //double null reached i++; } } I make this copy only when i use OK button. The case when i use cancel doesn't crash it. The file path has 44 chracters, but i allocate 256. I'm using WinVista64 and Matlab R2009a 32bits. The crash message i get is: Fault Count: 1 Register State: EAX = 1dd27d50 EBX = 01780000 ECX = 00000000 EDX = 00000000 ESI = 1dd27d48 EDI = 1dd92d80 EBP = 00c2814c ESP = 00c28124 EIP = 77330267 FLG = 00010246 Stack Trace: [0] ntdll.dll:0x77330267(0x01780000, 0x1dd92d80, 0x00c281f4 "lo", 0) [1] ntdll.dll:0x772ff676(0x1dd92d80, 0x1dd92d88, 0x1dd92d88, 1) [2] ntdll.dll:0x772ff285(0x01780000, 0, 0x1dd92d80, 0x00c282c0) [3] kernel32.dll:0x75bc3621(0x01780000, 0, 0x1dd92d88, 0xf7d0a296) [4] MSVCR80.dll:0x73b74c39(0x1dd92d88, 0x00c282d8, 0x0c4f9d2d, 0x1dd92d88) [5] libut.dll:_utFree(0x1dd92d88, 0x00c282f8, 0x0c4e858f, 0x1dd92d88) + 30 bytes [6] libmwcli.dll:0x0c4f9d2d(0x1dd92d88, 0x1dd98140 "@ý_d", 2, 0x1db292f8) [7] libmwcli.dll:0x0c4e858f(0, 0x00c2858c, 2, 0x1dd936c8) [8] libmwcli.dll:0x0c4e8fec(0x1df2e310 "phfile", 0x1df57900 "PhGetOpenCineName", 2, 0x00c28524) [9] libmwcli.dll:0x0c4e90e1(2, 0x00c28524, 0x1df2e310 "phfile", 0x00c28584) [10] m_dispatcher.dll:public: virtual void __thiscall Mfh_builtin::dispatch_mf(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00c28524, 4, 0x00c28584) + 92 bytes [11] m_dispatcher.dll:public: virtual void __thiscall Mfh_MATLAB_fn::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00c28524, 4, 0x00c28584) + 193 bytes [12] m_interpreter.dll:int __cdecl inDispatchFromStack(int,char const *,int,int)(163, 0x1dc4aedc "calllib", 2, 4) + 623 bytes [13] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 109, 5, 0) + 1317 bytes [14] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 109, 3, 0) + 39 bytes [15] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 109, 3, 0) + 251 bytes [16] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0xffffff00, 0xffffffff, 0x1cb75788, 2) + 935 bytes [17] m_interpreter.dll:void __cdecl inRunMfile(int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_mp *,struct inWorkSpace_tag *)(2, 0x00c28d18, 1, 0x00c28c88) + 466 bytes [18] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 2, 0x00c28d18, 1) + 23 bytes [19] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00c28d18, 1, 0x00c28c88) + 22 bytes ..................................................... [91] uiw.dll:public: virtual char * __thiscall uiw::UIW_IOProxy::getCmdWindowCommand(char *,int)const (0x78665770, 4096, 0, 0) + 16 bytes [92] bridge.dll:char * __cdecl winReadStdin(char * const,unsigned int,bool)(0x78665770, 4096, 0, 0x00c2f9d4) + 79 bytes [93] bridge.dll:char * __cdecl ioReadLineOS(bool,struct _iobuf * const,char * const,char * const,int,bool * const,void (__cdecl*const)(void),char * (__cdecl*const)(char * const,unsigned int,bool))(0, 0x73c01b78 "@IÀs", 0x1d9a04c0, 4096) + 265 bytes [94] bridge.dll:char * __cdecl ioReadLine(bool,struct _iobuf *,char *,char *,int,bool *)(0, 0x73c01b78 "@IÀs", 0x1d9a04c0, 0x1d9a04c0) + 99 bytes [95] bridge.dll:void __cdecl mnGetFullLine(char * *,unsigned int *,unsigned int *,bool)(0x00c2f9d8, 0x00c2f9cc, 0, 0x7b2b7e59) + 203 bytes [96] bridge.dll:_mnGetCommandLineBuffer(0, 0x00c2fc80, 0x07057280, 0) + 124 bytes [97] bridge.dll:__catch$_mnParser$0(0x01abd450, 0x0fc43a40, 0x00c2fb01, 0x00c2fae0) + 164 bytes [98] mcr.dll:private: void __thiscall mcrInstance::mnParser_on_interpreter_thread(void)(0x070572b8, 0x00c2fb48, 0x040fec00 "Ð\8y", 0x040f65f8) + 51 bytes [99] mcr.dll:public: void __thiscall boost::function0<void>::operator()(void)const (0x00c2fc80, 0x07057280, 0, 0x07057280) + 63 bytes [100] mcr.dll:public: virtual void __thiscall mcr::runtime::InterpreterThread::Impl::NoResultInvocationRequest::run(void)(0x79a92a60, 0x040fec00 "Ð\8y", 0x040ff510, 0x06b11f28) + 53 bytes [101] mcr.dll:private: static void __cdecl mcr::runtime::InterpreterThread::Impl::invocation_request_handler(int)(0x07057280, 0x00c2fc80, 0x00030000 "Actx ", 0x00c2fc80) + 40 bytes [102] uiw.dll:bool __cdecl UIW_DispatchUserMessage(int,int)(9225, 0x07057280, 0xfffdb800, 0x040ff108) + 73 bytes [103] uiw.dll:long __stdcall HandleUserMsgHook(int,unsigned int,long)(0, 1, 0x00c2fc80, 0x79493520) + 95 bytes [104] USER32.dll:0x7635585a(0x00030000 "Actx ", 1, 0x00c2fc80, 0x7aba74f0) [105] USER32.dll:0x76337c70(0x00c2fc70, 0x00c2fc80, 0x00c2fc9c, 0) [106] USER32.dll:0x7633834d(0x00c2fc70, 0, 0x00c2fd78 "¸ýÂ", 0x772f2e60) [107] ntdll.dll:0x772f2ed6(0x00c2fce8, 0, 0, 0) [108] uiw.dll:void __cdecl UIW_GetAndDispatchMessage(struct tagMSG *)(0x00c2fce8, 3, 3, 0x01cc0a60) + 20 bytes [109] uiw.dll:void __cdecl UIW_GetAndDispatchMessage(void)(0x01a77678, 0, 0x01ab6ac0, 0) + 15 bytes [110] uiw.dll:void __cdecl ws_ProcessPendingEventsMainLoop(int,bool)(1, 0, 0x00c2fd84 "ÄýÂ", 0x79a9543a) + 356 bytes [111] uiw.dll:void __cdecl ws_ProcessPendingEvents(int,int)(1, 0xffffffff, 0x01a77678, 0x01ab6ac0) + 14 bytes [112] mcr.dll:public: void __thiscall mcr::runtime::InterpreterThread::Impl::process_events(class boost::shared_ptr<class mcr::runtime::InterpreterThread::Impl> const &)(0x00c2fddc, 2, 0x01ab6598, 0x049fdd6c) + 138 bytes [113] mcr.dll:__catch$?run@Impl@InterpreterThread@runtime@mcr@@QAEKABV?$shared_ptr@VImpl@InterpreterThread@runtime@mcr@@@boost@@PAUinit_context@1234@@Z$0(0x00c2fddc, 0x01ab7628, 0x79a95800, 0x01abcc00) + 128 bytes [114] mcr.dll:unsigned long __cdecl run_init_and_handle_events(void *)(0x049fdd6c, 0, 0x01ab6520, 0) + 76 bytes [115] mcr.dll:private: void __thiscall mcr::runtime::InterpreterThreadFactory::runThreadFunction(void)(0x00c2fe90, 0x00c2fe48, 0x00c2fe4c "¸þÂ", 0x7b299c7c) + 108 bytes [116] MATLAB.exe:public: void __thiscall boost::function0<void>::operator()(void)const (2239972, 0x004077d4, 0, 0x73b71731) + 63 bytes [117] MATLAB.exe:int __cdecl mcrMain(int,char const * * const)(1, 0x01aaf950, 4194304, 10) + 230 bytes [118] MATLAB.exe:_WinMain@16(4194304, 0, 2239972, 10) + 75 bytes [119] MATLAB.exe:___tmainCRTStartup(0xfffde000, 0x00c2ffd4 "ìÿÂ", 0x7734cfed, 0xfffde000) + 320 bytes [120] kernel32.dll:0x75bce4a5(0xfffde000, 0x76568b15, 0, 0) [121] ntdll.dll:0x7734cfed(0x0040324a, 0xfffde000, 0, 0) [122] ntdll.dll:0x7734d1ff(0x0040324a, 0xfffde000, 0, 48) Thank You in advance!

0 |

11/11/2010 5:02:04 PM

Solution is: str= char(ones(256,1,'int8'));

0 |

11/15/2010 11:55:06 AM

Hi, I'm trying to use Cantera on windows 7 Professional 64bit using Matlab R2010b. Matlab crashes as soon as function: advance(reactor, t) is getting executed. I have installed Cantera 1.88 and Python 2.6 (both for 64 bit windows). The same code works perfectly fine on a 32bit machine where i have Cantera 1.7 and Python 2.5. I'm using the correct executable(ctmethods.mexw64) file for 64bit machine. Any help will be appreciated. Regards Prakhar (grad student, Caltech) ...

Hello, I have a problem calling C code from Matlab. The mex file compilation is ok. When I run the program Matlab (7.3) crashes. Below is the mexFunction code. Any idea is welcome. (I think the main part of the code (middle part) is not useful for the crash problem, but I put it anyway). //########################################################### #include "math.h" #include "mex.h" void mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { // Standard variables int p,r,h,i,j,f,w; // Indices for loop int MAX_NBM = 1000; int MAX_DIM = 10; int MAX_NB_CLUST = 20; double *SF, *km, *new_data; int size, dim, K, nbm, aux_size, count_bis, count_aux; double diam_max, diam, vec1_p, vec2_p, dist_min, dis; int combi[1000000][2]; int dist_aux[1000000][2]; /* Check for proper number of arguments. */ if (nrhs != 5) { mexErrMsgTxt("5 input required."); } else if (nlhs > 1) { mexErrMsgTxt("Too many output arguments"); } // Input parameter (MATLAB) new_data = mxGetPr(prhs[0]); size = (int)mxGetScalar(prhs[1]); dim = (int)mxGetScalar(prhs[2]); K = (int)mxGetScalar(prhs[3]); km = mxGetPr(prhs[4]); // Output parameter (MATLAB) plhs[0] = mxCreateDoubleMatrix(1,1,mxREAL); SF = mxGetPr(plhs[0]); // Other variables nbm = size/dim; // Number of points printf("Taille: %d\n",nbm); printf("Dimension: %d\n",dim); //#############################...

Hello, I have a problem calling C code from Matlab. The mex file compilation is ok. When I run the program Matlab (7.3) crashes. Below is the mexFunction code. Any idea is welcome. (I think the main part of the code (middle part) is not useful for the crash problem, but I put it anyway). //########################################################### #include "math.h" #include "mex.h" void mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { // Standard variables int p,r,h,i,j,f,w; // Indices for loop int MAX_NBM = 1000; int MAX_DIM = 10; in...

Hello, I loaded and used dll with Matlab2007b. All worked fine. After I tryed the same script in Matlab2008a, it get crashed. With following message: Saving minidump to file C:\Users\joe\AppData\Local\Temp\matlab_crash_dump.5660.0.dmp ------------------------------------------------------------ ------------ Segmentation violation detected at Sat May 10 11:45:13 2008 ------------------------------------------------------------ ------------ Configuration: MATLAB Version: 7.6.0.324 (R2008a) MATLAB License: 161051 Operating System: Microsoft Windows Vis...

I'm making an end-user application where I would like to use Matlab functionality both for calculation and plotting. Matlabs GUI builder guide does not satisfy my needs (no support for f.ex. internal frames and other nescessities), so I'm planning to compile my Matlab code and use other API (Java, QT or something) for GUI. My problem is then, that I loose access to the neat plotting commands availible under matlab GUI... Is there a way of integrating Matlabs plot functionality into another GUI system? - has it been done? - I appreciate any response! - P�l Berge ...

I succesfully Installed Matlab R14 in my notebook under Windows XP Sp2 When I open Matlab, the working area succesfully pop up but it immediately cloeses I cannt figure out what to do Any suggestion? Thnaks edo Berlioz Berlioz wrote: > I succesfully Installed Matlab R14 in my notebook under > Windows XP Sp2 > > When I open Matlab, the working area succesfully pop up but > it immediately cloeses > > I cannt figure out what to do > > Any suggestion? > > Thnaks edo Contact support? And "thnaks" sounds awfully cool ;-) Michael On Sep 14, 11:2...

Hello everyone, How do I compile MATLAB M files into a form that can then be called from within the MATLAB interpreter? A roundabout way would seem to be to (somehow) Turn the matlab code into C (I think mcc does this), then compile this C code into MEX format and call that. Is there an easier way? I have the MATLAB compiler, so I just need to know what to do with it to get this to work. Thanks in advance, Sina sina.tootoonian wrote: > > > Hello everyone, > > How do I compile MATLAB M files into a form that can then be called > from within the MATLAB interpreter? A roundabout way would seem to > be > to (somehow) Turn the matlab code into C (I think mcc does this), > then > compile this C code into MEX format and call that. Is there an > easier > way? I have the MATLAB compiler, so I just need to know what to do > with > it to get this to work. > > Thanks in advance, > > Sina > > HELP MEX > HELP MEX Or, better, HELP MCC help pcode pseudo code is useful to obfuscate code - protect algorithms, yet still run at full speed and be distributable to other matlab users sina.tootoonian wrote: > > > Hello everyone, > > How do I compile MATLAB M files into a form that can then be called > from within the MATLAB interpreter? A roundabout way would seem to > be > to (somehow) Turn the matlab code into C (I think mcc does this), > then > compile this C code into MEX format and call that...

Hi, I created a dll by linking under Matlab several .obj files with the gateway function appropriate (I'm starting from Fortran90). When I launch the program from command window, every time Matlab crashes and this is the report: ------------------------------------------------------------------------ Segmentation violation detected at Mon Sep 24 09:35:33 2007 ------------------------------------------------------------------------ Configuration: MATLAB Version: 6.5.0.180913a (R13) Operating System: Microsoft Windows XP Window System: Version 5.1 (Build 2600: Service P...

Hi all, I'm going to work on a project involving a parallel version of MATLAB - I'm aware of various efforts like MATLAB-*P and so on Right now I need to read up on some material regarding MATLAB internals eg: How are the ATLAS(or is it BLAS) routines called in MATLAB? How does MATLAB's C code store information in memory, cache'ing etc? How is one to get at those? Do you know of any suitable reference(s)/resource(s)? Thank you very much, Aravind ...

I Installed Matlab R14 in my notebook under Windows XP Sp2 When I open Matlab, the working area comes up but it immediately cloeses so fast before I can even do anything. my laptop has an AMD SEMPRON 3003 processor if that helps. please help. thanks! "jj " <lasborn.nospam@mathworks.com> wrote in message news:fcs8dd$1d6$1@fred.mathworks.com... >I Installed Matlab R14 in my notebook under > Windows XP Sp2 > > When I open Matlab, the working area comes up but > it immediately cloeses so fast before I can even do > anything. > > my laptop has an A...

I have the following structure which i pass to a C function via calllib typedef struct tagRGBQUAD { BYTE rgbBlue; BYTE rgbGreen; BYTE rgbRed; BYTE rgbReserved; } RGBQUAD; typedef struct tagBITMAPINFO { BITMAPINFOHEADER bmiHeader; RGBQUAD bmiColors[1]; } BITMAPINFO, *PBITMAPINFO; The C function will return 256 RGBQUAD to bmiColors. When matlab returns from function it crashehes at m_interpreter.dll. I tried different way to declare the structure in header file like: RGBQUAD bmiColors[256] but happened the same crash. The only sol...

any one please can help me sploving the following question 1________Given the causal system y[n] =3D 0.9y[n-1] + x[n], find H(z) and sketch the pole-zero plot. See the functions roots.m and zplane.m. 2___ Plot the magnitude and phase of H(z) on the frequency axis from 0 =E2=80=93 =EF=81=B0, or normalized frequency 0 - 1, and label the graphs. S= ee the freqz.m command. hani_al_yazidi@hotmail.com wrote: > any one please can help me sploving the following question > > > 1________Given the causal system > > y[n] = 0.9y[n-1] + x[n], > > find H(z) and sketch the pole-zero plot. See the functions roots.m and > zplane.m. > > 2___ Plot the magnitude and phase of H(z) on the frequency axis from 0 > – , or normalized frequency 0 - 1, and label the graphs. See the > freqz.m command. It looks like homework. State what you tried and what error messages you got and someone who knows Matlab will probably help. We try not to do homework here, but (like gods) we do help those who help themselves. Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯&...

Hello , I'm a new user in Matlab. So should you advise matlab notes , documentation please ? <azatserver113@gmail.com> wrote in message news:7b4e75e2-40c6-43bb-acc6-2553123ba649@googlegroups.com... > Hello , > > I'm a new user in Matlab. So should you advise matlab notes , > documentation please ? > At the MATLAB command prompt type this command: doc This will show the documentation included as part of your installation. I recommend reading through the Getting Started section of the MATLAB documentation first, and executing the examp...

can Matlab support 32-bit matlab version scripts on 64-bit version of matlab in windows platform?.if yes , how is the performance better ? please do answer this question thank u "Gangamma " <gangvsng@gmail.com> wrote in message <hvmr7h$sn0$1@fred.mathworks.com>... > can Matlab support 32-bit matlab version scripts on 64-bit version of matlab in windows platform?.if yes , how is the performance better ? Yes, Matlab program written in 32/64 bits are compatible accepted MEX file. 64-bit version can handle larger array but does *NOT* improve speed. Br...

can Matlab support 32-bit matlab version scripts on 64-bit version of matlab in windows platform?.if yes , how is the performance better ? please do answer this question thank u ...

Hi, I've noticed everytime I start my computer, matlab.exe starts automatically and consumes a considerable amount of memory space which slows down my computer. Is there an option to prevent this process from starting automatically each time my computer starts. I have Windows XP operating system. I have matlab 6.5. Thanks. Fenisol3 puffy_blake wrote: > Hi, > I've noticed everytime I start my computer, matlab.exe starts automatically > and consumes a considerable amount of memory space which slows down my > computer. Is there an option to prevent this process from starti...

hi, i want to upgrade my Matlab 6.5 to Matlab7, will it cause any effects to the M-files that i saved before? Or do I need to uninstall the Matlab 6.5 first before installing the Matlab 7? regards, blur On Fri, 25 Feb 2005 13:03:13 +0000, Blur wrote: > hi, > i want to upgrade my Matlab 6.5 to Matlab7, will it cause any effects > to the M-files that i saved before? See http://www.mathworks.com/access/helpdesk/help/techdoc/rn/r14sp1_a.html for information on changes to the Matlab programming language that may affect old m-files. For the most part the changes are minor, and most ...

I am trying to execute some code (a mixture of C++ and Matlab) that was delivered to me. The Matlab code was originally developed under Matlab R14. I have Matlab R2006b installed on my system. When I attempt to execute the program, I get the following message: I18N Runtime warning: Missing ICU data file detected while processing $(MATLAB)/bin/$(ARCH). Hint: Check for a misconfigured environment or installation. When I look in the referenced directory, there does appear to be an ICU related .dat file. Any ideas as to what could be causing this runtime warning? Thanks. ...

I'm looking for matlab compiler for matlab 5.2 for Mac computers. I wasn't able to find anywhere because the Mathworks doesn't produce it. Do you know were I may find it? Thanks ...

I am looking for information here on the MathWorks website about the changes between MATLAB 6 and MATLAB 7. Specifically, I am looking for information about changes in the handling of .mat files. For example if I have a mat-file: example.mat located in the MATLAB current directory. In MATLAB 7 I can load this data-file into the MATLAB workspace with: >> load example And it loads fine. If I type the above load command in MATLAB 6 I get and error. Is there anything that provides the technical information for this? Thanks Dave Dave wrote: > I am looking for information here on t...

Hi! Is it posible to make a Daemon in MATLAB so that i can access a shared memory between MATLAB and .NET? I ask this because every method i've tryied to call MATLAB functions from .NET are really slow, mostly the call process (because i call the function about 300.000-1.000.000 times in a small time lapse. I thought that using a Daemon using shared memory between my .NET app and MATLAB would make that performance bottleneck almost dissapear. Any other ideas are really appreciated. By the way, is it posible to open a socket in MATLAB? That would be another possible solution, less performa...

I am trying to create an exe from a matlab function which doubles the number you give it. matlab function: test.m function [output] = test (number) %return double the input number output = 2*number; disp(output); run matlab compiler at command line with: mcc -mv test.m with the resulting exe: test.exe However when I run it at DOS prompt: test 1 I am returned a value of 98. I thought that maybe this was some octal description of the output, but 98 oct is not 2 decimal. Some other results it returned: C:\Documents and Settings\alex\Desktop\lighttrans\Frank Work \test...

Hi, I have a c++ application which uses Matlab engine to save data for further use with Matlab. I need to distribute the application to users that do not have Matlab. Is there a way tp use Matlab Engine with Matlab Runtime Component ? How should I change the compilation to do it ? Thanks, Ofra ...

What is the best Matlab clone and is it good enough to write Matlab software in? I'd like to use one of these free clones to start writing Matlab add-ons. I am aware of Scilab and GNU Octave. The former seems to be more popular. -- Dr Jon D Harrop, Flying Frog Consultancy The F#.NET Journal http://www.ffconsultancy.com/products/fsharp_journal/?usenet Jon Harrop wrote: > > > > What is the best Matlab clone and is it good enough to write Matlab > software > in? > > I'd like to use one of these free clones to start writing Matlab > add-ons. I > am aware ...

" Fossies " - the Fresh Open Source Software archive Member "uae-0.8.29/src/bsdsocket.c" of archive uae-0.8.29.tar.gz : As a special service ...

Resources last updated: 3/15/2016 10:16:57 AM