#109878 - 19 August, 2006 03:25 PM
JA2 Crash Monitor
|
 Sargeant
Posts: 149
Loc: Austria
______
 Team v1.13
|
Hi If there's one annoying thing, then it's JA2 crashing. But while a normal crash is not that much of a hassle, sometimes JA2 decides to be a PITA by being more powerful than Alt+Tab and Ctrl+Alt+Delete, forcing you to do a hard reset and reboot the computer (  ) I said enough is enough, and wrote myself a small application. It is very simple; once started it looks for the JA2 process ("ja2.exe"). After it has found it, it does a responsiveness check every 5 seconds. If JA2 is not responsive anymore, its process can consider itself killed. Then I thought, maybe someone else wants this too, so I'm writing this thread. So far I had one repeatable hard crash, and my program worked well. JA2CM also shuts itself down after you exit JA2 normally. If JA2CM was started by accident, kill the process via the task manager (or start up and shut down JA2). The only "drawback" it has is that it requires the Microsoft .NET Framework 2.0. Why? Because I'm a C# programmer this was the quickest way for me to accomplish the task. If you refuse to install that, well, your loss. Maybe someone else writes a similar program in a different language Download page or direct download (7 KB) Microsoft .NET Framework 2.0 (22.4 MB) Updates:~ Version 1.0.0.1 Added check to prevent running multiple instances of JA2CM Added feature to automatically start JA2 if the JA2CM.exe is placed in the install directory of JA2 Renamed output binary from Ja2CrashMonitor.exe to JA2CM.exe ~ Version 1.0.0.2 Added command line switch "-nostart" to disable automatic startup of JA2 Added command line switch "-noshutdown" to disable the automatic shutdown of JA2CM after exiting JA2 - Instead it will stay idle until JA2 is started up again Example: "JA2CM.exe -nostart -noshutdown" Or in a shortcut: "C:\Program Files\JaggedAlliance2\JA2CM.exe" -nostart -noshutdown ~ Version 1.0.0.3 Added command line switch "-debug" to output JA2CM's actions into JA2CM.log ~ Version 1.0.0.4 Added version number output to JA2CM.log Added 20 second delay after finding the JA2 process (before starting responsiveness check) ~ Version 1.0.0.5 Updated debug output a bit Added additional responsiveness check one second after JA2 was found to be unresponsive. Should prevent unnecessary shutdown on small hiccups Added command line parameter "-checkdelay=X" to manually define the delay before starting responsiveness check (default: 20) Added command line parameter "-checkinterval=X" to manually define the delay between each responsiveness check (default: 5) Example: "JA2CM.exe -checkdelay=30 -checkinterval=10" Note: Value is in seconds. Minimum is 1 second, maximum is 300 (5 minutes) Use a higher checkdelay if JA2CM already ends JA2 during startup. Using a lower interval will make the reaction to a unresponsive JA2 faster, but at a cost of increased CPU load (which is very small anyways).
|
- OFFLINE
Top
|
|
|
|
#109880 - 19 August, 2006 03:38 PM
Re: JA2 Crash Monitor
|
 Sargeant
Posts: 118
Loc: Poland
|
F***** tastic great! It's really small, but usefull as hell :-) Thanks! 
|
- OFFLINE
Top
|
|
|
|
#109881 - 19 August, 2006 05:12 PM
Re: JA2 Crash Monitor
|
 Drill Sargeant
Posts: 251
Loc: Viva Bavaria!
|
I get along without it. If it locks up, I press Ctrl+Alt+Del and it's already in the processes. Typing JA will select Ja2 from the processes and pressing Alt+E will ask wether it is to be terminated. Press left arrow and it will select the yes button, press enter and it's gone. Yes, this is a little less convenient than the solution above, but it's just one of the many key combinations that you can master if you know what to do.
_________________________
Yeah, I heard you through the grapevine.
|
- OFFLINE
Top
|
|
|
|
#109883 - 19 August, 2006 08:52 PM
Re: JA2 Crash Monitor
|
 N.C.O.
