Hello, developers. Why does mono become a worse and a worse last time?
I have application which works with printer on usb interface. I use a FileStream for port managing. And during one application session I can open port just one time and next time I get error shared violation on path /dev/usb/lp0. If application close and run again port open one time too and next time I again get error shared violation on path /dev/usb/lp0.
I've tried to use different FileStream constructor overrides and problem was resolved FileStream(parameters2.PortName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite) although on 2.10 version mono a FileStream(parameters2.PortName, FileMode.Open) was enough for normal working. I close port as
usbPort = null;
I assume that port must be opened in exclusive mode, none sharing.
I have two applications. First is monogame second is winforms. So I run monogame using code option for window "fullscreen = true" without hiding mouse cursor, above monogame I run winforms application as screensaver using next options:
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
Sometimes when winforms was closed I see black screen with mouse cursor instead monogame application. Also under monogame must be a terminal emulator but I can't see it even using Alt+TAB. Only black screen and mouse cursor are on my display. If I run a killall mono in a new terminal emulator that old terminal emulator and desktop achieve. I repeat that it happens not every time it happens sometimes.
I used 2.10 mono version since 2012 and I never notice such bugs there.