VOGONS


First post, by therealjohn1

User metadata
Rank Newbie
Rank
Newbie

Hello!

I have been using DOSbox and D-fend for many years now... I have MS Windows 2000 PRO SP4... I just got DOSbox 0.72 and D-fend does not work properly with it CUZ it has been discontinued...

So I downloaded: D-Fend-Reloaded From: http://dfendreloaded.sourceforge.net/ It is the one that has:

D-Fend-Reloaded-0.3.2-Setup.exe (10.7 MB)
This package contains D-Fend Reloaded 0.3.2 (English, French, German, Russian & Spanish), DOSBox 0.72 (including all language files currently available) and the FreeDos commandline tools.

I tried DOSbox 0.72 on its own and it runs fine BUT when I run D-Fend-Reloaded-0.3.2 This is the Error I get:

DFend.exe - Application Error

The application failed to initialize properly (0xc0000005). Click on OK to terminate the application.

Please Help me Fix this Problem ?

Thanks!

Reply 1 of 13, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

Have you tried re-downloading DF-Reloaded?
How big is the file you downloaded?

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 2 of 13, by Alexander

User metadata
Rank Oldbie
Rank
Oldbie

Hi therealjohn1,

redownloading the file would be my first suggestion, too. I've never seen this error message before, so I googled for "The application failed to initialize properly (0xc0000005)".

I have found reports about viruses, low-level drivers, harddisk bugs and also RAM errors causeing this.

The error code "0xc0000005" means "STATUS_ACCESS_VIOLATION" and can also be raised from the data execution protection, see MS technet. And I have to admit, D-Fend Reloaded is using some self manipulating code, sorry for this. I needed to replace the GetResourceString function to make message boxes translateable. I have found the concept of replaceing RTL functions at the GetText project. And because GetText is quite common, I thought this would be no problem. Additionally I don't know any other way to make things like message boxes translateable. (The Delphi-MessageDlg function is also called by some RTL function, so simply writing a new MessageDlg2 function wouldn't do it. I had to change the strings the real MessageDlg function uses. And because this strings are resourcestrings, they are not changeable at runtime, so I had to replace the function delivering this strings to the MessageDlg function.) If you have activated the DEP in the "all applications mode", you can try to add D-Fend Reloaded to the exception list.

I will make some tests with the DEP today, too. If you have an address where the error occures, this could also help me.

Alexander

Reply 3 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

If you really need SMC by writing into data segments you have to flag them
as code-containing, too, similar for writing into code segments i guess.

Reply 4 of 13, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

DEP? And Windows 2000?

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 5 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Dunno, never used 2000.

Reply 6 of 13, by Alexander

User metadata
Rank Oldbie
Rank
Oldbie

Hmm, the last time I used W2K was even before I heared of DEP, so I think it doesn't support it. Must have missed the operation system information in the original post. But perhaps W2K supports it with SP4 ?

I'm using a

VirtualProtect(ASource, Size, PAGE_EXECUTE_READWRITE, OldProtect)

before writing a jump to my new GetResString function at the start of the old GetResString function. I've just tested it with an enabled "Use DEP for all applications" (and of course without adding D-Fend Reloaded to the exceptions list). For me it works fine. But by the way: DOSBox 0.72 crashes if I try to open it in window mode with output=overlay in DEP-all-mode. (Newer CSV builds seem to be not affected.)

So I see no reason for D-Fend Reloaded to show the posted error.

To therealjohn1: Perhaps this advice from the MS KB will help you or this one I found via google:

Backup and delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RPCKDM To delete it Go to Start | Run and type regedit and press . In the left column navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\RPCKDM and highlight it. Right click it and select Export, giving it a name you can remember. Then right click it again and select Delete.

Reply 7 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

DEP is the inverse problem, executing data. If i understand correctly you
are writing into the code segment. No idea if that's fine to do so,
the entry in the executable for the code segment should be exec-only,
but then it shouldn't work under xp, too.

Reply 8 of 13, by therealjohn1

User metadata
Rank Newbie
Rank
Newbie

Hello! Again!!

So today I tried all the other solutions listed here and No Luck...

So then I uninstalled it and went to start run regedit and then in regedit I went to the menu- edit - find and searched for fend and deleted everything to do with d-fend and d - fend reloaded and I also searched for dosbox and deleted everything for that. Also I made sure all the D-fend, dosbox And d-fend reloaded folders from program files was deleted...