Posts: 382
Loc: Germany
|
you can aso start the task-monitior in the "applications"-tab ("Anwendungen" in german, don´t know the accurate english phrase). If your game freezes pres Ctrl+Alt+Del and then Alt+T . Repeat until JA closes. pro: you don´t have to hard-reset CON: every running app is killed; any failsafe-messages from a closing app und your off track. conclusion: Install tool greetings BS p.s. hey i´m not the only "crash-baby" out here. Its good to know, that i´m not alone. Helps mentally 
|
- OFFLINE
Top
|
|
|
|
#109885 - 20 August, 2006 12:53 AM
Re: JA2 Crash Monitor
|
 Lieutenant
Posts: 664
Loc: Coquitlam, B.C., Canada
|
The .NET framework is generally necessary all around -- just like the Visual Basic runtimes. If you use applications that don't come with pretty little CDs and packaging, you'll need to download the framework sooner or later, so you might as well download it sooner.
I don't see why everyone doesn't have it installed by default on their computers...
_________________________
My occupation: Freelance Slacker
My motto: "Choose an occupation you like and you'll never have to work a day of your life." --Confucius
Here's hoping!
|
- OFFLINE
Top
|
|
|
|
#109886 - 20 August, 2006 12:52 PM
Re: JA2 Crash Monitor
|
 Merc
Posts: 75
Loc: Sweden
|
In XP I press ctrl+alt+del, then tab then space and then tab then space again. Voila, desktop appears.
_________________________
Nullus Anxietas
|
- OFFLINE
Top
|
|
|
|
#109887 - 20 August, 2006 01:06 PM
Re: JA2 Crash Monitor
|
 Drill Sargeant
Posts: 251
Loc: Viva Bavaria!
|
Originally posted by JT: The .NET framework is generally necessary all around -- just like the Visual Basic runtimes. If you use applications that don't come with pretty little CDs and packaging, you'll need to download the framework sooner or later, so you might as well download it sooner.
I don't see why everyone doesn't have it installed by default on their computers... Well, not all software that's you can download from the net uses .NET framework of VB runtime files. Usually, I try to find freeware that runs smoothly without needing any extra stuff.
_________________________
Yeah, I heard you through the grapevine.
|
- OFFLINE
Top
|
|
|
|
#109888 - 20 August, 2006 01:10 PM
Re: JA2 Crash Monitor
|
 Sargeant
Posts: 149
Loc: Austria
______
 Team v1.13
|
In XP I press ctrl+alt+del, then tab then space and then tab then space again. Voila, desktop appears. Which just kills the first available process, which might or might not be Ja2  . The point of my small app is really that 1. it works automatically, and 2. it's guaranteed to only kill the right process. <rant>wait, you wrote 4KB tool that needs 22MB of SHIT from M$? Who are you? an Indian programmer from "we teach to code in 2 weeks" program?</rant> If you refuse to install that, well, your loss. :rolleyes: Seriously, I couldn't care less for your hate about Microsoft and if you don't like to install "22MB of SHIT from M$" then how about you write your own program? Or simply bugger off and stop trolling?
|
- OFFLINE
Top
|
|
|
|
#109889 - 20 August, 2006 02:49 PM
Re: JA2 Crash Monitor
|
 Lieutenant
Posts: 583
Loc: Sweden
|
A great program working flawlessly! Great work AndroidXP. And on a sidenote: I can't understand why some people become almost aggressive when someone wants to share something they've done or thought out. Things like that make 'me' aggressive... grrr! 
_________________________
I'm actually against guns! -The Hypocrite
|
- OFFLINE
Top
|
|
|
|
#109890 - 20 August, 2006 10:06 PM
Re: JA2 Crash Monitor
|
 N.C.O.
