forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Simple keyboard ops suddenly misbehaving in Plato!? Help!

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato
View previous topic :: View next topic  
Author Message
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Wed Sep 22, 2010 3:10 pm    Post subject: Simple keyboard ops suddenly misbehaving in Plato!? Help! Reply with quote

This one has me well baffled. After a session of generating new code this morning, and getting it to build successfully first thing after lunch, I have moved into the run-and-debug phase - but I wasn't expecting Plato to come within the scope of my debugging effort Shocked I have stumbled upon a workaround but I have no idea what is causing the problem. Here's what has happened so far (currently I have the "Integrate with SDBG" option unchecked).

I started stepping through the code and noticed a bug that needed attention, so I exited the debugger and returned to Plato. I found that the Delete key did not work. I found that it worked just fine in Notepad. I rebooted.

Same thing happened again. I ran the code for a bit, found a bug, returned to Plato, and this time Copy and Paste would not work. Nor would Delete, nor would Backspace. Once again I verified that all these features worked fine in Notepad. So clearly an issue that was confined to Plato.

I thought the behaviour was as if the debugger had not exited properly, in some sense. Not sure why I did what I did next, I think it's what is termed a category error (but in this case a lucky one) ... I selected the Build option from the Plato menu, and found that all but one item was greyed out (can't remember which) - exactly as though something was still running. I moved the mouse to the next Menu item, Tools, and back again, and lo and behold, all greying out had vanished and the keyboard began to work again.

I have no idea what is going on here. Has anyone ever encountered anything like it before? Or are any of the good Silverfrost folks able to hzard a possible explanation?
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5441
Location: Salford, UK

PostPosted: Wed Sep 22, 2010 4:39 pm    Post subject: Reply with quote

One possibility is that the application that you are developing has not exited and is still running in the background.

Start up the Task Manager (right click on the Taskbar) to see if this is the case and kill it from there if necessary.
Back to top
View user's profile Send private message
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Wed Sep 22, 2010 5:21 pm    Post subject: Reply with quote

Hi Paul,

Thanks for reply. I should have tried that before my first post. I have now. Neither the app nor sdbg are still running in the background. It's quite reproducible at the moment. I close the app and I am returned to sdbg, and I close sdbg and I am returned to Plato ... and I can't edit my code. It's not a timing issue (app or sdbg being "slow" to finish what they're doing, in some sense), because I can wait for ages without getting editability back - but as soon as I use the mouse to pull down Build-Options-Build on the Plato menu, all is immediately good once more.

Daft as it sounds, I was worried that it might be a side-effect of the new code I have been working on, which is trying to implement something apparently tricky if not actually impossible (see post in support subforum about arrays of pointers). The code runs without error but doesn't do what it is supposed to, and I could see how it might have been wreaking silent havoc within Plato's memory. I tried closing the project, and closing Plato, and opening a different tried-and-tested project, and the issue was still there. I even tried rebooting and working on a tried-and-tested project from the off, and the issue was still there. So it seems to be a new non-volatile feature of Plato at the moment, which I have by serendipity already discovered a workaround for.
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5441
Location: Salford, UK

PostPosted: Wed Sep 22, 2010 10:47 pm    Post subject: Reply with quote

Plato can sometimes loose the keyboard input focus. If you have two files open, try activating one then the other to restore the focus.

The other thing to try (for me to understand if it is a Plato bug) is to run SDBG from a command line instead.
Back to top
View user's profile Send private message
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Thu Sep 23, 2010 11:13 am    Post subject: Reply with quote

Hi Paul,

Quite a lot of information so here's a top line summary, followed by the evidence.

Conclusion; it's a conditional Plato bug. When the Build toolbar is not visible, the Stop button cannot be programmatically "pressed" correctly.

---------

Experiment 1: if I have correctly understood what you want me to do, it doesn't work. I Step Into the code and Run it, then close it, then close SDBG, and I have the problem described. There are a number of files open in Plato, and I have tried switching back and forth between different tabs but it doesn't help. I can navigate around any file, with the arrow keys, but all other editing functionality is disabled. I have discovered that Build-Tools-Build is unnecessary. I can restore normality by pulling down the Build menu, clicking away and then pulling it down again. Second time, the greying out has been removed and I can edit again.

I have tried on a different machine and I cannot reproduce the problem.

---------

Experiment 2: an interesting experiment. The very first time I tried this, I reproduced the problem - however, I had made the mistake of not navigating to the application folder before running sdbg, so the app failed at runtime, unable to find its ini file. When I returned to Plato, same problem as before.

Because the app never got as far as posting its UI, I decided I had better repeat the experiment properly - and was unable to reproduce the original problem. I then repeatedly tried and failed, ringing several changes, to reproduce the problem. It didn't matter whether I closed the CLI or not before going back to Plato, or whether I went back to it by Alt-Tab or clicking the Plato taskbar entry; Plato invariably worked as expected.

It was as if the value of a setting somewhere had been corrected first time around. On that basis, I did briefly wonder if this experiment might have solved the original problem - but no.

---------

I tried a third experiment. I checked the Integrate with SDBG option, and again selected Build-Step Into. I had to make the Build toolbar visible first before I could proceed. I ran the app and closed it again. I had to click Stop on the Build toolbar before edit functionality was restored. Clearly this is by design. However, it made me wonder if the original problem was caused because, with the Build toolbar not being visible, some programmatic equivalent of clicking the Stop button did not work properly.

So i continued experimenting. I unchecked the Integrate with SDBG option again. The Build toolbar stayed visible. When I closed first the app and then SDBG, and returned to Plato, the Stop button was greyed out; it had already been "pressed", programatically. I was immediately able to edit. I made the Build toolbar invisible again and the original problem returned.

So it looks as though viewability of the Build toolbar could usefully be made non-negotiable.
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5441
Location: Salford, UK

PostPosted: Thu Sep 23, 2010 11:32 am    Post subject: Reply with quote

I can guess what is going wrong and will investigate.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group