Then I installed D-Fend-Reloaded-0.3.2-Setup.exe it and Same problem...

So then I restarted my computer and went to safe mode with networking and when the OS loaded up I tried it in there And guess what?

IT WORKED JUST FINE LIKE IT WAS MADE TO...

So is there a app to log what is happening when I run D-Fend-Reloaded-0.3.2 so we can figure out what task is causing the error?

If U know that or anything else I could try Please Help me out ? 😕

Thanks! 😲

Reply 9 of 13, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

Alexander won't like it, but you could try another frontend instead of DFR. On the other hand, you could do Alexander a huge favour by also keeping DFR around, and help him find the cause of this error.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 10 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Try closing down all background applications first (if this includes the firewall
and antivirus, be sure to physically cut off the internet first, and don't forget to
re-enable the firewall/av after testing).

Reply 11 of 13, by Alexander

User metadata
Rank Oldbie
Rank
Oldbie

Hi,

first of all: The main reason why I have written D-Fend Reloaded was to have a good D-Fend replacement for me. I only made it public because I thought perhaps some other people would like it, too. I don't earn money with it or something like this. So I really have no problem with using other frondends. Each frontend has it's own advantages. DBGL is plattform independend, DOG has the nice zip support and so on.

If D-Fend Reloaded would show a normal protection fault, I already would have made a special build with some start-up logging. But this error seems to be a bit more complex. As far as I understand the "The application failed to initialize properly" message there are problems when initializing (=loading into memory, loading DLLs, etc.) the program, not when running it. (So before starting the main thread.) A debugger will probabily be able to monitor what is happening but logging from inside the application could be difficult. Anyway I will make a special build trying to log each startup step. But I don't think I will have time to do this before easter.

If a program doesn't run in normal mode but works in safe mode, there could be something wrong with a device driver which is loaded in normal mode only. D-Fend Reloaded is not loading any special DLLs at startup directly, but some DLLs are loaded indirectly: The DLLs providing the common dialogs (file load/save) are loaded and because they provide a explorer-like file list, the explorer (context menu) extension DLLs are also loaded. Some DLLs are loaded into any started process; for example pressing the volume up/down buttons on my laptop is recogniced by a special DLL loaded into any process and linked to each message queue. On my system 40 DLLs are loaded into the D-Fend Reloaded address space at start-up.

Perhaps a bug in one of your background processes / drivers / loaded DLLs is triggered by D-Fend Reloaded or perhaps the other way round. So it would be a good test to disable as many as possible things and trying to run D-Fend Reloaded. (And I will make a special log-start-up build by next week.)

Greetings
Alexander

Reply 12 of 13, by therealjohn1

User metadata
Rank Newbie
Rank
Newbie

Hello! Again!!

Well this is weird ? 😳

I was checking out the files in D-fend Reloaded in the program files directory and I tried running DFend.exe from there... And guess what?

I am not in safe mode and it worked! 😁

So then I tried clicking the icon on the desktop that the Installation makes And same problem... So then I went to the DFend Reloaded forlder in the Start Menu And it worked just fine...

So finally I deleted the Icon from the desktop that the install creates and went to the on e in the start menu and right clicked it and left clicked on? Send to Desktop (Create Shortcut) And then it made a Icon on the desktop...

And it worked! 😅

So the problem is solved!!

Thanks! for everyones Help. 😊

Later! 😉

Reply 13 of 13, by Alexander

User metadata
Rank Oldbie
Rank
Oldbie

Hi therealjohn1,

I think you should really check your system for faultily drivers and things like this. The D-Fend Reloaded installer creates the start menu shortcut by this command:

CreateShortCut "$SMPROGRAMS\D-Fend Reloaded\$(LANGNAME_DFendReloaded).lnk" "$INSTDIR\DFend.exe"

While it's creating the desktop shortcut by this command

CreateShortCut "$DESKTOP\D-Fend Reloaded.lnk" "$INSTDIR\DFend.exe"

Exactly the same command and the same link target, only the filename and path of the link file differ. So if Windows can start D-Fend Reloaded by the one way but not by the other, there must be something wrong in your system.

But anyway, nice to hear it's running now.

Greetings
Alexander