Kitz Forum

Broadband Related => Router Monitoring Software => Topic started by: broadstairs on June 27, 2014, 07:58:32 AM

Title: Strange DSLStats situation
Post by: broadstairs on June 27, 2014, 07:58:32 AM
Eric I need some advice from you. I have been having some strange issues with my W2K PC which I think I fixed yesterday as some malware was detected in notepad.exe which got deleted. I have now got a new copy but each time I try to start DSLStats I get an access violation which if I ignore it opens without loading the .ini data and then complains when I try to close it saying it cannot save the ini. If I delete the .ini it starts ut apparently will not save a copy when closed and next start goes back to the access violation.

Any ideas?

Stuart
Title: Re: Strange DSLStats situation
Post by: roseway on June 27, 2014, 08:30:03 AM
Stuart, my first thought is that this is related to the fact that, with the Windows version of DSLstats, the .ini file can be in one of two different places (either with the other DSLstats files or in the location advised by the OS). I'll check this out this morning, but in the meantime it may be worth making sure that there isn't a .ini file in either location.
Title: Re: Strange DSLStats situation
Post by: broadstairs on June 27, 2014, 08:33:04 AM
Eric this happened after I cleaned the malware and re-booted the PC. DSLStats had been running OK prior to the re-boot but would not start immediately after the re-boot. I save the .ini files in the program folder. It would appear that DSLStats could not open the existing .ini file for some reason, it may be that there is an old one somewhere so I will check.

Stuart
Edit: Just checked and the failed starts today had created the files in Documents and Settings so deleted them and copied back the original .ini file to the program directory but it still fails with the errors on start.

Edit again: One question does DSLStats call notepad at all?

Yet another Edit: Renamed the old dslstats folder and created a new one and downloaded the latest beta again and unpacked. All went OK and .ini moved to program folder OK but on close and restart it still fails!
Title: Re: Strange DSLStats situation
Post by: roseway on June 27, 2014, 10:11:31 AM
Quote
One question does DSLStats call notepad at all?

No, it doesn't call any external programs.

I've got a working W2K system here, and I'm going to try to reproduce this problem.
Title: Re: Strange DSLStats situation
Post by: broadstairs on June 27, 2014, 10:56:12 AM
OK Thanks....

Stuart
Title: Re: Strange DSLStats situation
Post by: roseway on June 27, 2014, 04:17:39 PM
I'm afraid I've been completely unable to reproduce this error after trying all sorts of startup conditions, and different options set in the program before closing down. In particular, starting with a completely clean situation (all copies of dslstats.ini deleted) works with no issues at all, regardless of of how you play with the options.

The log entry "Unable to save configuration to.." is the result of an exception being trapped while trying to save dslstats.ini, and I can't see any remaining ways in which this can occur apart from a problem with the filesystem.

I'll continue to look for possible causes, but at the moment I can't see any.
Title: Re: Strange DSLStats situation
Post by: broadstairs on June 27, 2014, 06:59:06 PM
OK thanks for looking Eric. I'll run chkdsk and see if it throws anything.

Stuart
Title: Re: Strange DSLStats situation
Post by: NewtronStar on June 27, 2014, 10:19:22 PM
OK thanks for looking Eric. I'll run chkdsk and see if it throws anything.

Stuart

Which Malware Software did you use ? and I am not pointing the finger at the Malware removal software as yet but some go to far into the system files IE the (Registry)
Title: Re: Strange DSLStats situation
Post by: broadstairs on June 28, 2014, 08:03:52 AM
Which Malware Software did you use ? and I am not pointing the finger at the Malware removal software as yet but some go to far into the system files IE the (Registry)

I used Superantispyware free edition and it removed two things a corrupt notepad.exe (since re-installed from W2K CD) and another in an AutoIT file (since uninstalled this as it is no longer used). It also complained about a whole bunch of tracking cookies which were also removed. I do not leave Superantispyware running.

DSLStats is the only program on the affected PC which fails. I have checked the file systems with chkdsk which has found some minor issues and fixed them but DSLStats still fails. As I said I downloaded a new copy of the latest beta and installed a new copy but to no avail.

Stuart
Title: Re: Strange DSLStats situation
Post by: roseway on June 28, 2014, 08:30:28 AM
I'm really puzzled by this, Stuart. Can I be clear about the sequence of events?

Before the malware event, what version of DSLstats was working? Is it the same version which now doesn't work? If they're different versions, does the release version 4.53.3 work?

