Home » MODDING HQ 1.13 » v1.13 Bug Reports » Ja2 1.13 win10 start from VS
Ja2 1.13 win10 start from VS[message #350930] Sun, 10 September 2017 23:31 Go to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Since my old computer decided to die, I now have a new one. One that has Windows 10 eek . I'm currently getting everything back to running, but I now have an issue with JA2.

The game requires a colour depth of 16bpp. On the old machine, I simply set that for my system, which worked fine (apart from Origin deciding to not accept that without even a hint, which made tracking that bug a tad harder than it had to be). It seems I can no longer do that in Win10. I can solve that by setting the compatibility option on the exe, but that does not work when I try to start a new instance from VS2017. I can start the exe by hand and then attach the debugger to it, but that is not only unwieldy, it would mean I would be unable to debug stuff happening at the very beginning of an exe start... like reading xmls.

https://i.imgur.com/lV2Uzee.png

So my question is: how can I start a fresh compiled debug exe from VS on Windows 10?

Edit: To clarify, I am not talking about applying the win10 fix .dlls (they don't affect this issue, and make airspace look weird) or the registry fix, which has to be run for every exe, which is unreasonable if one builds different exes for several build locations.
I am also not referring to the 'set cpu affinity fix', as this isn't the issue here.

[Updated on: Sun, 10 September 2017 23:40]




I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: Ja2 1.13 win10 start from VS[message #350931 is a reply to message #350930] Mon, 11 September 2017 00:21 Go to previous messageGo to next message
ElecMS is currently offline ElecMS

 
Messages:13
Registered:November 2009
Have you found a fix for this?

Really appreciate all of your modding work!

Report message to a moderator

Private
Re: Ja2 1.13 win10 start from VS[message #350932 is a reply to message #350930] Mon, 11 September 2017 00:22 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
Registered:October 2005
Location: Austria
You could add a thread sleep for about 10 seconds at the main function and then attach the debugger to the exe.

[Updated on: Mon, 11 September 2017 00:22]

Report message to a moderator

Sergeant Major

Re: Ja2 1.13 win10 start from VS[message #350938 is a reply to message #350932] Mon, 11 September 2017 12:32 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Hi Flugente,

I use a simple approach. In my project configuration I have set the release build to create a JA2_EN_Release.exe and the debug build to create a JA2_EN_Debug.exe and so on. The fixed names are only important for the registry settings. In the registry I have imported the following:

Toggle Spoiler


No additional DLLs are needed and the game works in both full screen and windowed mode. I know it's not an ideal solution but if you can stick to a few file names it should work for you too.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: Ja2 1.13 win10 start from VS[message #350939 is a reply to message #350938] Mon, 11 September 2017 13:31 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Yeah, after a bit of googling I came to the conclusion that silversurfer's solution is likely the easiest solution. Since I have (or will have) ~6+ different installs to work on, it might be easiest to throw in some sort of regexp and essentially set those options on any .exe in specified subfolders.

I was just hoping that the compatibility stuff could be set via command line (doesn't seem that way), and that command line arguments could be added to our VS configuration stuff (that's probably possible. Or even some way to have all that built-in, that way users wouldn't have to solve the problem to begin with.



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: Ja2 1.13 win10 start from VS[message #350941 is a reply to message #350939] Mon, 11 September 2017 15:40 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
I got this to work by manually setting this for each file in the compatibility tab of file properties window. In order for 16bpp compatibility setting to take effect for VS debugger I had to hit the "Change settings for all users" button at the bottom of the window.

Report message to a moderator

Master Sergeant
Re: Ja2 1.13 win10 start from VS[message #350945 is a reply to message #350941] Mon, 11 September 2017 22:38 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Hmm. silversurfer, should that work when starting from the debugger? Because it doesn't seem to work for me... Bob's solution also does not work from there.


I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: Ja2 1.13 win10 start from VS[message #350946 is a reply to message #350945] Tue, 12 September 2017 00:07 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Yes, I can start the debug exe from the debugger just fine and it runs smoothly as it's supposed to be. I still use VS2010 whereas you are using a newer version I believe?


Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: Ja2 1.13 win10 start from VS[message #350948 is a reply to message #350946] Tue, 12 September 2017 02:28 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Well, I'm using VS2017. There were some compile errors as well due to the change, but I can fix those, the 16bpp problme is now the only remaining issue.


I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: Ja2 1.13 win10 start from VS[message #350949 is a reply to message #350948] Tue, 12 September 2017 10:27 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
I didn't adjust too much in the project configuration, just the file names and working directory IIRC.

https://img1.picload.org/image/dgrawopi/debug.png

https://img1.picload.org/image/dgrawlpw/debug2.png

In the end it has to match what is configured in the registry. My "JA2_EN_Debug.exe" is created in "E:\JA2" along with the ilk and pdb files. This is the working directory. Registry settings are also for "E:\JA2\JA2_EN_Debug.exe" so it matches. Can you start the freshly compiled debug exe manually outside of VS?



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: Ja2 1.13 win10 start from VS[message #350954 is a reply to message #350949] Tue, 12 September 2017 13:21 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
That is pretty much what I have. After using your .reg method, I can start the debug exe manually just fine - it's just the start from VS with debugger (as in pic in first post) that does not work.


I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: Ja2 1.13 win10 start from VS[message #350956 is a reply to message #350954] Tue, 12 September 2017 14:26 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
Are you running JA2 and VS as admin? I'm on the VS2015 Community.

Also, just to be sure, the compat settings path based, so you shouldn't need to set them for every new exe.

[Updated on: Tue, 12 September 2017 14:27]

Report message to a moderator

Master Sergeant
Re: Ja2 1.13 win10 start from VS[message #350957 is a reply to message #350956] Tue, 12 September 2017 15:06 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
I'm running VS and the game with my normal restricted user account (disabled UAC). JA2 and VS2010 don't require admin rights. If VS was started with a different user the registry method will not work because the registry entries are for "Current_User" so you'd have to import the settings for both users.


Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: Ja2 1.13 win10 start from VS[message #350964 is a reply to message #350957] Wed, 13 September 2017 22:08 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
I've started VS2017 as admin, but this does not change the behaviour. I've also set the exe to run as admin, still does not work when started from VS. I can also not start the thing from VS if I want to start without debugging. So... I'm kinda lost here.


I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: Ja2 1.13 win10 start from VS[message #350979 is a reply to message #350964] Sat, 16 September 2017 01:32 Go to previous messageGo to next message
GiantBasher is currently offline GiantBasher

 
Messages:41
Registered:July 2017
Any luck with this?

Report message to a moderator

Corporal
Re: Ja2 1.13 win10 start from VS[message #350981 is a reply to message #350979] Sat, 16 September 2017 12:26 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Nope. Additionally, edit & continue seems to behave worse for me than it did before (likely some settings I have not yet found), so coding is kinda tedious atm.

I also have weird behaviour of the game. Whenever the game is active and I select another windows application, the game loses focus, but is still displayed on top of other applications, which means that I click on the game but actually click on whatever is behind it, which is unfortunate. Not sure where that can be changed, as no other program seems to behave that way.



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: Ja2 1.13 win10 start from VS[message #350982 is a reply to message #350981] Sat, 16 September 2017 13:47 Go to previous messageGo to next message
The_Bob is currently offline The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
Welcome to Windows 10 big grin I see you're having a great experience, rest assured, it only gets better cheeky

Report message to a moderator

Master Sergeant
Re: Ja2 1.13 win10 start from VS[message #350983 is a reply to message #350981] Sat, 16 September 2017 14:32 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Flugente wrote on Sat, 16 September 2017 11:26

I also have weird behaviour of the game. Whenever the game is active and I select another windows application, the game loses focus, but is still displayed on top of other applications, which means that I click on the game but actually click on whatever is behind it, which is unfortunate. Not sure where that can be changed, as no other program seems to behave that way.

Yes, that behaviour sucks but you can get around it by clicking on the game icon in your Windows task bar which will minimize the game. Click again to bring it back to the front.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: Ja2 1.13 win10 start from VS[message #350985 is a reply to message #350983] Sat, 16 September 2017 15:50 Go to previous message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Oh, I know that. I still haven't gotten used to it though.


I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Previous Topic: JA 2 Bobby bug
Next Topic: 8452+AIMNAS spawn glitch
Goto Forum:
  


Current Time: Fri Apr 19 06:44:07 GMT+3 2024

Total time taken to generate the page: 0.01284 seconds