Posts: 302
|
Originally posted by AndroidXP: <rant>wait, you wrote 4KB tool that needs 22MB of SHIT from M$? Who are you? an Indian programmer from "we teach to code in 2 weeks" program?</rant> If you refuse to install that, well, your loss. :rolleyes: Seriously, I couldn't care less for your hate about Microsoft and if you don't like to install "22MB of SHIT from M$" then how about you write your own program? Or simply bugger off and stop trolling? write a program? for WHAT? make a key named "1" in HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\ with a value "taskkill /IM /F ja2.exe" then whenever JA2 freezes just click Winkey + R, then 1 and enter.. no need for 22MB of M$ shit for that Originally posted by Dedas: A great program working flawlessly! Great work AndroidXP.
And on a sidenote: I can't understand why some people become almost aggressive when someone wants to share something they've done or thought out. Things like that make 'me' aggressive... grrr! aggresive? no, more like hopeless and ashamed for all the real programmers (no Visual basic/.Net M$ stit) in the world.
|
- OFFLINE
Top
|
|
|
|
#109891 - 21 August, 2006 08:23 AM
Re: JA2 Crash Monitor
|
 Merc
Posts: 99
Loc: Michigan
|
Feel free to contribute some JA2 Utilities that you've created with your superior coding abilities.
Or sit down, shut up, and either take what's free or leave it.
_________________________
 Let's Rock
|
- OFFLINE
Top
|
|
|
|
#109893 - 21 August, 2006 04:28 PM
Re: JA2 Crash Monitor
|
 Captain
Posts: 1705
Loc: Canada
|
@rasz: wait, you wrote 4KB tool that needs 22MB of SHIT from M$? Who are you? an Indian programmer from "we teach to code in 2 weeks" program? This is inappropriate. Please refrain from such comments. AndroidXP has spent the time to create a free utility for others to use. If you'd like to do the same w/out the need for the .NET FW, go ahead, but racist comments will not be tolerated on this forum. hopeless and ashamed for all the real programmers (no Visual basic/.Net M$ stit) in the world And remember: without VB and .NET and MS, there would be no JA2 1.13 
_________________________
1.13 Wiki: ja2v113.pbwiki.com To contribute, login with "v113" as your password.
|
- OFFLINE
Top
|
|
|
|
#109896 - 23 August, 2006 05:58 PM
Re: JA2 Crash Monitor
|
 Sargeant
Posts: 149
Loc: Austria
______
 Team v1.13
|
Thanks for the support so far I've now updated the tool a bit, download it again to get the new version. ~ Version 1.0.0.1 Added check to prevent running multiple instances of JA2CM Added feature to automatically start JA2 if the JA2CM.exe is placed in the install directory of JA2 Renamed output binary from Ja2CrashMonitor.exe to JA2CM.exe
|
- OFFLINE
Top
|
|
|
|
#109897 - 23 August, 2006 06:00 PM
Re: JA2 Crash Monitor
|
 Captain
Posts: 1779
Loc: Twilight Zone
|
Originally posted by AndroidXP: Added feature to automatically start JA2 if the JA2CM.exe is placed in the install directory of JA2 Can this feature be disabled by the user? If not, please add the option.
_________________________
If you find yourself in a fair fight you didn't plan your mission properly! Those who beat their swords into plowshares will plow for those who don't.
|
- OFFLINE
Top
|
Badges:
|
|
|
|
|
#109903 - 23 August, 2006 06:45 PM
Re: JA2 Crash Monitor
|
 Captain
Posts: 1779
Loc: Twilight Zone
|
Originally posted by AndroidXP: Aha, you do note that JA2CM turns itself off after JA2 shuts down, do you? It stays in memory but inactive? Because that's what I noticed. At least of your original release. I have not tried your second release yet. EDIT: I like to think of your program as similar to a car airbag. It's there regardless of whether you are inside the car or not, and regardless of whether you are moving or parked. It only activates in a crash. Otherwise it's there quietly waiting for something bad to happen. 
_________________________
If you find yourself in a fair fight you didn't plan your mission properly! Those who beat their swords into plowshares will plow for those who don't.
|
- OFFLINE
Top
|
Badges:
|
|
|
|
|
#109905 - 23 August, 2006 06:53 PM
Re: JA2 Crash Monitor
|
 Captain
Posts: 1779
Loc: Twilight Zone
|
Originally posted by AndroidXP: With the additional switch it will stay in "search for JA2 process" mode. Thank you. That's precisely what I wanted (and what I thought the program was doing all along).
_________________________
If you find yourself in a fair fight you didn't plan your mission properly! Those who beat their swords into plowshares will plow for those who don't.
|
- OFFLINE
Top
|
Badges:
|
|
|
|
|
#109906 - 23 August, 2006 07:01 PM
Re: JA2 Crash Monitor
|
 Sargeant
