Serial Error
              in 
             Core Library Questions 
              •  
              2 years ago    
            
 
            
            I downloaded recent version(1.5.1) from the processing web page. I have tried really basic sketch to open serial port.
            
             
            
            
             
              
             
             
              
             
             
              
             
             
            
             
            
            
             
            
            
             
            
            
             
            
             
            
            
             
            
            
             
            
            
             
            
            
             
            
            
             
              
             
             
              
             
             
              
             
             
              
             
             
              
             
             
              
             
             
              
             
             
               
             
             
               
             
             
            
             
            
            
             
            
             
            
            
             
            
            
             
              
               
              
               
              
               
               
             
           
 
            
           
              import processing.serial.*;
             
             
              Serial myPort;
             
             
              void setup()
             
             
              {
             
             
                println("Debug 1");
             
             
                println(myPort.list());
             
             
                println("Debug 2");
             
             
                myPort = new Serial(this, myPort.list()[0], 9600);
             
             
                println("Debug 3");
             
             
              }
             
             
              void loop()
             
             
              {
             
             
                println("Debug in somewhere");
             
             
                delay(1000);
             
             
              }
             
            
             However it crashes on my pc after running it :(
            
            
             Here is output:
            
            
              Debug 1
             
             
              WARNING:  RXTX Version mismatch
             
             
               Jar version = RXTX-2.2pre1
             
             
               native lib Version = RXTX-2.2pre2
             
             
              [0] "/dev/tty.usbmodemfa141"
             
             
              [1] "/dev/cu.usbmodemfa141"
             
             
              [2] "/dev/tty.Bluetooth-Modem"
             
             
              [3] "/dev/cu.Bluetooth-Modem"
             
             
              [4] "/dev/tty.baris-WirelessiAP"
             
             
              [5] "/dev/cu.baris-WirelessiAP"
             
             
              [6] "/dev/tty.Bluetooth-PDA-Sync"
             
             
              [7] "/dev/cu.Bluetooth-PDA-Sync"
             
             
              Debug 2
             
             
              Debug 3
             
             
              Invalid memory access of location 0xb1ab8bf0 eip=0x1366f90c
             
            
             You can see the Invalid memory access of location exception.
            
            
             My crach report says : sketch_sep01a quit unexpectedly while using the librxtxSerial.jnilib plugin.
            
            
             Here is the some output from report detail:
            
            
              Process:         java [9593]
             
             
              Path:            /usr/bin/java
             
             
              Identifier:      com.apple.javajdk16.cmd
             
             
              Version:         1.0 (1.0)
             
             
              Code Type:       X86 (Native)
             
             
              Parent Process:  JavaApplicationStub [393]
             
             
              PlugIn Path:       /Applications/Processing.app/Contents/Resources/Java/modes/java/libraries/serial/library/macosx/librxtxSerial.jnilib
             
             
              PlugIn Identifier: librxtxSerial.jnilib
             
             
              PlugIn Version:    ??? (???)
             
             
              Date/Time:       2011-09-01 15:02:22.895 +0300
             
             
              OS Version:      Mac OS X 10.7.1 (11B26)
             
             
              Report Version:  9
             
             
              Interval Since Last Report:          411561 sec
             
             
              Crashes Since Last Report:           39
             
             
              Per-App Interval Since Last Report:  50583 sec
             
             
              Per-App Crashes Since Last Report:   15
             
             
              Anonymous UUID:                      6AF4DA63-58CB-4C8C-9E1C-26967E8C0B91
             
             
              Crashed Thread:  28  Java: Animation Thread
             
             
              Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
             
             
              Exception Codes: KERN_INVALID_ADDRESS at 0x00000000b1ab8bf0
             
             
              VM Regions Near 0xb1ab8bf0:
             
             
                  Stack                  00000000b18ba000-00000000b19b8000 [ 1016K] rw-/rwx SM=COW  
             
             
              --> 
             
             
                  Stack                  00000000bc000000-00000000bf800000 [ 56.0M] ---/rwx SM=NUL  
             
             
              Application Specific Information:
             
             
              objc[9593]: garbage collection is OFF
             
             
              Java information:
             
             
               Exception type: Bus Error (0xa) at pc=000000001366f90c
             
             
               Java VM: Java HotSpot(TM) Client VM (20.1-b02-383 mixed mode macosx-x86)
             
            
             ----------
            
            
             You may realize there is :
            
            
              WARNING:  RXTX Version mismatch
             
             
               Jar version = RXTX-2.2pre1
             
             
               native lib Version = RXTX-2.2pre2
             
            
             warning. I don't know yet how to fix it on mac, but i will. However with the same warning, i can run this code on my friends pc with windows7.
            
            
             Some Info:
            
            
               macbookpro:~ emreozanalkan$ java -version
              
              
               java version "1.6.0_26"
              
              
               Java(TM) SE Runtime Environment (build 1.6.0_26-b03-383-11A511)
              
              
               Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode)
              
              
               macbookpro:~ emreozanalkan$ javac -version
              
              
               javac 1.6.0_26
              
              
                macbookpro:~ emreozanalkan$ uname -v
               
               
                Darwin Kernel Version 11.1.0: Tue Jul 26 16:07:11 PDT 2011; root:xnu-1699.22.81~1/RELEASE_X86_64
               
              
               And my mac version is:
              
              Mac OS X Lion 10.7.1 (11B26)
 
              
              1  
            
 
            
 
 
           
 
            