android.os.ServiceSpecificException: GPIO2_IO02 is already in use (code 16) - gpio

I am working on android things(Pico i.MX7D I/O).I got android.os.ServiceSpecificException: GPIO2_IO02 is already in use (code 16) exception,What it means by this? Please help me.
My sample program is cloned from
https://github.com/androidthings/sample-button.

This means another app is running in the background and is currently accessing this pin. This may happen if one app is not fully stopped before a new one is opened.
You can see all your installed apps by running: adb shell pm list packages -3
You can force stop a program by running adb shell am force-stop <package name>
Uninstalling or force stopping the rogue app should allow you to properly get control of it.
Edit: As a comment pointed out, I did not include the command to do uninstalling. adb uninstall <package-name>

Related

Megasync does not autostart

I installed the ubuntu(14.04 VirtualBox) version of megasync along with the nautilus extension. I typed "megasync" in my console, logged into my account, enabled autostart. But upon closing the console megasync just closes and when I restart the OS megasync does not start itself up.
Megasync is included in the startup options with command "megasync".
Note, I just installed Ubuntu and have no previous experience with Linux so this might be just a misunderstanding from my side, but I am helpless right now.
I also had problems with autostart. In my case it was a prolem with permissions (megasync was not marked as executale), but I don't think yours is the same.
You can give it a try: sudo chmod +x /usr/bin/megasync
Or just run a script I've created to run multiple instances.
1) Log out from the session
2) Download and run my script MEGA-Instances and follow the guide.

Cloud9 on Raspberry Pi, Unable to save files

I'm trying to get the cloud9 local server working on my Raspberry Pi(512mb model B, running raspbian).
I followed this installation guide:
http://www.slickstreamer.info/2013/02/how-to-install-cloud-9-on-raspberry-pi.html
After this installation everything appeared to be working properly, I can start the server with the following command:
~/cloud9/bin/cloud9.sh -l 0.0.0.0 -w ~/Documents/www/workspace/
when I start the server all the files in the workspace are displayed properly and I can view, duplicate, delete, and create files remotely no problem. But when I edit an existing file and try to save it remotely a little spinning wheel pops up on the tab of the file I'm saving and it continues to spin endlessly.
When I start the server a warning pops up saying: 'path.existsSync is now called fs.existsSync.' I'm not sure if that is relevant or not.
I found another thread somewhere saying that I should go through cloud9/configs/default.js and replace any instance of localhost with 0.0.0.0. I tried that, but it didn't fix my problem.
Does anyone have any suggestions about how to get cloud9 saving files properly?
Thanks in advance for your help.
There were several complains about IDE file saving hangs on cloud9 support. At the bottom of the page there is a solution you can try.
I fully removed cloud9 and node(followed these directions to remove node: Uninstall Node.JS using Linux command line?), and then did a clean install following these directions: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=63&t=30265. In addition to those commands I also had to run the following:
sudo npm install formidable
sudo npm install gnu-tools
sudo npm install xmldom
after that I was able to start the cloud9 server without issue, and now I'm able to save files.
thanks for trying to help

Cygwin error: "-bash: fork: retry: Resource temporarily unavailable"

