Code Monkey home page Code Monkey logo

Comments (15)

Ryochan7 avatar Ryochan7 commented on August 30, 2024 2

New version is up.

https://github.com/Ryochan7/DS4Windows/releases/download/v1.4.55/DS4Windows_1.4.55_x64.zip

from ds4windows.

Keltere avatar Keltere commented on August 30, 2024 1

Really really thanks Ryo, I'm glad that someone is updating ds4windows. Hope that with the new windows ds4windows will work without administrator permission.

from ds4windows.

Ryochan7 avatar Ryochan7 commented on August 30, 2024

Thanks for pointing out this problem. The underlying file stream being used goes into an invalid state when the USB controller is disconnected and the final call to close the stream caused the problem. The old code did not use the FileStream class for reading so this was not an issue before. I will get a new build up soon.

from ds4windows.

Ryochan7 avatar Ryochan7 commented on August 30, 2024

There are only two areas where DS4Windows should need administrator privileges. Exclusive mode would be one and there is no way around that problem. Security features in Windows require that an administrator account be used to disable and re-enable a device in order to be able to use a device in exclusive mode. I believe DS4Windows already checks if it can open a device in exclusive mode first before it attempts to disable and re-enable the device so there isn't much more that DS4Windows can do in that regard.

The other area would be for KB+M emulation in games that run as the administrator; one example of a game in my collection that runs as the administrator is Mass Effect 1. There is no way to work around that problem using the native SendInput API and running DS4Windows as the administrator won't work in all scenarios such as UAC prompts. Paying for an expensive signing certification could work around the UAC problem but DS4Windows would still have to be run as the administrator. The only way, that I know of, to truly work around the problem of needed to run DS4Windows as the admin in this scenario would be to use the vmulti virtual KB+M driver within DS4Windows. It works around all those problems and it even works when playing games that use anti-cheat software, such as HackShield, without any major worry about getting your account flagged.

from ds4windows.

Ryusennin avatar Ryusennin commented on August 30, 2024

Hi Ryochan,

I'm not sure if it's possible to reopen this issue or if I need to create a new one, but I'm meeting the same problem on Windows 7 Ultimate (64-bit) with all versions of DS4Windows from 1.4.54 to 1.4.67. The driver works well but it crashes every time I unplug my controller from the mini USB cable.

The only version that doesn't crash is the 1.4.53 build (which is incidentally the only one with 32-bit support, although I'm not sure it's relevant).

from ds4windows.

Ryochan7 avatar Ryochan7 commented on August 30, 2024

That would be the version before overlapped IO was implemented. Is there any error log when the app crashes that you could post? I would assume that the error is due to some exception not getting caught when attempting to close an invalid file handle but the only relevant exception that I know of is currently being caught. I am usually against doing a grand catch of all exceptions so it would be nice to isolate the exact exception causing problems. In the meantime, I will re-open this issue.

from ds4windows.

Ryusennin avatar Ryusennin commented on August 30, 2024

ds4windows_2017-05-03 21-39-54-60

I'm afraid that's not much to go by. Is there a more exhaustive log saved somewhere?

from ds4windows.

Ryochan7 avatar Ryochan7 commented on August 30, 2024

.NET does post some error information when an application crashes. You have to open the Event Viewer from Control Panel > System and Security > Administrative Tools > Event Viewer. Expand Windows Logs, selection Application and look for an error with a source of .NET Runtime. Here is an example showing an error message in the Event Viewer; this error would occur when closing a filestream if the exception is not caught.

errorlog_20170503

Application: DS4Windows.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.IOException
   at DS4Windows.HidDevice.closeFileStreamIO()
   at DS4Windows.HidDevice.CloseDevice()
   at DS4Windows.DS4Devices.On_Removal(System.Object, System.EventArgs)
   at System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
   at DS4Windows.DS4Device.performDs4Input()
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart()

from ds4windows.

Ryusennin avatar Ryusennin commented on August 30, 2024

Alright, I think I've spotted to relevant logs happening two seconds apart. Hope it helps!

Event 1026, .NET Runtime

Application: DS4Windows.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.OperationCanceledException
   at System.IO.__Error.WinIOError(Int32, System.String)
   at System.IO.FileStream.EndWrite(System.IAsyncResult)
   at System.IO.FileStream.FlushWrite(Boolean)
   at System.IO.FileStream.Dispose(Boolean)
   at System.IO.Stream.Close()
   at DS4Windows.HidDevice.closeFileStreamIO()
   at DS4Windows.HidDevice.CloseDevice()
   at DS4Windows.DS4Devices.On_Removal(System.Object, System.EventArgs)
   at System.EventHandler 1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
   at DS4Windows.DS4Device.performDs4Input()
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart()

Event 1000, Application Error

Faulting application name: DS4Windows.exe, version: 1.4.67.0, time stamp: 0x5905f962
Faulting module name: KERNELBASE.dll, version: 6.1.7601.23714, time stamp: 0x58bf8a2e
Exception code: 0xe0434352
Fault offset: 0x000000000001a06d
Faulting process id: 0x1e44
Faulting application start time: 0x01d2c44a97348f4c
Faulting application path: C:\Program Files (x86)\DS4Windows\DS4Windows.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: c1f18272-3054-11e7-b4b6-00248c37aa6b

from ds4windows.

Ryochan7 avatar Ryochan7 commented on August 30, 2024

Can you give the following test build a try?

https://drive.google.com/open?id=0B6yGHDx0CFzDS21QNVlpWVFlaTA

from ds4windows.

Ryusennin avatar Ryusennin commented on August 30, 2024

I quickly tested this build by unplugging and replugging the controller a dozen times, without a single crash. I didn't notice any performance regression ingame either. I will test it further tomorrow, but so far it looks very stable. Thank you! :)

from ds4windows.

Ryusennin avatar Ryusennin commented on August 30, 2024

As far as I can tell, this build works great so far. Thanks for your continous support!

from ds4windows.

shinra358 avatar shinra358 commented on August 30, 2024

Can't get bluetooth mode working at all with .68 build.

from ds4windows.

Keltere avatar Keltere commented on August 30, 2024

shinra358 try remove the device (from bluetooth and other devices) and install again. I had the same problem.

from ds4windows.

shinra358 avatar shinra358 commented on August 30, 2024

ok, that did the trick. thanks.

from ds4windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.