View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001949 | unreal | ircd | public | 2004-07-11 23:18 | 2004-08-24 16:24 |
Reporter | rocafella | Assigned To | |||
Priority | normal | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Win32 | OS | Windows 2003 Server | ||
Product Version | 3.2.1 | ||||
Summary | 0001949: unreal.exe crashes when installing or modifying services | ||||
Description | This bug may only affect Windows 2003 Server, not sure since I only tested on that OS. It crashes when using unreal.exe to install or modify the UnrealIRCd service. | ||||
Steps To Reproduce | From the command prompt type -> "unreal.exe install" | ||||
Additional Information | I managed to fix it by removing the related uChangeServiceConfig2() and GetProcAddress() code from "src/win32/unreal.c", then replacing it with ChangeServiceConfig2(). However, I believe that code was added for NT4 compatibility (maybe?). For example: Before: uChangeServiceConfig2(hService, SERVICE_CONFIG_DESCRIPTION, &info); After: ChangeServiceConfig2(hService, SERVICE_CONFIG_DESCRIPTION, &info); This works for me, but I'm there is another more appropiate fix. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
3rd party modules | |||||
|
Yeah, we can't do that because of NT4 which does not support that function. |
|
can't you use the WINNT constant or something like that? |
|
No. Constants are compile time. At compile time, I have no clue whether a user is going to install Unreal on NT4, or XP, or 95 for that matter. The check needs to be runtime which is one of the reasons why GetProcAddress exists. |
|
Well I was saying use that for those who hand-compile Unreal... For Run-Time checks, I guess you could use GetVersionEx()... (No GetProcAddress() doesn't seem a good way to check an OS version to me ;p , though it would work to check for specific things like this...) |
|
Uhh I have no clue what you are talking about. Of course I use GetVersionEx. However, ChangeServiceConfig2 doesn't exist on NT4. So that means when you run the unreal.exe on NT4 you'd get an error saying it couldn't resolve that symbol. The only way to deal with that is to link it at runtime, hence GetProcAddress. |
|
Oh I see now... okay then ;) |
|
Unfortunately though, I have no access to a Win2003 machine, and so I have no way to do any testing with this... |
|
I have a windows 2003 server (enterprise edition) machine.. so if i can help.. |
|
Perhaps you can. When you do (while Unreal is NOT running): unreal uninstall unreal install from the commandline, does it crash? |
|
I'm not on this machine right now.. When i will go i will test it. |
|
I'm using Windows 2003 Standard, it crashes on install, config startup and config crashrestart. All of which call uChangeServiceConfig2(). ;) Tested with the precompiled Win32 Unreal-3.2.1 binaries from the website. edited on: 2004-07-12 14:57 |
|
rocafella, well seeing as how you've managed to fix this, I'm guessing you have a bit of C knowledge? I'm currently thinking the problem is GetProcAddress is returning NULL. Would you be able to test to see if GetProcAddress is returning NULL? My other hunch is that maybe 2003 only implements ChangeServiceConfig2 as Unicode. Perhaps doing ChangeServiceConfig2W instead of ChangeServiceConfig2A would work? |
|
Nope, GetProcAddress is not returning NULL (tested it) and ChangeServiceConfig2W does not seem to work either. I'll try a few other things... edited on: 2004-07-12 16:36 |
|
Are you sure that Windows NT has service descriptions? I came across a few web pages and comments in various open source projects mentioning that WinNT doesn't support service descriptions. One of these projects being Apache2, in server/mpm/winnt/service.c and the function set_service_description(). http://cvs.apache.org/viewcvs.cgi/*checkout*/httpd-2.0/server/mpm/winnt/service.c I thought NT had service descriptions, but then again, it has been a while since I've last used it; so it may just be a figment of my imagination. ;) Edit: Added service.c link. edited on: 2004-07-12 17:29 edited on: 2004-07-12 17:31 |
|
Uhh, I never said NT4 had them, I said it *does not* have them. Hence why we need to do it at runtime. Service descriptions were added in win2000. |
|
Sorry for the delay, my work kept me busy. I've managed to fix this issue, as far as I can tell. I've tested the fix on Windows 2003 Standard Edition and Windows NT 4.0 Workstation (installed under VMWare), and it works successfully on both. There is a diff file and a patched unreal.c included in the attached ZIP file. Let me know if it works out for you as well. :) |
|
Fixed in .121 |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-07-11 23:18 | rocafella | New Issue | |
2004-07-11 23:34 |
|
Note Added: 0006998 | |
2004-07-12 00:28 | aquanight | Note Added: 0006999 | |
2004-07-12 00:30 |
|
Note Added: 0007000 | |
2004-07-12 12:38 | aquanight | Note Added: 0007004 | |
2004-07-12 12:43 |
|
Note Added: 0007005 | |
2004-07-12 12:55 | aquanight | Note Added: 0007006 | |
2004-07-12 13:10 |
|
Note Added: 0007010 | |
2004-07-12 13:18 | vonitsanet | Note Added: 0007011 | |
2004-07-12 13:21 |
|
Note Added: 0007012 | |
2004-07-12 13:26 | vonitsanet | Note Added: 0007013 | |
2004-07-12 14:52 | rocafella | Note Added: 0007018 | |
2004-07-12 14:57 | rocafella | Note Edited: 0007018 | |
2004-07-12 15:27 |
|
Note Added: 0007019 | |
2004-07-12 16:36 | rocafella | Note Added: 0007023 | |
2004-07-12 16:36 | rocafella | Note Edited: 0007023 | |
2004-07-12 17:28 | rocafella | Note Added: 0007025 | |
2004-07-12 17:29 | rocafella | Note Edited: 0007025 | |
2004-07-12 17:31 | rocafella | Note Edited: 0007025 | |
2004-07-12 17:34 |
|
Note Added: 0007026 | |
2004-08-04 04:56 | rocafella | File Added: unreal-svcfix.zip | |
2004-08-04 05:01 | rocafella | Note Added: 0007306 | |
2004-08-24 16:24 |
|
Status | new => resolved |
2004-08-24 16:24 |
|
Resolution | open => fixed |
2004-08-24 16:24 |
|
Assigned To | => codemastr |
2004-08-24 16:24 |
|
Note Added: 0007421 |