I recently reinstalled Cygwin on my computer in order to get access to several command line elements that I was missing. I have never had previous difficulty with Cygwin, but after this reinstallation, an error message continues to appear after (almost) each command entered. For instance:
-bash-4.1$ wc m1.txt
3 [main] bash 2216 child_info_fork::abort: data segment start: parent(0x26D000) != child(0x38D000)
-bash: fork: retry: Resource temporarily unavailable
2013930 4027950 74968256 m1.txt
Generally, the command still runs (as seen above), but not always. Occasionally, the 'error' message occurs several times in a row (the initial number "3" will then change to a "4" or "2", notably if I start a second Cygwin window.
Also, as soon as I start up Cygwin, I get the following message before the prompt:
3 [main] bash 6140 child_info_fork::abort: data segment start: parent(0x26D000) != child(0x36D000)
-bash: fork: retry: Resource temporarily unavailable
-bash: fork: Resource temporarily unavailable
-bash-4.1$
At the moment, I am debating whether to uninstall/reinstall Cygwin again or just live with the error messages, but I was curious if there might be an issue that I am unaware of.
(assuming Cygwin is installed at C:\Cygwin):
Open Task Manager and close any processes that look to be Cygwin related.
Open C:\Cygwin\bin in Windows Explorer
Verify that dash.exe, ash.exe, rebase.exe, and rebaseall exist in this folder
If any of them are missing, re-run Cygwin setup and select the dash, ash, and rebase packages
right-click your C:\Cygwin folder, uncheck Read-only (if its checked), and press OK.
When an error about not being able to switch some files comes up, select "Ignore All". Wait for this process to complete.
Browse to C:\Cygwin\bin in Windows Explorer
Right click dash.exe and click "Run as Administrator". A command Prompt should appear with nothing but a $
Type /usr/bin/rebaseall -v, hit enter, and wait for the process to complete.
If you get errors about Cygwin processes running, try Step 1 again. If that still doesn't work, Restart your computer into safe mode and try these steps again.
A commenter noted that, depending on your settings, you may have to type cd /usr/bin && ./rebaseall -v instead.
Try opening Cygwin again.
This process worked for me. I hope it works for you guys too.
Source: http://cygwin.wikia.com/wiki/Rebaseall
I would like to add the following to the above answers, as it is what I had to do after reinstalling Cygwin:
Navigate to the "/usr/bin" directory (usually, C:\cygwin\bin) and right click, Run as Administrator the file: dash.exe
Then, at the $ prompt type the following, hitting enter after each line:
cd /usr/bin/
/usr/bin/peflags * -d 1
/usr/bin/rebaseall -v
What it does is, it marks the dll's as "rebase-able," and then rebases them. You have to have peflags.exe in addition to the above files (in previous answers). You may have to restart windows after doing this and you will definitely need to make sure that there are no processes nor services belonging to cygwin running. (Use task manager, kill any related processes, and then under the services tab look for any service starting with CYG and stop it.)
After doing this, I was able to get cygwin to run without any errors about dll's being loaded to the wrong addresses aka fork errors, etc.
I hope that this helps others, as it was a pain to find.
SOURCE: http://www.cygwin.com/faq.html#faq.using.fixing-fork-failures
and the rebase README file.
To add on to other answers here, we ran into the same issue but could not run the rebase command from the ash or dash shell. However, when launching the command from the Windows cmd shell, the following worked.
cmd /c "C:\cygwin64\bin\ash.exe /usr/rebaseall -v"
-v is to get verbose output
I found another information here :
http://cygwin.com/ml/cygwin/2014-02/msg00531.html
You have to delete the database at
/etc/rebase.db* and do in a "ash" windows :
peflags * -d 1
rebaseall
It works for me on 2 servers.
I solved this problem by restarting my computer. Probably installed a driver update and kept using sleep instead of shutting down.
Experienced the same issue when loading Cygwin with cygiconv-2.dll forking and not loading successfully in the Cygwin terminal, but after turning off my AntiVirus (it was specifically Ad-aware), the issue resolved, and Cygwin worked properly.
In case you are using babun's Cygwin, after rebaseall, try launching Cygwin by executing .babun\cygwin\cygwin.bat in a Windows command prompt or Windows explorer.
This works for me (while launching babun's default console - mintty results in fork error).
I had the error on win10 and i was trying to rebase to c: before install.
then i saw that the installer was installing it instead to c:/Users/myuser
so i was coping all files from c:/Users/myuser to c:.badun
and then restart plus open badun.bat
not shure if this was wise its now duplicated XD... but then it worked again.
Rebaseing didn't help in my case. In addition to what other people suggested, I noticed that reducing the length of PATH environment variable fixed the issue for me (and for other people as well as can be seen from this answer).
This issue is intermittent in nature & I found this issue when there is network is too slow to connect to remote machine on AWS.... I have Shell script that runs through Gitbash shell & it connects to AWS EC2 instance with ssh..... Most of the time, it ran correctly but 2 out 100 times it get into this issue bash: fork: retry: Resource temporarily unavailable .... Killing the MSYS2 terminal from task manager helps to overcome with this issue....
Negative side is you need to run the scripts from the beginning...
I had the same issue on Windows 10 and the mobaxterm app (which uses cygwin) and I tried all of answers listed here however for me, the solution was to simply delete the "CryptoPro CSP" application.
I started facing this problem after upgrading to windows 10. As of now I do not see that any of the above method working.
What I am noticing is that if you start cygwin with admin right (right click and say "run as admin") then it works fine.
Or you open cmd as administrator and then launch cygwin from there, then also it runs fine.
Just reinstall cygwin and select TCL and activate EXPECT

unable to symbolicate crash log from a MonoTouch program

I have a MonoTouch app that I built in debug and uploaded to the device. I ran the app in the debugger and the app died without the debugger catching anything. I have a .crash log for it. I ran:
symbolicatecrash myapp.crash myapp.dSYM
It got symbol information for Apple stuff like CFRunLoopRunInMode and UIApplication, but not for anything in my program.
Is there a different way I need to symbolicate MonoTouch crash logs?
We had this same problem and we created a work around...
When we ran symbolicatecrash with the -v parameter (verbose) we saw it was complaining about not having a binary file inside the dSYM package. So we manually copied the binary file from within the app package into the dSYM package and that worked. Something like [MyProject].app/[MyProject] to [MyProject].app.dSYM/[MyProject].
We then created this as a Custom Command to run After Build:
cp ${TargetDir}/${ProjectName}.app/[MyProject] ${TargetDir}/${ProjectName}.app.dSYM/${ProjectName}
Note the [MyProject] portion as the binary created in the app package is a different name than the project name for us for some reason.
Now all builds symbolicate fine from terminal and within Xcode organizer. I hope there's a less band-aid way, but we were in a time crunch and this worked.
I had this problem and posted a patched version of symbolicatecrash to github. Replace /usr/local/bin/symbolicatecrash with this and you should be back in business.
tholsens answer is correct but when using Xcode >=4.3 (which is installed as an application) you need to run xcode-select first:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Otherwise you'll get strange errors like 'does not contain slice armv6', etc.

NSIS script help-install without killing explorer

When I tried to un-install and install an executable foo.exe, Im geting the below error
Error opening file for writing
click abort to stop the installation
I could find that some files were failed to get deleted while un-installation.
And by using process explorer I can see that explorer.exe has still reference to some dlls of foo.exe even after unregistering them.
and killing the explorer.exe and re-start it again while un-installation solves the issue. (thru NSIS installation script).
or by setting rebook ok flag in script and ask user to re-start his machine before installing foo.exe again.
I don't think its a good solution to ask user to reboot his machine after un-installation .
Can anyone help me on how can I make sure that my installation goes fine instead of restarting explorer.exe
For registered shell extensions there is really no clean way to delete the dll's other than forcing a reboot (Or log-off if they are registered in HKCU\Software\Classes)
If that is not good enough you basically have two options:
Rename the .dll and delete it later
<HACKALERT>Inject a thread that calls CoFreeUnusedLibraries() into every process that has your dll loaded</HACKALERT>
Just killing and restarting explorer is not really an option since you don't know if some other program is also using your shell extension.

Resources