Question

I use the pnet tcp/udp toolbox) along with psychtoolbox to communicate between two instances of matlab in different machines. One of my machines is a 32 bit win7 running matlab 2010b. The other is a 64 bit win 7 running matlab 2012a. I have a problem in transferring data from one computer to the other.

Experiment 1: Run the udp_send_demo from the 64 bit computer while running the udp_plotter_demo from the 32 bit computer. Expected result: 32 bit computer plots data, waits for keyboard input. If Kb input, close figure and end demo. 64 bit finishes sending and stops demo. Actual result: 64 bit behaves as it should. 32 bit computer plots but hangs and refuses to close the demo. It does not respond to any keyboard input and has to be force closed.

Experiment 2: Run above experiment in reverse with 32 bit sending and 64 bit reading. Expected result: 64 bit plots and waits for Keyboard input. If kb input found, stop demo. Actual result the 64 bit matlab crashes claiming a segmentation violation in the mex file. It displays a stack trace (I am appending a part of it at the end).

Playing around with the port numbers makes no difference. Recompiling the 'pnet.c' source file instead of using the precompiled mex makes no difference. Question: Has anybody tried something like this? Did you get it to work? Can you suggest things to try to get this to work without having to install 32 bit matlab in my Win64 computer?

============

Code:

SERVER SIDE:

udp_send_demo('sin(0:0.1:6)',clientIPStr,portToListen)

CLIENT SIDE:

udp_plotter_demo(portToListen)

=============

Stack Trace


Segmentation violation detected at Sat Sep 29 16:41:11 2012

Configuration:

Crash Decoding : Disabled

Default Encoding: windows-1252

MATLAB Root : C:\Program Files\MATLAB\R2012a

MATLAB Version : 7.14.0.739 (R2012a)

Operating System: Microsoft Windows 7

Processor ID : x86 Family 6 Model 58 Stepping 9, GenuineIntel

Virtual Machine : Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode

Window System : Version 6.1 (Build 7601: Service Pack 1)

Fault Count: 1

Abnormal termination: Segmentation violation

Register State (from fault): RAX = 0000000000000000 RBX = 0000000000000000

RCX = 000000005d0df7d7 RDX = 0000000000000001

RSP = 00000000040671b0 RBP = 0000000004067289

RSI = 000000000000003d RDI = 000000000000003d

R8 = 000000005d0df7d6 R9 = 000050490ee40167

R10 = 000000000000003d R11 = 0000000000000000

R12 = 0000000000000008 R13 = 000007fefb997678

R14 = 0000000000000002 R15 = 0000000000000002

RIP = 000007fefb99238a EFL = 00010202

CS = 0033 FS = 0053 GS = 002b

Stack Trace (from fault):

[ 0] 0x000007fefb99238a C:\Users\ephys-data\Desktop\temp\tcp_udp_ip\pnet.mexw64+00009098 ( perror+004298 )

[ 1] 0x000007fefb99389b C:\Users\ephys-data\Desktop\temp\tcp_udp_ip\pnet.mexw64+00014491 ( mexFunction+001979 )

[ 2] 0x0000000074f10f63 C:\Program Files\MATLAB\R2012a\bin\win64\libmex.dll+00069475 ( mexRunMexFile+000131 )

[ 3] 0x0000000074f0fce2 C:\Program Files\MATLAB\R2012a\bin\win64\libmex.dll+00064738 ( inSwapMexfileReader+000226 )

[ 4] 0x0000000074f0fe58 C:\Program Files\MATLAB\R2012a\bin\win64\libmex.dll+00065112 ( inSwapMexfileReader+000600 )

[ 5] 0x0000000074e4b046 C:\Program Files\MATLAB\R2012a\bin\win64\m_dispatcher.dll+00045126 ( Mfh_file::dispatch_fh+000486 )

....more stuff....

This error was detected while a MEX-file was running. If the MEX-file is not an official MathWorks function, please examine its source code for errors. Please consult the External Interfaces Guide for information on debugging MEX-files.

If this problem is reproducible, please submit a Service Request via:....

A technical support engineer might contact you with further information.

Thank you for your help.


Thanks

-b

Was it helpful?

Solution

I wrote the helpful folks at psychtoolbox. Apparently the bug was caught and resolved in the 'beta' version of psychtoolbox. If you have the latest and greatest psychtoolbox, run UpdatePsychtoolbox for a good night's sleep. See here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top