Hi Nicholas, congratulations for this, would like to help testing, if I may... see below.
What steps will reproduce the problem?
//Simples code to testing.
<fx:Script> <![CDATA[ import com.quetwo.Arduino.ArduinoConnector;
public var arduino:ArduinoConnector;
protected function init():void{
trace("#init.");
arduino = new ArduinoConnector();
}
protected function bOpen_clickHandler(event:MouseEvent):void
{
trace("#Port is open? "+ arduino.portOpen);
}
protected function bConn_clickHandler(event:MouseEvent):void
{
arduino.connect("COM13");
}
protected function bClose_clickHandler(event:MouseEvent):void
{
arduino.dispose();
}
]]> </fx:Script>
<mx:Button id="bOpen" x="10" y="10" label="OPEN" click="bOpen_clickHandler(event)"/> <mx:Button id="bConn" x="77" y="10" label="CONN" click="bConn_clickHandler(event)"/> <mx:Button id="bClose" x="143" y="10" label="CLOSE" click="bClose_clickHandler(event)"/>
What is the expected output? What do you see instead?
I set COM13, the system return COM12, that not exist.
The COM port remains open, even after dispose.
The AIR crashes after dispose and closing the program. Perhaps, because port is already open.
What version of the product are you using? On what operating system?
Adobe Flash Builder 4.6 (build 328916) "Official licensed". Adobe AIR 3.1.0.4880 Windows 7 Ultimate 64 bits "DELL Official licensed". PS: I had to copy the DLLs to the folder SysWOW64, I saw the last issue.
Please provide any additional information below.
Below, my console:
[SWF] com.quetwo.Arduino.ArduinoConnector - 6,684 bytes after decompression [SWF] FX232.swf - 2,030,059 bytes after decompression
init.
[ArduinoConnector] Initalizing ANE...
Port is open? false
[ArduinoConnector] Opening COM port 12 success = true
Port is open? true
[ArduinoConnector] Unloading ANE...
Port is open? true
[ArduinoConnector] Unloading ANE...
Port is open? true
Error: Error #3501: The extension context has already been disposed. at flash.external::ExtensionContext/_call() at flash.external::ExtensionContext/call() at com.quetwo.Arduino::ArduinoConnector/connect()[C:\Users\Nicholas Kwiatkowski\Adobe Flash Builder 4.6\SerialANELib\src\com\quetwo\Arduino\ArduinoConnector.as:70] at test232/bConn_clickHandler()[C:\Projetos\Fx\FX232\src\test232.mxml:26] at test232/__bConn_click()[C:\Projetos\Fx\FX232\src\test232.mxml:38]
The AIR crash error.
Problem Event Name: BEX Application Name: adl.exe Application Version: 3.1.0.4880 Application Timestamp: 4eb7612e Fault Module Name: libSerialANE.dll_unloaded Fault Module Version: 0.0.0.0 Fault Module Timestamp: 4ecfdafd Exception Offset: 6b7c1b04 Exception Code: c0000005 Exception Data: 00000008 OS Version: 6.1.7601.2.1.0.256.1 Locale ID: 1046 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
If I can help with anything else, call me.
Best regards.
Marco
Comment #1
Posted on Dec 9, 2011 by Happy BearThe port number you are seeing is actually the "file handle" number, not the actual COM port number. In 1.0.0, the trace statement has been updated to reflect that.
The COM port reporting closed has also been fixed in 1.0.0.
The error you are reporting seems to be happening because the dispose() function is being called twice. It should only be called a single time. I will write a check in the function to make sure the DLL is not attempted to unload when it was not already in a loaded state.
Comment #2
Posted on Dec 9, 2011 by Quick BearI know, I called dispose twince purposely to see portOpen return false. I'm anxious waiting the new version. Thank you for your attention.
Best regards.
Comment #3
Posted on Dec 9, 2011 by Happy BearI'm syncing the changes to the code right now. I should be able to post the new 1.0.0 download tomorrow. (You can grab the new binary in the svn, if you want to try it out to see if it helps at all).
Comment #4
Posted on Dec 9, 2011 by Quick BearGreat, I'll make some codes here to testing all functions and helping to report. Regards.
Comment #5
Posted on Dec 9, 2011 by Quick BearNice... tested! Works great! I'll continue testing and reporting some news, if you need helping call me. Best regards.
Here some code to testing, if someone needs.
import com.quetwo.Arduino.ArduinoConnector;
public var arduino:ArduinoConnector; public var timer:Timer;
protected function init():void{ trace("#init.");
timer = new Timer(100);
timer.addEventListener(TimerEvent.TIMER,onTimer,false,0,true);
if(arduino==null){
arduino = new ArduinoConnector();
}
}
protected function onTimer(e:TimerEvent):void{
if(arduino.bytesAvailable>0){
trace("#Read: "+ arduino.readBytesAsString());
}
}
protected function bOpen_clickHandler(event:MouseEvent):void
{
if(arduino!=null){
trace("#Port is open? "+ arduino.portOpen);
}
}
protected function bConn_clickHandler(event:MouseEvent):void
{
if(arduino!=null){
arduino.connect(this.txCOM.text);
}
}
protected function bClose_clickHandler(event:MouseEvent):void
{
if(arduino.portOpen){
arduino.dispose();
}else{
arduino = null;
}
}
protected function bWrite_clickHandler(event:MouseEvent):void { if(arduino.portOpen){ arduino.writeString(this.txWriteData.text); arduino.flush(); } }
protected function bRead_clickHandler(event:MouseEvent):void
{
if(timer!=null){
timer.start();
}
}
protected function bReadStop_clickHandler(event:MouseEvent):void { if(timer!=null){ timer.stop(); timer.reset(); } }
protected function bInit_clickHandler(event:MouseEvent):void { init(); }
]]>
Comment #6
Posted on Dec 18, 2011 by Happy BearIssue closed with release of 1.0.0
Comment #7
Posted on Sep 12, 2012 by Helpful HippoI'm still seeing this issue in 1.2.0 with AIR 3.3
Problem Event Name: BEX Application Name: adl.exe Application Version: 3.3.0.3650 Application Timestamp: 4fc847e7 Fault Module Name: libSerialANE.dll_unloaded Fault Module Version: 0.0.0.0 Fault Module Timestamp: 4f6e5872 Exception Offset: 6b7c1b70 Exception Code: c0000005 Exception Data: 00000008 OS Version: 6.1.7601.2.1.0.256.4 Locale ID: 1033 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
Comment #8
Posted on Sep 27, 2012 by Happy HorseI'm getting the same issue as rvanderl...@appliedart.com on WindowsXP. Everything works fine on Windows7 though.
Comment #9
Posted on Oct 23, 2012 by Massive BirdSme problem with Windows7/64bit, AIR 3.4, and ArduinoConnector 1.2.0
Nombre del evento de problema: BEX Nombre de la aplicación: Arduino.exe Versión de la aplicación: 0.0.0.0 Marca de tiempo de la aplicación: 4f45e09b Nombre del módulo con errores: libSerialANE.dll_unloaded Versión del módulo con errores: 0.0.0.0 Marca de tiempo del módulo con errores: 4f6e5872 Desplazamiento de excepción: 6b7c1b70 Código de excepción: c0000005 Datos de excepción: 00000008 Versión del sistema operativo: 6.1.7600.2.0.0.256.1 Id. de configuración regional: 9226 Información adicional 1: 0a9e Información adicional 2: 0a9e372d3b4ad19135b953a78882e789 Información adicional 3: 0a9e Información adicional 4: 0a9e372d3b4ad19135b953a78882e789
Any solution?
Comment #10
Posted on Sep 30, 2013 by Quick Birdsame problem with Windows7/32bit, AIR 3.4, and ArduinoConnector 1.5.0
but it seems work well in first time,but when I open and close the app very quickly,after 2 or 3 times.It will crash again?
Status: Verified
Labels:
Type-Defect
Priority-Medium
Milestone-Release1.0