Have you tried removing all traces of DSLstats in both locations (i.e. the folder where the program files are stored and in C:\Documents and Settings\<Your name>\Local Settings\Application Data\dslstats) then starting with a completely clean new installation?

Starting with a clean new installation, can you run DSLstats then immediately close it down again without configuring anything? If you do this, does it still fail to save the configuration file?

Sorry about all the questions, but I do want to establish where the failure is occurring.
Title: Re: Strange DSLStats situation
Post by: broadstairs on June 28, 2014, 08:43:27 AM
OK I'll try to set this out.

1.DSLStats latest beta was running normally
2.Ran Superantispyware to clean up two trojans, one in notepad.exe and one in an AutoIT file
3.Rebooted W2K all started ok EXCEPT DSLStats which started to error
4.Ran chkdsk to clean up minor errors on partitions with several reboots
5.DSLStats still failing

Now at this point I tried the latest stable DSLStats which started OK but failed after stop/start. I had also tried downloading a new copy of the beta and install it but it did not fix it.

So now to the latest tests this morning. I downloaded a new beta copy and installed it in a new folder on a different partition (which is actually on a second HDD). This has been started, configured and is running OK. Next test is to stop and start it to see what happens, which I will do now....

this has now failed to start with the access violation error. I can see in the folder that on exit the .ini file was updated but if I click OK instaed of Cancel to the violation it comes up with no settings from the .ini!

Hope this explains what is going on but to be honest I am getting a little confused with what I have and have not tried!

Stuart

Edit: just tried a new folder and started and stopped DSLStats and it will start OK each time, so without doing any config it will start OK each time.

2nd Edit: Just tried using OS location for .ini file but on second start get the same error.
Title: Re: Strange DSLStats situation
Post by: renluop on June 28, 2014, 10:05:40 AM
As a sort of aside ( hopefully with some slight relevance), although I use free Revo Undelete on its strongest setting to clean uninstall, out of curiosity I have found left overs on a second run, also items left in Registry.
Title: Re: Strange DSLStats situation
Post by: broadstairs on June 28, 2014, 12:33:53 PM
As a sort of aside ( hopefully with some slight relevance), although I use free Revo Undelete on its strongest setting to clean uninstall, out of curiosity I have found left overs on a second run, also items left in Registry.

Although I have run ccleaner I dont believe DSLStats uses the Registry at all so that is unlikely to affect it.

Stuart
Title: Re: Strange DSLStats situation
Post by: roseway on June 28, 2014, 12:36:10 PM
That's correct Stuart.
Title: Re: Strange DSLStats situation
Post by: broadstairs on June 28, 2014, 12:49:25 PM
Eric would there be any mileage in turning off you trapping of access violations and see if Windows gives any more information? Please dont bother if this causes you a lot of work though.

Stuart
Title: Re: Strange DSLStats situation
Post by: roseway on June 28, 2014, 01:13:04 PM
I've been thinking about making some changes to the way errors are trapped, to give more information. Rather than turning off error trapping, I've been considering making it more fine grained, with a descriptive event log entry which will point more precisely at the area where the problem occurs. I'll see what I can do with this.
Title: Re: Strange DSLStats situation
Post by: broadstairs on June 28, 2014, 01:29:27 PM
Thanks Eric, I think this will be a good move as these problems I am having are almost certainly nothing to do with the DSLStats code itself but the OS. Anything which can help explain any errors would be very worthwhile.

Stuart
Title: Re: Strange DSLStats situation
Post by: renluop on June 28, 2014, 02:22:10 PM
 :-[ :-X
Title: Re: Strange DSLStats situation
Post by: NewtronStar on June 28, 2014, 07:47:06 PM
As a sort of aside ( hopefully with some slight relevance), although I use free Revo Undelete on its strongest setting to clean uninstall, out of curiosity I have found left overs on a second run, also items left in Registry.

Although I have run ccleaner I dont believe DSLStats uses the Registry at all so that is unlikely to affect it.

Stuart

Well DSLstats my not use the registry directly but if I run Regedit and do a search for DSLstats quite a few registry entries come up in the file system for DSLstats  :-\
Title: Re: Strange DSLStats situation
Post by: broadstairs on June 28, 2014, 10:25:14 PM
Yes but they are all either windows or application settings, like recently used stuff in editors for example.

Stuart
Title: Re: Strange DSLStats situation
Post by: roseway on June 28, 2014, 10:53:28 PM
That's correct. DSLstats itself doesn't touch the registry.
Title: Re: Strange DSLStats situation
Post by: NewtronStar on June 28, 2014, 11:19:21 PM
Yes but they are all either windows or application settings, like recently used stuff in editors for example.

Stuart

Thanks Roseway & Broadstairs for that info, I whish you had a rollback (system restore) for that W2K BS it may have undone what the malware program did  :(
Title: Re: Strange DSLStats situation
Post by: kitz on June 30, 2014, 10:48:03 PM
Although dslstats doesnt write anything to the registry, it does create & need an .ini file to run.

In windows the default program to open .ini is notepad, so I guess at when you ran the malware cleaner and it deleted notepad.exe, then it also deleted any file associations with notepad.

You may need to create a new association for notepad with the .ini extension.   I cant recall how to do this now on a win2k machine as its >10yrs since Ive used w2k, but Im sure if you google it, somewhere will tell you.   I think it was CP > Folder Options > File types.
Title: Re: Strange DSLStats situation
Post by: broadstairs on June 30, 2014, 11:37:30 PM
Although dslstats doesnt write anything to the registry, it does create & need an .ini file to run.

In windows the default program to open .ini is notepad, so I guess at when you ran the malware cleaner and it deleted notepad.exe, then it also deleted any file associations with notepad.

You may need to create a new association for notepad with the .ini extension.   I cant recall how to do this now on a win2k machine as its >10yrs since Ive used w2k, but Im sure if you google it, somewhere will tell you.   I think it was CP > Folder Options > File types.

Indeed and it has all been replaced with kosher copy and file associations restored. Eric confirmed that he does not call any external programs so I doubt that would be an issue anyway.

Stuart
Title: Re: Strange DSLStats situation
Post by: kitz on July 01, 2014, 12:24:31 AM
>>  file associations restored

ok..  just checking as that was my immediate thought as what would cause the problem....  as reinstalling notepad wouldnt automatically recreate the file associations.
Title: Re: Strange DSLStats situation
Post by: broadstairs on July 01, 2014, 08:03:15 AM
>>  file associations restored

ok..  just checking as that was my immediate thought as what would cause the problem....  as reinstalling notepad wouldnt automatically recreate the file associations.

Yes initially I wondered but Eric assured me he did not use notepad (or anything else external).

Stuart
Title: Re: Strange DSLStats situation
Post by: roseway on July 01, 2014, 11:02:43 AM
Stuart,

I've produced a version which has a lot of extra error logging during startup and closedown, to try to get to the bottom of your issue. Any errors which occur during startup should be logged in some detail, and if errors occur during closedown (or while saving the configuration), the errors are logged, the log is saved, and a popup message will tell you where the event log is saved.

This version (4.99) is actually the version I hope to release as 5.0, and has several small improvements shown in the included changelog. It's Windows only at present.

http://www.s446074245.websitehome.co.uk/files/dslstats32W-4.99.zip (http://www.s446074245.websitehome.co.uk/files/dslstats32W-4.99.zip)
Title: Re: Strange DSLStats situation
Post by: broadstairs on July 01, 2014, 05:33:36 PM
Eric this version will start and run but insists on having the graphs and .ini in the OS location initially and not program directory. I was able to change it back but on any susequent start the event log gives.

Quote
01 Jul 2014 17:31:56   Configuration files stored in F:\DSLStats\
01 Jul 2014 17:31:56   Error restoring login configuration
01 Jul 2014 17:31:56   Snapshot folder is F:\DSLStats\Graphs\

However it does not run....


Stuart

Edit: I just had a thought and wondered if the SuperAntiSpyware I installed did something to force .ini files into Documents & Settings but there is nothing in its prefs to suggest that. I may uninstall it and see if it makes any difference.
Title: Re: Strange DSLStats situation
Post by: NewtronStar on July 01, 2014, 08:01:00 PM
Eric this version will start and run but insists on having the graphs and .ini in the OS location initially and not program directory. I was able to change it back but on any susequent start the event log gives.

Quote
01 Jul 2014 17:31:56   Configuration files stored in F:\DSLStats\
01 Jul 2014 17:31:56   Error restoring login configuration
01 Jul 2014 17:31:56   Snapshot folder is F:\DSLStats\Graphs\

However it does not run....


Stuart

Edit: I just had a thought and wondered if the SuperAntiSpyware I installed did something to force .ini files into Documents & Settings but there is nothing in its prefs to suggest that. I may uninstall it and see if it makes any difference.

thats sounds like an issue with permission for authenicated users to access and modify the ini. file in that location.  :-\
Title: Re: Strange DSLStats situation
Post by: kitz on July 01, 2014, 08:18:43 PM
>>  file associations restored

ok..  just checking as that was my immediate thought as what would cause the problem....  as reinstalling notepad wouldnt automatically recreate the file associations.

Yes initially I wondered but Eric assured me he did not use notepad (or anything else external).

Stuart

Dslstats doesn't directly use or call notepad.  But WINDOWS needs some text editor to be associated with .ini files that dslstats needs to run.  The o/s also needs permission to run notepad.exe, so check perms.

If the file associations or even the paths for notepad.exe are wrong then this can cause problems with any programs that use or create log, com and ini type files.  It can be a headache for a programmer if the path for notepad isn't in the default location...  Or even going back further I seem to recall problems with notepad.exe location being in sys32 or windows directory and the %path% not being set right.  I certainly can recall paths being a pita when using the likes of turbo pascal and the early javac compilers on w2k/winME when I was at college.

I can't google atm as I'm on the ipad, but I'm wondering about the possibility of not all the notepad dependencies being extracted... And if it's worth installing something like notepad++ as the default text editor and associate that with ini files.


----
NS posted whilst I was typing this, but leaving my post as was

Title: Re: Strange DSLStats situation
Post by: broadstairs on July 01, 2014, 08:25:48 PM
The strange thing is that now DSLStats (this new version) is running and updating the.ini file in the program folder. There is only one user on this system - me - and I am administrator and everything else is running just fine all using program folders where there is an option. It was ONLY DSLStats which failed to start error free after the malware was removed.

Stuart
Title: Re: Strange DSLStats situation
Post by: NewtronStar on July 01, 2014, 08:52:47 PM
The strange thing is that now DSLStats (this new version) is running and updating the.ini file in the program folder. There is only one user on this system - me - and I am administrator and everything else is running just fine all using program folders where there is an option. It was ONLY DSLStats which failed to start error free after the malware was removed.

Stuart

Just one of those DSLstats anomalies then, now which version of DSLstats where you using before this went belly up ?
Title: Re: Strange DSLStats situation
Post by: broadstairs on July 01, 2014, 09:12:25 PM
Just one of those DSLstats anomalies then, now which version of DSLstats where you using before this went belly up ?

I already indicated at the start that (at the time it happened) I was running what was the latest beta. Now the one which is working is the one Eric put up today for testing. I suspect it is catching an error now and handling it which it was not doing before. Whether that error is a DSLStats issue or an OS problem I dont know until Eric comes back with his opinion.

Stuart
Title: Re: Strange DSLStats situation
Post by: NewtronStar on July 01, 2014, 09:22:48 PM
Just one of those DSLstats anomalies then, now which version of DSLstats where you using before this went belly up ?

I already indicated at the start that (at the time it happened) I was running what was the latest beta. Now the one which is working is the one Eric put up today for testing. I suspect it is catching an error now and handling it which it was not doing before. Whether that error is a DSLStats issue or an OS problem I dont know until Eric comes back with his opinion.

Stuart

So you were running the lastest beta V4.54.8 which had the problem is that correct ?
It would be nice for other members to know which version your using the reference V0.00.0 it does help  ;)
Title: Re: Strange DSLStats situation
Post by: roseway on July 01, 2014, 11:18:08 PM
I have some ideas about this now. DSLstats doesn't call any Windows programs, but it does of course call native APIs and uses native widgets. (These calls are indirect, because Lazarus is a cross-platform development system and so has an interface layer between the programmer and the native APIs and widgets.)

In reading and writing .ini files, API calls will be made, and it's possible that the malware attack damaged this part of the OS. The fact that no other programs are affected may simply be because you don't use any other programs which use .ini files. This possibility would be supported by the error message you reported "Error restoring login configuration". In a more general sense it would explain why errors are occurring during both reading and writing .ini files.

All the DSLstats tabs which display text use a widget called a memo control. This widget is, I believe, also used by Notepad for its main text editing window. I wonder if the malware attack may have damaged this widget as well as the Notepad program. I can't really see how this would lead to problems reading and writing .ini files, but it could cause DSLstats to malfunction.


Title: Re: Strange DSLStats situation
Post by: broadstairs on July 02, 2014, 07:37:42 AM
Eric, thanks for the explanation. As this PC is working OK at present for everything except DSLStats I'll live with it for now, if I take it down to rebuild it will take my weather station offline for quite a while which is something I'll only do as a last resort. In the mean time I'll investigate this memo control thing and see if I can come up with what modules are involved.

Stuart