2 Random, Hard to Trace Problems

I have 2 problems I am hoping someone has expericnce with and might be able to offer some insight or a solution they found.

  1. A couple of my customers, who each run my program on over a dozen computers without issue will suddenly have one computer that will not disiplay the startup screen. When they run, nothing happens. Checking Task Manager shows the program is indeed running. I’ve wiped the computer clean, checked network connections, disabled firewalls and virus scanners, made sure this particular computer has the same setup as all the others that are running, but no joy.
  2. Again this is an intermitent problem with a payment receipt procedure that has been running flawslessly for years. Nothing that I know of has changed. Now, randomly, after entering some rows, endorsing checks, printing a deposit report showing the entered transactions, the transactions just disappear. The RIN number (Record ID)m which is an Identity, has a gap for those numbers as do the Receipt Number which is a Sequence. Using MSSQL 2016 and MSSQL Clarion Driver and CW10. The transactions are ultimately entered into the database by a Stored Procedure that does not use a Transaction. It is a single atomic Insert statement. If there is an error in the Stored Procedure it retuns that to the calling Clarion program and displays an errors message. The users says they have not seen any error messages pop up during data entry. This does not happen on every entry. Just a andom consequitive grouop of rows in the middle of the data entry.

Any thoughts or suggestions are welcome. If you need more info, let me know.

Thank you.

First suggestion would be to modify the stored proc and add a write to a log file at the start and end of the proc. And at other places if it’s multi-step.

I’d setup a log file to log when pertinent code like milestones gets called.

Do you know if the code for the splash screen has been called or has the app got stuck in thread 1 loading global classes and file managers?

Do you know if the code for the splash screen has been called or has the app got stuck in thread 1 loading global classes and file managers?

I put a call to Message as the very first statement on the main window and it never displayed.

That gave me an idea to write an entry to a log file that is in a different database in hopes of being able to actually see it. With a log file in the same database, the rows in question never showed up in it. I’ve got an Insert,Update,Delete trigger on this table.

The first problem just sounds like your app is loading off-screen somewhere. Arnor has a template solution to fix that, or you could just try…

SETPOSITION(0,0,0) ! Check the syntax it has been years since I did this

! The idea is to move the window into the visible screen area.

…after opening your first procedure.

The second problem sounds like a SQL rollback, because you say several records in sequence go missing? You could have a look at the SQL logs in SS Management Studio or maybe check to see if there are any blocks in play that might prevent a process from finishing?

If its graphics related which is hiding the splash window, its possible that could also hide the message.

That would suggest a transaction and Dirty Write, but the stored procedure is not using Begin Transaction its using Begin Atomic. However thats not to say a transaction couldnt be in play for some other reason, like something external to the program.

That’s exactly what it sounds like although how it’s happening is the thing. Is there something you’re doing prior that in some way initiates a transaction?
Perhaps initiated elsewhere and somehow still open, then encounters an issue that triggers an unexpected rollback?
Just guessing here

Do your customers run TeamViewer - I’ve had issues where the same program behaves as you describe when TeamViewer is running.
Just a thought…

I will have to check. Thank you for the suggestion.

Good question. I control the app. So I have made the window/process it single threaded, ie. if the user tries to open the same window, it just calls the previous window that is already open. But it is difficult to know what else they have open. The only time I start a transaction is if something is about to be written. The other kicker is that this procedure has run for years without every dropping a row. This month, it has happened twice.

That is one of the first things I checked. There is an entry in the ini file for the main window. Usually if that is the problem, the x & y are coordiantes are very large or very small. But I changed them to 0,0 anyway and still no joy.

I misspoke in my original message. There is no splash window. There is just a main window with a tool bar. Normally it comes up so fast there is no time a splash window. I put a Message as the first call in ThisWindow.Init and it never displays. But on the computers that it is working, it shows up just fine.

Are the users experienced with the system? Just wondering if they may be newies doing something “crazy”. I know, I know, clutching at straws here but worth checking.
Also are the two issues separate and distinct from each other? IOW different boxes/connections.
Thinking it’s caused by user, machine or both