Bug in 64bit Driver on Windows?

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
niston
LCD Geek
Posts: 24
Joined: Thu Sep 25, 2014 4:55 pm

Bug in 64bit Driver on Windows?

Post by niston »

I'm developing an embedded device and use the GLK19264 USB Display as an UI. The software is written in C#.

When running on Windows (.NET 4.0), this will happen after a brief period of time:

- Display stops updating
- 9 out of 10 times, the display backlight starts flickering like mad
- The virtual COM port locks up

Subsequent writing to the Port raises an exception:
System.IO.IOException was unhandled
HResult=-2147024865
Message=A device attached to the system is not functioning.

Source=System
StackTrace:
at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
at System.IO.Ports.SerialStream.EndWrite(IAsyncResult asyncResult)
at System.IO.Ports.SerialStream.Write(Byte[] array, Int32 offset, Int32 count, Int32 timeout)
at System.IO.Ports.SerialPort.Write(Byte[] buffer, Int32 offset, Int32 count)
at sndchk.Display.Send(Byte[] Command) in c:\Users\***\Documents\Visual Studio 2013\Projects\sndchk\sndchk\Display.cs:line 215
at sndchk.Display.DrawBar(Int32 top, Int32 left, Int32 height, Int32 maxWidth, Int32 percent) in c:\Users\***\Documents\Visual Studio 2013\Projects\sndchk\sndchk\Display.cs:line 302
at sndchk.Display.set_LevelLeft(Int32 value) in c:\Users\***\Documents\Visual Studio 2013\Projects\sndchk\sndchk\Display.cs:line 65
at sndchk.Program.Main(String[] args) in c:\Users\***\Documents\Visual Studio 2013\Projects\sndchk\sndchk\Program.cs:line 258
InnerException:
After stopping the debugger, Visual Studio will not respond until the USB connection to the display is severed.

The exact same software runs flawlessly for hours on a Raspberry Pi (ARMv6 Linux, mono), with the same display connected to it via /dev/ttyUSB0.

So I suspect there's a problem with the 64bit Windows FTDI driver that I'm using (DriverVer=03/18/2014,2.08.30.6).

Is there a newer driver available? On ftdichip.com, there's a download for DriverVer=01/27/2014,2.10.00.

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Re: Bug in 64bit Driver on Windows?

Post by Clark »

Hi Niston,

We just released new USB drivers, based on the FTDI 2.10.00 release.

If you have any further trouble with the new version, please let us know.

Cheers,
Troy
Troy Clark
Design & Development
Matrix Orbital

niston
LCD Geek
Posts: 24
Joined: Thu Sep 25, 2014 4:55 pm

Re: Bug in 64bit Driver on Windows?

Post by niston »

Thanks Troy, that was quick! I will give them a try, although according to release notes for 2.10 the future looks bleak.

niston
LCD Geek
Posts: 24
Joined: Thu Sep 25, 2014 4:55 pm

Re: Bug in 64bit Driver on Windows?

Post by niston »

Yup, that didn't work out.

Installed 2.10 and the problem persists.

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Re: Bug in 64bit Driver on Windows?

Post by Clark »

Hi Niston,

I appreciate the update and have been running 2.10 here as well, with no issue. This doesn't look like a driver problem.

If you could, I would recommend trying the unit with a different port, cable, or even system if at all possible.

Cheers,
Troy
Troy Clark
Design & Development
Matrix Orbital

niston
LCD Geek
Posts: 24
Joined: Thu Sep 25, 2014 4:55 pm

Re: Bug in 64bit Driver on Windows?

Post by niston »

Just tried through a hub on a different port, same problem. Will check on a 32bit machine as soon as I get around to it.

But it looks as if I'm not alone:
http://stackoverflow.com/questions/1872 ... ing-c-shar

This is exactly my scenario:
  • System.IO.IOException: 'A device attached to the system is not functioning' on write
  • System.UnauthorizedAccessException: 'Access to the port is denied'. on subsequent writes
Can't help it but my guts telling me it's a driver problem: Something inside is not releasing properly, so the port gets blocked. It is not critical for my project, as everything works fine on the Linux target (as expected, perhaps). However, debugging on Windows would be so much easier if this could be resolved.

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Re: Bug in 64bit Driver on Windows?

Post by Clark »

Hi Niston,

I'm running Windows 7 64bit with Visual Studio 2013 here, and so far no problems. I typically use C# as well, but with minimal threading. If you are able to provide complete and running code to me at tclark@matrixorbital.ca, I'd be happy to test here if necessary.

Cheers,
Troy
Troy Clark
Design & Development
Matrix Orbital

niston
LCD Geek
Posts: 24
Joined: Thu Sep 25, 2014 4:55 pm

Re: Bug in 64bit Driver on Windows?

Post by niston »

Hey Troy,

Hold a little longer, I will post some source to codeplex pretty soon. Here's a little teaser:

Image

niston
LCD Geek
Posts: 24
Joined: Thu Sep 25, 2014 4:55 pm

Re: Bug in 64bit Driver on Windows?

Post by niston »

More teasing :-P

Image Image
Image Image

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Re: Bug in 64bit Driver on Windows?

Post by Clark »

Looks like your application is coming together nicely Chris!

Thanks,
Troy
Troy Clark
Design & Development
Matrix Orbital

Post Reply