[prev in list] [next in list] [prev in thread] [next in thread] 

List:       scilab-users
Subject:    [Scilab-users] Open comport in C macro
From:       Piotr_Głębski <sasza7 () gmail ! com>
Date:       2013-11-26 0:21:16
Message-ID: CAHKEG=z+A_iTL0BoMSvs_0-Fim0PZQPOFVXQyY4usqGKh0eKzw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I try to develop some hardware which I want to connect to Xcos in Linux
(simply DAQ).
Right now i write macro making a block in Xcos. I can put parameters to my
C library and get date from (loopback). Right now i try to connect to
usb/rs device using this library: http://www.teuniz.net/RS-232/
And get this error:

!Oups. A fatal error has been detected by Scilab.                    !
!                                                                    !
!Your instance will probably crash soon.                             !
!                                                                    !
!Please report a bug on http://bugzilla.scilab.org/                  !
!                                                                    !
!with:                                                               !
!                                                                    !
!* a sample code which reproduces the issue                          !
!                                                                    !
!* the result of [a, b] = getdebuginfo()                             !
!                                                                    !
!* the following information:                                        !
!                                                                    !
![debian:10408] Signal: Segmentation fault (11)                      !
!                                                                    !
![debian:10408] Signal code: Invalid permissions (2)                 !
!                                                                    !
![debian:10408] Failing at address: 0x7f36042c1d10                   !
!                                                                    !
!                                                                    !
!                                                                    !
!Stos wywołań:                                                     !
!                                                                    !
!   1: 0x7107eb < >                              (/opt/scilab-5.4.1/t!
!     hirdparty/java//lib/amd64/server/libjvm.so)                    !
!                                                                    !
!   2: 0x714350 <JVM_handle_linux_signal>        (/opt/scilab-5.4.1/t!
!     hirdparty/java//lib/amd64/server/libjvm.so)                    !
!                                                                    !
!   3: 0x7106fe < >                              (/opt/scilab-5.4.1/t!
!     hirdparty/java//lib/amd64/server/libjvm.so)                    !
!                                                                    !
!   4: 0xf030   < >                              (/lib/x86_64-linux-g!
!     nu/libpthread.so.0)                                            !
!                                                                    !
!   5: 0x190b   <OpenComport>                    (/home/sasza/scilab/!
!     LewitronInC3/src/c/liblewitron.so)                             !
!                                                                    !
!   6: 0x139a   <StartTransmision>               (/home/sasza/scilab/!
!     LewitronInC3/src/c/liblewitron.so)                             !
!                                                                    !
!   7: 0x1235   <lewitron>                       (/home/sasza/scilab/!
!     LewitronInC3/src/c/liblewitron.so)                             !
!                                                                    !
!   8: 0x2852c  <callf>                          (/opt/scilab-5.4.1/l!
!     ib/scilab/libsciscicos.so)                                     !
!                                                                    !
!   9: 0x31919  <scicos_>                        (/opt/scilab-5.4.1/l!
!     ib/scilab/libsciscicos.so)                                     !

Becose i devide program into parts i can use the same source in standalone
application - it's work perfectly.
The problem is probably permission to /dev/ttyUSB. I don't know exactly the
structure of scilab, but i think that the java virtual machine not allowed
to open comport. So the question is: how to workaround it? (for dirty
solution i try to exectue evrything as root, but it has not effect :/ )
Any ideas?
Thanks for any replays
Piotr

[Attachment #5 (text/html)]

<div dir="ltr">I try to develop some hardware which I want to connect to Xcos in \
Linux (simply DAQ).<div>Right now i write macro making a block in Xcos. I can put \
parameters to my C library and get date from (loopback). Right now i try to connect \
to usb/rs device using this library: <a \
href="http://www.teuniz.net/RS-232/">http://www.teuniz.net/RS-232/</a></div> <div>And \
get this error:</div><div><div><br></div><div>!Oups. A fatal error has been detected \
by Scilab.                    !</div><div>!                                           \
!</div><div>!Your instance will probably crash soon.                             \
!</div> <div>!                                                                    \
!</div><div>!Please report a bug on <a \
href="http://bugzilla.scilab.org/">http://bugzilla.scilab.org/</a>                  \
!</div><div>!                                                                    \
!</div> <div>!with:                                                               \
!</div><div>!                                                                    \
!</div><div>!* a sample code which reproduces the issue                          \
!</div> <div>!                                                                    \
!</div><div>!* the result of [a, b] = getdebuginfo()                             \
!</div><div>!                                                                    \
!</div> <div>!* the following information:                                        \
!</div><div>!                                                                    \
!</div><div>![debian:10408] Signal: Segmentation fault (11)                      \
!</div> <div>!                                                                    \
!</div><div>![debian:10408] Signal code: Invalid permissions (2)                 \
!</div><div>!                                                                    \
!</div> <div>![debian:10408] Failing at address: 0x7f36042c1d10                   \
!</div><div>!                                                                    \
!</div><div>!                                                                    \
!</div> <div>!                                                                    \
!</div><div>!Stos wywołań:                                                     \
!</div><div>!                                                                    \
!</div> <div>!   1: 0x7107eb &lt; &gt;                              \
(/opt/scilab-5.4.1/t!</div><div>!     hirdparty/java//lib/amd64/server/libjvm.so)     \
!</div><div>!                                                                    \
!</div> <div>!   2: 0x714350 &lt;JVM_handle_linux_signal&gt;        \
(/opt/scilab-5.4.1/t!</div><div>!     hirdparty/java//lib/amd64/server/libjvm.so)     \
!</div><div>!                                                                    \
!</div> <div>!   3: 0x7106fe &lt; &gt;                              \
(/opt/scilab-5.4.1/t!</div><div>!     hirdparty/java//lib/amd64/server/libjvm.so)     \
!</div><div>!                                                                    \
!</div> <div>!   4: 0xf030   &lt; &gt;                              \
(/lib/x86_64-linux-g!</div><div>!     nu/libpthread.so.0)                             \
!</div><div>!                                                                    \
!</div> <div>!   5: 0x190b   &lt;OpenComport&gt;                    \
(/home/sasza/scilab/!</div><div>!     LewitronInC3/src/c/liblewitron.so)              \
!</div><div>!                                                                    \
!</div> <div>!   6: 0x139a   &lt;StartTransmision&gt;               \
(/home/sasza/scilab/!</div><div>!     LewitronInC3/src/c/liblewitron.so)              \
!</div><div>!                                                                    \
!</div> <div>!   7: 0x1235   &lt;lewitron&gt;                       \
(/home/sasza/scilab/!</div><div>!     LewitronInC3/src/c/liblewitron.so)              \
!</div><div>!                                                                    \
!</div> <div>!   8: 0x2852c  &lt;callf&gt;                          \
(/opt/scilab-5.4.1/l!</div><div>!     ib/scilab/libsciscicos.so)                      \
!</div><div>!                                                                    \
!</div> <div>!   9: 0x31919  &lt;scicos_&gt;                        \
(/opt/scilab-5.4.1/l!</div><div>!     ib/scilab/libsciscicos.so)                      \
!</div></div><div><br></div><div>Becose i devide program into parts i can use the \
same source in standalone application - it&#39;s work perfectly.</div> <div>The \
problem is probably permission to /dev/ttyUSB. I don&#39;t know exactly the structure \
of scilab, but i think that the java virtual machine not allowed to open comport. So \
the question is: how to workaround it? (for dirty solution i try to exectue evrything \
as root, but it has not effect :/ )</div> <div>Any ideas?</div><div>Thanks for any \
replays</div><div>Piotr</div></div>



_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic