Sample executable hanging after fresh Windows OMNeT++ Installation - omnet++

I was trying to use OMNeT++ earlier today but I was unable to get any simulation to run. I tried numerous model simulations but they began hanging at the same place during initialization. I deleted and re-installed OMNeT++, but the problem persists. So even after a fresh install of OMNeT++ v5.5.1 on a Windows 10 v1903 machine, I am unable to run any simulation. This is what I saw when I ran the Aloha sample simulation executable directly after following all the OMNeT++ installation steps:
The Qtenv simulation window starts up but it's completely blank, and I can't actually focus on it, which leads me to believe there's something up with Qt. The program hangs indefinitely at this point. OMNeT++ was configured using the default values found in configure.user.
Any suggestions?
EDIT:
This is the last console output I receive after running QT_LOGGING_RULES="*.debug=true" ./aloha.
This is the last console output I receive after running QT_DEBUG_PLUGINS=1 ./aloha.

Did you connect additional monitor to your computer? Sometimes Windows remember position of an application on non-existed screen. Try to change your screen properties or connect second screen and look for Qtenv window of Aloha simulation.
Besides the above, delete .qtenvrc from samples/aloha.

Related

TwinCAT3 AdsWarning 4115: system clock setup fail

I've got problem with TwinCAT3 (Win10 64bit) when I try to active TC3.
Error message is :
Severity Code Description Project File Line Suppression State Error
19-Jan-19 11:42:34 AM 545 ms | 'TwinCAT System' (10000): Sending ams
command >> Init4\RTime: Start Interrupt: Ticker started >> AdsWarning:
4115 (0x1013, RTIME: system clock setup fails. Hint: On Windows8
system and above execute win8settick.bat in TwinCAT\3.1\System as
administrator and reboot.) << failed!
I also try to run "win8settick.bat" and reboot TC but it doesn't work!
Is there any recommend to solve this ? Thanks a lot!
I have had the problem few times. In all those situations, the BIOS settings have been OK. Executing the .bat file didn't help, until I ran it as an administrator and rebooted. Few times I have had to do it couple of times before it started working.
So try this
Open start menu and search for "Command prompt"
Right click it and select run as administrator
Navigate to "C:\TwinCAT\3.1\System" by writing "cd C:\TwinCAT\3.1\System"
Execute .bat by writing "win8settick.bat"
Reboot - Repeat if not working
For me, this has always fixed the problem. If you have incorrect BIOS settings, you would get different error that states something about virtualization (as far as I know).
You need to adjust your BIOS-settings according to:
http://www.contactandcoil.com/twincat-3-tutorial/quick-start/
(read chapter BIOS settings).
I suspect you may have Hyper-V enabled. Because of the way that 64-bit TwinCAT interacts with the processor (using Intel VT-x), it doesn't play well when hypervisors are running at the same time. Most hypervisors, like VMware, stop running when you close their window. However, Hyper-V (if enabled) is always running in the background so it must be disabled before using TwinCAT.
To Enable or Disable Hyper-V:
Right click on the Windows button and select ‘Apps and Features’.
Select Programs and Features on the right under related settings.
Select Turn Windows Features on or off.
Check or Uncheck Hyper-V and click OK.
source
In my case, installing TwinCAT 2 on top of an existing TwinCAT 3 installation was the problem.
According to Beckhoff, you need to "deactivate" TwinCAT 3 via "SwitchRuntime.exe" before installing TwinCAT 2, if installed in this order. In case of installing TwinCAT 3 on top of TwinCAT 2, you don't need this step.
https://infosys.beckhoff.com/english.php?content=../content/1033/tc3_installation/179471755.html&id=
If forgot this, which probably destroyed parts of my TwinCAT 3 installation in the background.
Even tough I set the installation directory to a new folder "C:\TwinCAT\TwinCAT_2" and not the default "C:\TwinCAT".
The installation process locked fine at first, only after trying to set a project into RUN while having TwinCAT 3 active as runtime, I got the above mentioned "AdsWarning: 4115".
Running "win8settick.bat" as admin and rebooting did not help, neither via explorer or command line.
Only re-installing TwinCAT3 did the trick for me.
What worked for me was to disable the Virtual machine platform in Windows Features.
In addition to the other answers, you'll get this error if you haven't setup the real-time cores to match the computer you're activating to:
I got the same issues. But I didn't try any of the above methods.
bcz I am scared about warning 'BitLocker trigger' from a user above!
Then I changed the real-time system settings:
error :
Severity Code Description Project File Line Suppression State
Error 27/08/2022 16:40:58 279 ms | 'TwinCAT System' (10000): Sending ams command >> Init4\RTime: Start Interrupt: Ticker started >> AdsError: 4115 (0x1013, RTIME: system clock setup fails.
Hint: On Windows8 system and above execute win8settick.bat in TwinCAT\3.1\System as administrator and reboot.) << failed!
settings: shared core 80%
new real-time setting: Isolated core 100 %
No error:
I didn't know the reason behind this!

Getting started with Omnet++, Veins, and Sumo

I am having trouble getting Omnet++, Veins, and Sumo to work together. I am progressing through this tutorial to get started. I am currently on the Final Step and I am getting some error that I was hoping someone had some insight on.
I am installing Omnet++, Veins, and Sumo on a virtual machine in Centos 7. I have been through the installation of these three programs twice and I believe I have correctly completed all the steps, although I am pretty new to linux and could have made a mistake.
Here is a link to a screen shot from Omnet when I run the example code from the Final Step:
The library it failed to load is libosg.so.130. This looks like an Open Scene Graph library. I was getting a very similar error yesterday having to do with a osgEarth library. I was able to get around this by disabling selinux, which was blocking some shared libraries from being accessed. I tried the same solution with libosg with no avail. Is there a different antivirus/firewall on Centos that I should turn off? Or is there another idea I should look into?
Any help would be appreciated! Thanks!
EDIT, SOLUTION: I fixed the error by adding the folder /usr/local/lib64 to my path by editing the bashrc with gedit ~/.bashrc and adding "export PATH=$HOME/omnetpp-5.1.1/bin:$PATH:/path_to_folder" to the bottom of the document.

tkenv gui works, then doesn't under windows 7

OMNet++ v4.6. Windows 7 Professional.
I have been using the supplied omnetpp.cmd from \omnetpp-4.6\bin for over a month with success, after a few failures (null pointers in OMNet) the OMNeT Eclipse editor will start, but when running a simulation the Tkenv window will no longer appear.
I get the taskbar icon, but no window.
When I run OMNet++ using mingwenv.cmd which gives the bash shell, omnetpp works as expected.
I have rebuilt the OMNet++ 4.6 environment from the .zip file again with no improvement.
I deleted the .tklenvrc file for my simulation (as suggested in the "OMNET++ Tkenv/GUI doesn't appear anymore" question) but this has no effect. One could say, "Just use the bash shell" but I'd like to keep at a Windows level. Any ideas?
I would like to point out that the recommended way of running OMNeT++ simulations is to run them from mingwenv.
If you really have to run them from command prompt you must ensure that your path contains:
omnetpp_root/bin;omnetpp_root/tools/win32/usr/bin;omnetpp_root/tools/win32/mingw32/bin
Also be aware that <omnetpp_root>/bin/omnetpp.cmd is used to start the IDE while the simulations should be started from the mingwenv.cmd bash prompt. These two things are totally unrelated (i.e. the IDE and the simulations running in Tkenv)

phantomjs exit() doesn't terminate the process

I've been using phantom.js on Windows 7 for quite some time now (I think v1.4.0 was the first version I used) and everything was always fine. But for some reason the process isn't properly terminated any longer when calling phantom.exit() and I absolutely don't know why.
The problem started to occur in v1.7.0, from one day to another. Everything once worked fine in 1.7.0 but then it did no more. Even after upgrading to 1.8.0 and now 1.9.0 it still doesnt work. The console just hangs. I can't type anything, phantomjs.exe is still listed in the list of processes in the taskmanager, even CTRL+C doesn't do anything. The whole thing is just frozen.
The underscore in the console blinks as if it expected more input but I can't type anything. The only chance I have is to close the cmd window using the [X] button which is totally dumb for automated testing.
I use the precompiled binaries I downloaded from http://phantomjs.org/ and as I said: it stopped working from one day to another. I even reinstalled it a few times, even to different folders but the process just doesn't get terminated any longer. Anyone who has an idea what the problem could be?
This is a known issue with the Nvidia drivers when you have two cards.
To resolve this issue you need to select "High-performance NVidia processor" in the NVidia control panel (NVidia Control Panel > Manage 3D Settings > Global Settings).
Read more here: https://github.com/ariya/phantomjs/issues/10845

Couldn't register with the bootstrap Server

I just changed some code in my program and got this error:
Couldn't register com.yourcompany.XXX with the bootstrap server.
Error: unknown error code.
This generally means that another instance of this process was already
running or is hung in the debugger.Program received signal:
“SIGABRT”.
I tried restoring my program to a version that worked, rebooted, restarted, empty caches and rebuild on versions that even worked before.
Any help would be appreciated.
I was able to recover from this by unplugging the iPad, powering it down and back up, clearing all XCode caches and targets, and doing a clean build.
I'm running XCode 3.5.4 and iOS 4.2.1
UPDATE: Same problem running Xcode 4.3 and iOS5 - just power-cycle the device.
You might wish to kill all Simulator processes, that can cause this error as well.
Here's a one-liner to kill 'em all:
kill -9 `ps ax | grep Simulator | grep -v grep | awk '{print $1}'`
Or more concise, like #brianegge mentions as a comment:
killall -9 Simulator
My solution was to restart the ipad, wait a while and try again.
If you get the hang when using the simulator, look at this thread: Strange Error When Testing Simulator
You may find this test of interest, as it will tell you ASAP if the only solution is to reboot now or not:
Open Terminal and run this command: ps -Ael | grep Z. If you get two entries, one "(clang)" and the other your app or company name, you're hosed - reboot.
If you are a developer, enter a short bug and tell Apple how absolutely annoying having to reboot is, and mention they can dup this bug to "rdar://10401934" .
I received the same problem, running an app on an iPhone from Xcode. The message that I was getting was the same as above:
Couldn't register xxx.com.company.appname with
the bootstrap server. This generally
means that another instance of this
process was already running or is hung
in the debugger.
I tried many things to fix the problem, in this order, all which failed:
force quitting the app on the iPhone
force quitting and then deleting the app the iPhone
opening and closing the project
cleaning the project
restarting XCode
Eventually, I rebooted the iPhone and the problem went away, which leads me to think that the source of the problem is a hung process that Xcode cannot or will not kill. If I am able to reproduce exactly what I was doing during my debugging session to get this strange state I'll add another note here.
I opened a bug report with Apple: https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/19/wo/WBbbbyopNFW8FFUuNSbk0w/10.66
Please let me know if you can't access it.
Summary: XCode debugger is not releasing bootstrap server port
Steps to Reproduce:
While debugging an iPhone iOS5 app in the simulator in Xcode 4.2 Build 4D5163b on Lion 10.7.2, a crash can sometimes result in being unable to start the bugger. Instead, Xcode produces this error:
Couldn't register com.MyApp.MyApp with the bootstrap server.
Error: unknown error code. This generally means that another instance
of this process was already running or is hung in the debugger.Program
received signal: “SIGABRT”.
Expected Results:
Should be able to start debugger after a crash.
Actual Results:
Cannot start debugger. The only way I've discovered to make the simulator work again is to restart Mac OS.
Regression:
Notes:
Lots of people are having this problem:
iPhone - strange error when testing on simulator
Couldn't register with the bootstrap Server
Bootstrap Server Error in Xcode IPHONE
https://discussions.apple.com/message/10416765?messageID=10416765
Quitting XCode and the Simulator (& ensuring ps -Al | egrep "Xcode|Simulator" returns nothing) does not help the problem.
Running "launchtl bslist | grep MyApp" reveals that com.MyApp is still registered with the bootstrap server:
$ launchctl bslist | grep MyApp
A com.MyApp.MyApp.UIKit.migserver
A com.MyApp.MyApp
I wrote some code to find the port and invalidate it, but this too fails:
NSMachBootstrapServer *bsserver = [NSMachBootstrapServer sharedInstance];
NSMachPort *port = (NSMachPort *)[bsserver portForName:#"com.MyApp.MyApp"];
[port removeFromRunLoop:[NSRunLoop currentRunLoop] forMode:<#(NSString *)#>
NSLog(#"port = %#",port);
NSLog(#"port.isValid=%d",[port isValid]);
[port invalidate];
NSLog(#"port.isValid=%d",[port isValid]);
I got the same issue with Xcode 4. The solution was to change the scheme.
Run set to Debug,
Test set to Debug,
Profile set to Release,
Analyze set to Debug,
Archive set to Release
Restarting my computer solved my problem. This error happened when I connected my new iPod Touch to my mac and ran my project in simulator at the same time.
The easiest way its to change the target name,
Remembert to change it back next day after a restart.
To sum it all up.
Sometimes kill -9 (the process id) helps.
Sometimes (as stated) launchctl list | grep UIKitApplication | grep "(your app name/identifier)" | awk '{print $3}' | xargs launchctl remove works.
But if its a "zombie" process, only a restart will solve your problem.
A temporary solution is to just change the identifier (IOS Application Target, Summary Tab) to something else (like "com.mycompany1.myapp" from "com.mycompany.myapp") but remember to change it back after the reboot and before you submit it.
(of course this will create another app on the simulator, but I guess that's the least of your problems....)
Unfortunately, there is no "easy way to greatness"... ;-)
Here is how I think I solved this 'strange' error:
Couldn't register com.yourcompany.XXX with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.Program received signal: “SIGABRT”.
(1) Clean all the caches, targets, headers on both Xcode and the simulator.
(2) Restart your iPhone when it is not connected to the computer and make sure no versions of the program that gave you problems are left on your iPhone.
(3) Restore any previous version of your program that you know absolutely worked at one point in time.
(4) Shut down your computer/laptop. (I needed to do it 4 times.) Makes no sense to me.
(5) Restart your machine and try running a different program to see if you still get the error. If you do not get the error on another program.
(6) Compile the program that gave you the error:(1) First with an earlier version that worked. And then, the version that gave you the error. Naturally, you may have to re-add code on a step-wise basis to make sure you know what code caused the error.
This happened to me because another application was eating up the computer's resources. I quit the simulator, quit the application which was hanging my computer and restarted the simulator, and it worked then. The error means that a previously killed process couldn't reach the end of the queue, and is holding up the current one.
Lot's of good answers have been provided for fixing the problem.
I have found that I can recreate this bug by creating a breakpoint in my code so that the execution pauses. Then if I press on the Stop Button the bug will now appear when I try to run the code again. Resuming the execution before pressing the Stop Button therefore avoids this issue.
Hope this helps.
closing down xcode then starting it, and restarting my iphone solved my problem
I didn't find a better solution than mentioned above: restart the iPhone. It seems that there's a daemon that connects to the Xcode debugger not properly killed.
You can avoid this behavior ALWAYS stopping the debugging session through the "Stop" button in Xcode, and waiting for the app to exit automatically on the iPhone. I always have to reboot if I click "Start" without stopping first, or exiting with the iPhone's button, or something like that. Hope it helps
I encountered this issue myself just now while evaluating AppCode. I discovered that XCode had somehow attached itself to my application while I was attempting to attach AppCode to my application. I simply stopped the XCode debug session and it worked as expected. I hope this will help somebody.
Just rebooting the device should solve the problem. See the analogous question about the simulator: iPhone - strange error when testing on simulator
This may be caused by an instance of your app running in the background. This simplified process worked for me without even having to close xCode or shutdown my computer.
Close simulator
Stop the app from running in xCode.
Open activity monitor and search for a process running with your App NAME.
Kill this process in Activity Monitor
Rebuild your project and you should be all set
In theory Pål's command line solution should work as well. The issue definitely seems to be caused by an extra instance of the app running in the background. The app does not always seem to be getting killed properly after each test in simulator or on the device. I first noticed this when jumping between simulator and a device frequently.
As a preventive measure it is good practice to always hit the stop button in xCode after each test.
Very interesting results when trying to restart my computer. It said, and this is no joke, that 103 users where "sharing" the system. When I restarted, it back down to the usual four (I have Time Machine stuff for all of my computers going through this computer). I stopped the problem by simply setting up an app that monitors that activity, and does not allow additional users to "share" my computer without my permission. What it does is create a window every time someone wants access, and I have to press "Approve" before they can get in. This didn't work properly until I made the changes below.
I made sure it would tell me when somebody stopped sharing. Whenever Xcode has this problem, I know long before it returns the errors.
This is now useful for almost everything, but annoying during gaming of any kind.
I then wrote a script that fixed the problem by, basically, clearing the Simulator processes that might possible cause problems.
This app will be very useful to developers, so I am "polishing" it up a bit, then it is off to the App Store. When it gets to that point, I will post a link to it here (it will be free).
Okay, I've got a workaround for the hardware issue that doesn't involve rebooting the phone. I assume this will also work on the simulator but I haven't tried it.
Force Springboard to relaunch by changing the language. Settings -> General -> International -> Language.
I just changed it to Spanish, waited for Springboard to relaunch, changed it back to English, and was good to go.
This evening I got the same issue saying
"Couldn't register com.xxx.yyy with the bootstrap server. Error:
unknown error code.
This generally means that another instance of this process was already
running or is hung in the debugger.(lldb)"
and I got solved
1.Just disconnect my Device (for me its iPhone) from Xcode/ Mac machine
2.Reboot the Device (my iPhone)
3.Removed previously installed/corrupted app
4.Again connect device and started exception
It works well
Hope this will help someone there.

Resources