Max instances of QAudioOutput? - qt

I need to develop an application which must reproduce many different sounds in parallel, each adjustable with its own volume level. Using an instance of QAudioOutput for each sound it can be done quite easily but there is a limit regarding how many instances of QAudioOutput can be allocated? I didn't find any information about this in the Qt documentation page.

Related

Which are the things to consider for running javafx standalone application 24*7*365 days

I am working on one project which is a standalone javafx application. It will run 24*7*365 days continuously.
So, i have a question in mind.
which things we need to consider for running this application smoothly and with high performance for 24*7*365?
Please guides me sir, regarding it.
Details for used things are as follows for Reference :-
Used java version :- 1.8.0_121
Available Ram :- 2GB
Allocated Memory for application :- -Xmx1524M
Hardware Configuration :- Processor - Intel Atom CPUD425# 1.80GHz x 2
OS :- 32 Bit Fedora 15
I will probably state the obvious here, but OutOfMemory errors are the main thing you should worry about. A small glitch in your code/program could make your app die fast or run extremely slow under memory pressure.
I would say that you need to enable garbage collection logs and monitor those. Also is there a way for a javafx app to actually use another instance if the current one is facing issues? There are tools for that under different apps, but not sure about javafx... I mean can you automatically shut down (and collect heap data) the current running application and automatically start a new one (so that later you can analyze what actually happened)? It might not be feasible, and if it's not, you should have enough stress tests before you actually lunch it into production.
One thing you should check first is whether your system suffers from the notorious memory problems that some Linux graphics drivers have. See for example my answer to this question here on SO:
Javafx growing memory usage when drawing image

Understanding WinDbg report to findout memory leaks in .net

I know that my application is leaking memory & I used WinDbg tool to profile. I attached W3WP process and ran following command:
!address –summary
It generated following result.
I want someone help me understand this result and guide me or provide me a link which in-turn will help me understand what needs to be done
The MSDN link explains what the different memory regions are, in terms of how to interpret this you need to record the output twice, before and after the leak to see what increases, we can guess by looking just at the largest used regions but you have one marked as <unknown>. You may need to sort the symbols out first and then run the !address command again.
Additionally you may find umdh or debugdiag may make leak finding easier for you, additionally there is an leak detection command in WinDbg !heap -l
As far as links are concerned there is a related post on useful resources
Unknown -> Memory used by .Net Objects
Free -> free area
Image ->Memory occupied by dlls.
Heap32 -> Memory occupied by native objects.(non .Net)
http://blogs.msdn.com/b/webtopics/archive/2010/04/02/address-summary-explained.aspx

How to get all running processes in Qt

I have two questions:
Is there any API in Qt for getting all the processes that are running right now?
Given the name of a process, can I check if there is such a process currently running?
Process APIs are notoriously platform-dependent. Qt provides just the bare minimum for spawning new processes with QProcess. Interacting with any processes on the system (that you didn't start) is out of its depth.
It's also beyond the reach of things like Boost.Process. Well, at least for now. Note their comment:
Boost.Process' long-term goal is to provide a portable abstraction layer over the operating system that allows the programmer to manage any running process, not only those spawned by it. Due to the complexity in offering such an interface, the library currently focuses on child process management alone.
I'm unaware of any good C++ library for cross-platform arbitrary process listing and management. You kind of have to just pick the platforms you want to support and call their APIs. (Or call out to an external utility of some kind that will give you back the info you need.)

Control System For Sensor Networks

I'm making a distributed sensor network. The basic architecture of my network is to have several slave nodes (up to about 10) reporting back to a master node on a regular basis.
I'm looking for a software framework that I can use for this, so far I have thought of
corba
pubsubhubub
xmtp
making my own
I have some basic requirements (like basic security, fault awareness)
Anyone have any suggestions?
In specific answer to your question, TinyOS provides a lot of what you'll need.
There's quite a large body of academic work on getting these up and running, especially combining agent-based infrastructures with sensor networks -- take a look on Google Scholar for example.
There are also some very good links on Wikipedia.
Are you specifically interested in an OS to run on your sensors, or something at higher level that plugs into some sensor infra you already have? Are you intending to build your own kit, or work on something that already exists (e.g. BTNode)?
You can also use RL-ARM or FreeRTOS if you wanted to use micro controllers for your project. also in the network layer you can use lwip.
there are many other libraries both free and open source in case if you want to use ARM based micro controllers.

Debugging ASP.Net shared pool techniques

I work for a hosting company, providing ASP.Net 3.5 hosting. Honestly, we usually provide quite good uptime and velocity. However, we are having problems with one of our shared pools. As usual, we try to maximize the number of webs that can run into one pool.
Lately we are suffering continuous hangs. The process doesn't crash, but starts to show OutOfMemoryExceptions or stops processing requests. We think this is responsability of one of the applications (it would be great to know which one).
I have some memory dumps that I have processed with WinDbg. I've run f.e:
!dumpheap -stat
This method provide global memory usage of objects. Nothing remarkable... Also I've checked:
~*e!clrstack
I see various non managed threads. In those who are managed appears stacks like:
[HelperMethodFrame_1OBJ: 0f30e320]
System.Threading.WaitHandle.WaitMultiple(System.Threading.WaitHandle...
0f30e3ec 7928b3ff System.Threading.WaitHandle.WaitAny(System.Threading...
0f30e40c 7a55fc89 System.Net.TimerThread.ThreadProc()...
0f30e45c 792d6e46 System.Threading.ThreadHelper.ThreadStart_Context(System...
0f30e468 792f5781 System.Threading.ExecutionContext.runTryCode(System...
At least, I haven't seen exception throwing or similar (in that moment). I've also had access to two scripts written by Tess Ferrandez for calculating the number of sessions and size. Also here not promising results. Anything peculiar or remarkable (24000 bytes as average).
I would like to know what kind of strategies are you usually using facing this kind of problems. Have you ever used Microsoft Support?
Thanks a lot!
Very nice question, well a bad asp.net can hang all shared web apps on the same pool...
Ok let see... if the problem is on memory, get the VMMap from Sysinternals, and also the Process Explorer
Run them both, and from Process explorer find the PID number of pool that you wish to investigate, its under the inetinfo.exe, and have probably the name aspnet_wp.exe.
Now on the VMMap add for monitoring this Pool using for help the PID, and voila, you see the memory and the open images (aspx files) that probably are a lot and make the problems... The files that you going to see are located on temporary of asp.net Framework, but you can connect them and see from witch site they come from.
Well if the problem is not on memory, but the programmer have create bad loops, or even create thread sleeps, then I think process explorer is a way to investigate the pools and search for whats eating the power.
Additional
Maybe a pool recycle every 15minute can solve this issue ?
More about
In those videos there are a lot of informations about VMMap and memory manager.
Mysteries of Windows Memory Management, Part 1, and , Part 2
There are many tools, but it sounds like your main goal is to determine what's causing the problem. This can be done very simply with a binary search.
Break the pool in half, and see which one crashes. Repeat until you have a crashed pool with only one application in it.
This is already O(log2n), but you can speed the process up arbitrarily by dividing into more than two sub-pools.

Resources