Use of variable stores and or groups seems to be causing a crash - keyboard

I tried implementing the variable store function to switch groups in a keyboard layout I developed, only for them to fail to implement in real use. To give you an idea, I'll write the gist of it in pseudocode
begin group(main)
group(main)
store(mode) 'off'
if(mode='off') > use(off)
if(mode='on') > use(on)
group(on) using keys
'+ {key} > set(mode='off')
group(off) using keys
{key} > set(mode='on')
Now When I implemented this on my computer after I reset said computer, I found it wouldn't actually use the different group when I actually installed the keyboard. Stranger yet, when I used the save function to save the variable stores, It cause the keyboard and whatever app I was using it in, to crash.
I did a bit of looking and found that my antivirus program (MCafee livesafe) was quarantining the crashpad_handler.exe files in the keyman installation folders. So after getting them back in my system and repairing the installation, I thought that would solve the problem, but it didn't.
Anybody else experiencing this? What did you do to solve it? For reference, everything was working fine before I reset my PC.

Related

ADB debugging in Android Studio - some basic issues

Ok, I've squeaked by not needing to use ADB in the Studio, since back
in the 'beta' days of AS. (Just lucky, I guess.) But now, I need to
debug a crashing app.
I've gotten this far:
Learned how to put adb.exe on my Window's 'PATH'
(so that it's invokable from cmd-window):
My path-entry was: C:\Users\David\AppData\Local\Android\sdk\platform-tools
Am assuming that 'logcat' lives on Android device (I was incorrectly guessing it lives on the development machine). I'm assuming this, because when I dis-connect
the USB-cable and enter 'adb logcat' is says waiting for device.
Ok, now my (next) issue: When I fire up the app-being-developed, I'm getting
"Unfortunately has stopped"...which I'm assuming is an app-crash.
And, while I'm looking at 'logcat', I can see a stack-trace flow by. But
as I try to scroll-back to read it, logcat keeps dribbling in more data.
So, how do I tell it to shutup...so that I can look at a static copy
of logcat and see what has happened (without more data dribbling in)?
[If there is other beginner related info, beyond this question, feel free to
to add that info...I'm clearly in need of basic 'adb-related' enlightenment.]
TIA.
Cheers...

How do I simulate keyboard events in Chromedriver/Selenium for Node.js?

I'm trying to automate uploading an image file to a server to which I don't have a better form of access (FTP, etc.). I'm using Node.js with Selenium and Chromedriver, and everything is going well until I need to simulate special keys. I've researched a bit, and have found nothing so far. Mac specific answers are ok for this.
I tried this from another answer somewhere, but it's not working for me:
driver.findElement(webdriver.By.name(uploadName))
.click()
.sendKeys(Keys.COMMAND + Keys.SHIFT + 'g')
.sendKeys(imgPath)
.sendKeys(Keys.RETURN);
It fails out because Keys is undefined, but I haven't run across any other ways to get at the commands.
After further research, it seems that this is the wrong way to do this. Selenium and Chromedriver don't really support OS level interaction, but there is an easier way.
driver.findElement(webdriver.By.name(uploadName)).sendKeys(imgPath);
This will target uploadName and then give it the file path passed into sendKeys. This bypasses the messy OS file dialogs.

Cannot write to Event Log from a COM library on Windows Server 2012 AZURE

I created the Event Source using powershell... So the source exists I can see it in event viewer and inside the registry
I've tried what's suggested here in this KB and nothing I do seems to have any affect
http://support.microsoft.com/kb/2028427/en-us
Here's a list of well known SIDS that I just randomly tried a bunch of and still there is no affect and I keep getting the same exception
InvalidOperationException : Cannot open log for source 'XXXXXXXX.Services COM Library"'. You may not have write access.
http://support.microsoft.com/kb/243330/en-us
Here's my code for writing to the source
string sSource;
string sLog = "Application";
var eventLog = new EventLog(sLog);
sSource = "XXXXXXXX.Services COM Library";
eventLog.Source = sSource;
eventLog.WriteEntry(sEvent, entryType);
I issued the following command against both "system" and "application" to get the value for CustomSD
wevtutil gl system > C:\temp\out.txt
I've tried both of those as the root for the CustomSD key and then I tried appending a few different variations to it to make it work
I tried appending the world
(A;;0x3;;;S-1-1-0)
And that didn't work
And then also the SIDS that were indicated for IUSR in that list of common SIDS (http://msdn.microsoft.com/en-us/library/cc980032.aspx).....
this is coming from a COM library that's been registered with REGASM.... I was able to give the COM library access to a directory to write files by giving it IUSR permissions but I can't get it to write to an event source to save my life...
Besides just continuing down the path of trying different other random ACL combinations I'm sort of at a loss of what to try next...
Also if anyone has any suggestions of a better way to debug this or (for example) see the security exception somewhere coming from the asp.net application that would also be helpful.... Changing that REGKEY, rebooting, and then trying to write to the event source all just seem all very arbitrary so it'd be nice to have something with more substance I can look at for debugging this... I used Process Monitor to watch w3wp.exe reach out to the registry and it's reading the KEY that's relevant to the source I'm writing to
HKLM\System\CurrentControlSet\Services\EventLog\Application\XXXXXXXX.Services COM Library
But it's not reading from the CustomSD key so I'm not sure if that's an indicator of anything...

Perl: libapt-pkg-perl AptPkg::Cache->new strange behaviour under precise

I have a very strange problem with the constructor of AptPkg::Cache object in the precise package of libapt-pkg-perl (v. 0.1.25).
The perl script is designed to download a debian package for three different architectures (i386, armel, armhf). For each architecture I do the following:
Configure AptPkg::Config '$_config' with the right parameters and package-lists for the desired architecture.
Create the cache object with AptPkg::Cache->new .
Call the method AptPkg::Cache->policy to create the AptPkg::Policy object.
Call the method AptPkg::Policy->candidate("program-name") .
Download the package for the selected architecture.
This works very well with Ubuntu Lucid, but with Ubuntu Precise I can only download the package for the first architecture defined. For the other two architectures there will be no installation candidate (method AptPkg::Policy->candidate("Package-Name") doesn't return an object).
I tried to build a workaround and I found one solution how the script works for all three architectures, without problems, in precise:
If I create the cache object (with AptPkg::Cache->new) twice in a row it works and the script downloads the debian package for all three architectures:
my $cache = AptPkg::Cache->new;
$cache = AptPkg::Cache->new;
I'm sure that the problem has something to do with the method AptPkg::Cache->new because I checked everything else, what could cause the problem, twice. All config-variables are set correctly and I even get a different Hash for AptPkg::Cache->new for each architecture, but it seems that I am overlooking something important.
I'm not very familiar with perl, so I am asking you guys if someone can explain why the script works with the workaround but not without it. Further it looks quite strange if you have the same line of code twice in your script.
Maybe you hit this bug - https://bugs.launchpad.net/ubuntu/+source/libapt-pkg-perl/+bug/994509
There is a script there to test if you're affected. If it's something else consider submitting a bug report.
edit: Just saw this is 11 months old :/

wx.TextDropTarget not working in Linux

I have a desktop application developed with wxPython. The applications runs fine under Windows and OSX (same codebase, no platform specific code). Everything works on Linux except drag and drop. I can drag just fine, but DoDragDrop always returns wx.DragCancel. I can however, drag from my application or to another app/desktop which excepts text and DoDragDrop returns wx.DragCopy.
It seems to me like the DropTargets aren't getting called. I've added debug statements to OnData, etc and they are never activated.
Has anyone seen this and know of a workaround?
Found a known issue in wxWidgets that was considered fixed, http://trac.wxwidgets.org/ticket/2763, I am able to recreate this issue on linux. I reopened the ticket.
In the meantime you can swap your StaticBoxSizers or BoxSizers. or...
This works....
parent = DropTargetCtrn.GetParent()
boxes = [x for x in parent.GetChildren() if type(x)==wx.StaticBox]
tmpParent = wx.Panel(parent)
for box in boxes:
box.Reparent(tmpParent)
box.Reparent(parent)
parent.Destroy()
This solution seems to lower the StaticBox in the window hierarchy so it don't interfere with drop events. Note, box.Lower() does not work.

Resources