I have a strange problem: My Delphi application raises an EOutOfRessources exception just after starting up on a Application.CreateForm call. Is somebody out there, who solved such a problem?
The strange things are
that this happens on a single machine only. I do not have this
problem on other computers
that the application runs properly, if a teleservice is active (we use Danware NetOP). If teleservice is not running (Netop waits for a guest log in), the application fails.
The application was developed under D7; OS is WinXP SP3.
Thanks for your help
--- Update 1 ---
Application uses EurekaLog to catch exceptions and to store error information. It says, the EOutOfRessources happens on Application.CreateForm (some 50 forms already created, a few other forms pending to create), the message is "out of system ressources". Exception address is 7C81EB2E.
The EurekaLog also provides the call stack :
|*Exception Thread: ID=2088; Priority=0; Class=; [Main] |
|-----------------------------------------------------------------------|
|7C81EB2E|kernel32.dll| | | | |
|77D56C4F|user32.dll | | |CreateIcon | |
|7C9205D4|ntdll.dll | | |RtlAllocateHeap | |
|7C9110ED|ntdll.dll | | |RtlLeaveCriticalSection| |
|77D2058E|user32.dll | | |SystemParametersInfoA | |
|77D205A3|user32.dll | | |SystemParametersInfoA | |
|7C809AE4|kernel32.dll| | |VirtualAllocEx | |
|7C809AA2|kernel32.dll| | |VirtualAllocEx | |
|7C809A94|kernel32.dll| | |VirtualAlloc | |
|0060E359|_765013.exe |_765013.dpr| | |235[58]|
|7C91E64C|ntdll.dll | | |NtSetInformationThread | |
-------------------------------------------------------------------------
Total memory use is about 60 MB; the application has some 20 MB in use.
I do not know the used number of handles; EurekaLog does not provide this.
--- Update 2 ---
Now we exchanged the PC by another one of same type. The exception did not raise again. However, we had a similar effect on another machine, now not being able to open a file during Application.CreateForm. The file name string was empty ... After a number of poor people resets (power shut down) the problem disappeared.
We suspect, that the exceptions are caused by a network problem. At this customer, we have four applications running (per two identical projects). They share data over a company network; for that there is a NAS. Network login is done with Windows start up, about 2 minutes before starting the applications.
Teleservice runs over company network too.
The question is now, if Application.CreateForm is trying to get connected to network. Our OnCreate event handlers do not require an open network.
The applications' source code is on the NAS too (encrypted by TrueCrypt). After compilation we copy the EXE and all other needed files to a local hard drive and run the application from that place. Normally, the TrueCrypt container is closed.
Could it happen, that the EXE is searching for some files on NAS resp. the TrueCrypt container?
Maybe, somebody is familiar with such issues. Thanks for your help.
Related
Short
I am building an electron app with Vue, using electron-vue. I need it to run a heavy work, say f(). But out of memory error is thrown and it cannot be done. How can I increase memory limit of electron renderer process?
Long
First, when I build a CLI app and run f(), i.e.:
// Start of file
function f() {
// Do some heavy work
}
if (require.main === module) {
f()
}
// End of file
It takes a long time, but f() is completed without any error.
However, when I build an electron app and run f() in a renderer, it takes a long time and finally throws out of memory error.
My app has the following structure:
+----------+ +------+ +----------+
| UI |--work request-->| Main |--work request-->| Worker |
| renderer |<-work response--| proc |<-work response--| renderer |
+----------+ +------+ +----------+
The main process forwards request and response. (You may think Worker renderer is a bit weird, but I need to keep this structure for a while...)
My guess is that difference of memory limit between CLI app and the worker renderer of the electron app causes this problem.
Is my guess is correct? If so, is there any suggestion to solve this problem?
Am using fastlane for my app and right now have configured to generate HTML reports for tests & code coverage.
Is it possible to fetch the stats as seen on command line so that I could use it to notify on separate chat app which I use ?
+------------------+---------+
| xcov Coverage Report |
+------------------+---------+
| 123456789012.app | 100.00% |
+------------------+---------+
+--------------------+---+
| Test Results |
+--------------------+---+
| Number of tests | 1 |
| Number of failures | 0 |
+--------------------+---+
You can use tools like xcov and gcovr to gather coverage data on top of fastlane. Links are as follows to the documentation:
https://docs.fastlane.tools/actions/gcovr/
https://docs.fastlane.tools/actions/xcov/
For test results, i believe there is no straight forward answer for that because the logs you see in the console are not directly exposed by Xcode.
When you are running your application, Xcode creates a file called TestSummaries.plist, which has all the steps and results.
Some of the developers were in your position, where they ended up writing a macOS application, just to parse the plist and get all the data. Following is the reference to the project.
https://github.com/nacuteodor/ProcessTestSummaries
https://github.com/KrauseFx/trainer
Lastly, go through the following article which explains how test logs are structured in the testSummaries.plist
https://michele.io/test-logs-in-xcode/
Hope all the links and explanations help you out. :)
Migrating an old Add-on from XUL to Add-ons-SDK in preparation for WebExtensions. Would still like to support some older browsers with this add-on, so that is why I am not jumping right to WebExtensions.
What I'd like to do is control minimize, maximize full screen and restore functions. These seem to be implemented right on the window object, since FF 45.0, which is great, but no help when trying to support older browsers. Not sure if that functionality existed before, or how to access it in a XUL-migration friendly context ( Step 1: use Services.jsm ). See Migrate from XUL Overlay to Restartless.
To best I could find is to use Components.interfaces.nsIDOMChromeWindow.windowState of the STATE_* attributes to detect the minimized, maximized, normal or fullscreen states, and then issue the methods minimize(), maximize() and restore() found on the same object ( nsIDOMChromeWindow ).
But I can't seem to find the precise way to load the equivalent
Components.interfaces.nsIDOMChromeWindow.windowState
using a resource:// like Services.jsm.
For example, the old add-on also used:
Components.interfaces.nsIPrefBranchInternal
which was later renamed to
Components.interfaces.nsIPrefBranch2
and later folded into
Components.interfaces.nsIPrefBranch
which can now be accessed by:
Components.utils.import( 'resource://gre/modules/Services.jsm' );
var prefsService = Services.prefs;
See Services.jsm on MDN for options.
| Service accessor | Service interface | Service name |
|-------------------|----------------------|-------------------------|
| domStorageManager | nsIDOMStorageManager | DOM Storage Manager |
| DOMRequest | nsIDOMRequestService | DOMRequest service |
| wm | nsIWindowMediator | Window mediator service |
| ww | nsIWindowWatcher | Window watcher service |
There's two things that start with nsIDOM* (Request and Storage), but don't seem to be related, or have any path to the desired object. nsIWindow* (Mediator and Watcher) both have some methods that return a similarly named nsIDOMWindow object (deprecated in FF 44), including a confusingly named getChromeForWindow() method, but that is NOT THE SAME OBJECT, and indeed, doesn't have any of the desired state attributes or window management toggle methods.
I am not sure what I am missing here. Is this simply one of the things the developers decided was "low level" and thus refused to provide any high level access via Services.jsm? Or is the access there but documentation incomplete? Or is it documented but buried? Or is it blogged about somewhere? I could only find one single post on all of StackOverflow that even had nsIDOMChromeWindow in it!
As I initially stated, I know there's a simple way to do this in both the "old" style XUL/Overlay, as well as the "new" FF >= 45, but I am looking to support that in-between area, at least for another year or two, until they absolutely drop XUL. By then, I will have the Add-ons-SDK version ready to go, and the WebExtensions well underway.
I am using FitNesse with Xebium for documenting/running automated test scripts.
I was wondering how these test scripts can be improved e.g. by removing duplication:
|scenario |Given a customer check with status positive|
|start app with customerId|1000001 |
|scenario |Given a customer check with status negative|
|start app with customerId|1000002 |
|scenario |Given a customer check with status error|
|start app with customerId|1000003 |
(... and so on)
I have the feeling that this can be put in one table, but how?
I know its an old post, but I believe you can plan your acceptance tests something like below
|start app |
|status |given customer|whatever validation?|
|positive|1000001 |works fine |
|negative|1000002 |can not be launched |
|error |1000003 |can not be launched |
On iOS 7, I have a test like this for calabash:
And I fill in text fields as follows:
| field | text |
| Name | Batking |
| Apt/Suite # | 87 |
| ZIP Code | 68067 |
| Location Name (e.g. Home) | Cave |
The textfields are on that view but somehow touch doesn't find them. The test fails and gives an error:
touch could not find view: 'textField marked:'Street Address'', args: {:query=>"textField marked:'Street Address'"} (RuntimeError)
Does anyone has a solution for this? Your help will be much appreciated
Try using 'tap' and tap the field by the name of the label. Example: tap 'Street Address'. If you need help finding the label name then query it. Example: change directory into your project location. Then run calabash-ios console to run the irb for your project. Then run start_test_server_in_background to start the calabash simulator. Navigate to the view that has the textField you need. Then run query("label"). Find the name of the label then run the tap command from above. Hope this helps