Posts: 149
Loc: Austria
______
 Team v1.13
|
Updated again. Also it should be clear from the readme, that you have to start it again after turning off JA2 ~ Version 1.0.0.2 Added command line switch "-nostart" to disable automatic startup of JA2 Added command line switch "-noshutdown" to disable the automatic shutdown of JA2CM after exiting JA2 - Instead it will stay idle until JA2 is started up again
|
- OFFLINE
Top
|
|
|
|
#109908 - 23 August, 2006 07:07 PM
Re: JA2 Crash Monitor
|
 Sargeant
Posts: 149
Loc: Austria
______
 Team v1.13
|
|
- OFFLINE
Top
|
|
|
|
#109909 - 24 August, 2006 06:55 AM
Re: JA2 Crash Monitor
|
 Captain
Posts: 1779
Loc: Twilight Zone
|
"JA2CM.exe -nostart -noshutdown" Doesn't work correctly. The monitor process still removes itself from memory less than a minute after I manually exit JA2. That was the bad news. The good news is that the monitor works SPLENDIDLY at killing a JA2 task that would otherwise cause me to press the reset switch. Thank you!!! 
_________________________
If you find yourself in a fair fight you didn't plan your mission properly! Those who beat their swords into plowshares will plow for those who don't.
|
- OFFLINE
Top
|
Badges:
|
|
|
|
|
#109910 - 24 August, 2006 10:52 AM
Re: JA2 Crash Monitor
|
 Sargeant
Posts: 149
Loc: Austria
______
 Team v1.13
|
Strange... I'll investigate immediately. E: Everything seems fine here. I've now had it running for more than half an hour, starting and ending JA2 multiple times, even killing the ja2 process manually. No matter what I do, JA2CM stays active. The target in my shortcut looks like this: "D:\JA2 - 1.13 SVN\JA2CM.exe" -nostart -noshutdown E2: Smallish update ~ Version 1.0.0.3 Added command line switch "-debug" to output JA2CM's actions into JA2CM.log Maybe this helps investigating if your JA2CM keeps shutting down. 
|
- OFFLINE
Top
|
|
|
|
#109911 - 24 August, 2006 03:23 PM
Re: JA2 Crash Monitor
|
 Captain
Posts: 1779
Loc: Twilight Zone
|
Thanks for adding the debug option. It's possible I was still using the v1 .exe with the v2 switches (which, of course, won't work properly). My bad. The -noshutdown option is working fine. Anyway, I have a report for you: JA2CM started [8/24/2006 9:06:26 AM, start=false, shutdown=false, ID: 604]
> Searching for JA2 process...
- Found JA2 process [9:06:42 AM, ID: 2980]
> Checking JA2 responsiveness...
- JA2 not responding, killing process [9:06:52 AM]
> Searching for JA2 process...
- Found JA2 process [9:08:07 AM, ID: 2812]
> Checking JA2 responsiveness...
- JA2 not responding, killing process [9:08:17 AM]
> Searching for JA2 process...
JA2CM started [8/24/2006 9:11:38 AM, start=false, shutdown=false, ID: 4012]
> Searching for JA2 process...
- Found JA2 process [9:11:53 AM, ID: 3984]
> Checking JA2 responsiveness...
- Normal JA2 shutdown detected [9:15:05 AM]
> Searching for JA2 process... What happens is that often the monitor will kill the just-starting JA2 almost immediately after I manually launch it. I kill the monitor task, restarted the monitor, and now the problem's gone away. But I've seen this before (in earlier versions). It's possible that the 5-second non-response check is too short and it may need to be longer (15s, 30s, longer)? Perhaps you can also add a command-line option to set this value?
_________________________
If you find yourself in a fair fight you didn't plan your mission properly! Those who beat their swords into plowshares will plow for those who don't.
|
- OFFLINE
Top
|
Badges:
|
|
|
|
|
#109912 - 24 August, 2006 03:43 PM
Re: JA2 Crash Monitor
|
 Major
Posts: 2404
|
I'm wondering if the 'non-response check' should be tied to that line in the JA2_options-file:
; Time in seconds for DeadLock delay, default 15 ; Do not set this too low! DEAD_LOCK_DELAY = 10
I can imagine if the JA2CM is set at a lower value than this setting it would 'do it's job', perhaps even if it's not needed.
added: "If there's one annoying thing, then it's JA2 crashing." What I dislike (vehemently) is when I win a battle, get some cool items/guns and crash before saving it...
_________________________
Look behind you, a threeheaded monkey !!!
|
- OFFLINE
Top
|
|
|
|
#109913 - 24 August, 2006 03:49 PM
Re: JA2 Crash Monitor
|
 Sargeant
Posts: 149
Loc: Austria
______
 Team v1.13
|
Aha, thanks for the reports, I think I can fix that now. Normally the search and check loops have a delay of 5 seconds. When I introduced the autostart feature, I once experienced a shutdown of the just created JA2 process, because it seems JA2 reports as "unresponsive" during XML loadup time (which can sometimes take a while). Therefore I've added a 20 second delay after creating the JA2 process, eliminating that problem. I'll just add that 20 sec delay after "finding" the JA2 process, too. E: ~ Version 1.0.0.4 Added version number output to JA2CM.log Added 20 second delay after finding the JA2 process (before starting responsiveness check)
|
- OFFLINE
Top
|
|
|
|
#109915 - 26 August, 2006 12:02 AM
Re: JA2 Crash Monitor
|
 Captain
Posts: 1033
|
Does win XP normally come with this .net framework, or would I probably have to download it and install it to use this program?
Sorry for the stupid question. I'm not really a programmer.
_________________________
“nobody shoots anybody in the face unless you’re a hit man or a video gamer.” - Jack Thompson, as quoted on Wikipedia
|
- OFFLINE
Top
|
|
|
|
#109923 - 27 August, 2006 11:02 PM
Re: JA2 Crash Monitor
|
 Captain
Posts: 1033
|
Thanks for the advice, guys. It'll be nice having the peace of mind that I won't get a really bad crash when I'm using JA2 on my laptop.
_________________________
“nobody shoots anybody in the face unless you’re a hit man or a video gamer.” - Jack Thompson, as quoted on Wikipedia
|
- OFFLINE
Top
|
|
|
|
#109924 - 06 September, 2006 07:47 PM
Re: JA2 Crash Monitor
|
 Merc
Posts: 48
Loc: Washington, PA, USA
|
@AndroidXP
When I first saw this program, I was very hopeful that it would help me. I am getting a pretty persistent (but random) blue-screen crash, most often when viewing anything on the in-game laptop.
I got JA2CM working fine, and started it logging... and sure enough I got my crash today, but JA2CM doesn't seem to help me. It shows in the log that it detected the non-responsive JA2, and it said it killed the process, and then shut itself down.
The on-screen behavior, however, doesn't match what the log said, because JA2 was on my screen the whole time, and I still got the BSOD crash in nv4_disp.dll.
The crash's behavior is usually a freeze on the in-game laptop (I've had it both in BR and AIM websites). Sometimes it's just a momentary freeze and it comes back in about 10 seconds, but it sometimes doesn't come back. I could tell JA2CM did something because the music stopped playing mid-song (looping sound) but the JA2 screen never went away and I still got the BSOD.
This doesn't happen in any other game that I play, and I am very experienced in keeping my system in tip-top shape as I have been building them for years.
Any suggestions?
thanks
bkp57
|
- OFFLINE
Top
|
|
|
|
#109926 - 07 September, 2006 01:11 AM
Re: JA2 Crash Monitor
|
 Captain
Posts: 1033
|
Android,
I just want to thank you for the crash monitor. It works like a dream for me and it really takes the stress out of my JA2 experience.
_________________________
“nobody shoots anybody in the face unless you’re a hit man or a video gamer.” - Jack Thompson, as quoted on Wikipedia
|
- OFFLINE
Top
|
|
|
|
|
|