I'm trying to analyse my Win32 application using Application Verifier. I checked all of the categories under Basic. So in the following code,
// Function which unloads the DLL
int unloadDLL()
{
if(DLLHandle != NULL)
{
if(0 == FreeLibrary(DLLHandle))
{
// Failed to unload the DLL
return -1;
}
DLLHandle = NULL;
}
return 0;
}
Application verifier stops and throws the following,
=======================================
VERIFIER STOP 00000903: pid 0x770: A virtual reservation was leaked.
04DB0000 : Leaked reservation address.
00825FC4 : Address to the allocation stack trace. Run dps <address> to view the allocation stack.
07870FE0 : Address of the owner dll name. Run du <address> to read the dll name.
04B00000 : Base of the owner dll. Run .reload <dll_name> = <address> to reload the owner dll. Use 'lm' to get more information about the loaded and unloaded modules.
=======================================
This verifier stop is continuable.
After debugging it use `go' to continue.
=======================================
What is a virtual reservation address? I haven't been able to find any related links. Also, why is this occurring?
EDIT:
Here are the outputs of the commands I executed according to the above suggestions.
dps 00825FC4:
00825fc4 00000000
00825fc8 0000f801
00825fcc 002001e6
00825fd0 6aa1441e vfbasics+0x1441e
00825fd4 04b081ad <Unloaded_TestDLL.dll>+0x81ad
00825fd8 04b07bbd <Unloaded_TestDLL.dll>+0x7bbd
00825fdc 04b07683 <Unloaded_TestDLL.dll>+0x7683
00825fe0 04b0c4ec <Unloaded_TestDLL.dll>+0xc4ec
00825fe4 04b107d6 <Unloaded_TestDLL.dll>+0x107d6
00825fe8 004354ac*** WARNING: Unable to verify checksum for GUI.exe
GUI!CGUI::check+0x17c [E:\GUI\DLLInterface.cpp # 832]
00825fec 00435a47 GUI!CGUI::OnInitDialog+0x1e7 [E:\GUI\DLLInterface.cpp # 988]
00825ff0 004d3a6b GUI!AfxDlgProc+0x3b [dlgcore.cpp # 35]
00825ff4 773e86ef*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\USER32.dll -
USER32!IsThreadDesktopComposited+0x11f
00825ff8 773d9eb2 USER32!CreateDialogParamW+0x2b3
00825ffc 773db98b USER32!GetMenuItemID+0x17b
00826000 773f90f9 USER32!DefDlgProcA+0x22
00826004 773e86ef USER32!IsThreadDesktopComposited+0x11f
00826008 773e8876 USER32!IsThreadDesktopComposited+0x2a6
0082600c 773e43cf USER32!WindowFromDC+0xeb
00826010 774041f9 USER32!CallWindowProcA+0x1b
00826014 004d705d GUI!CWnd::DefWindowProcA+0x32 [wincore.cpp # 1000]
00826018 004d59eb GUI!CWnd::Default+0x39 [wincore.cpp # 249]
0082601c 004d4c67 GUI!CDialog::HandleInitDialog+0xad [dlgcore.cpp # 621]
00826020 004d83bb GUI!CWnd::OnWndMsg+0x68d [wincore.cpp # 1815]
00826024 004d7d04 GUI!CWnd::WindowProc+0x2e [wincore.cpp # 1585]
00826028 004d58a9 GUI!AfxCallWndProc+0xed [wincore.cpp # 215]
0082602c 004d5d45 GUI!AfxWndProc+0x81 [wincore.cpp # 368]
00826030 773e86ef USER32!IsThreadDesktopComposited+0x11f
00826034 773e8876 USER32!IsThreadDesktopComposited+0x2a6
00826038 773e7631 USER32!IsRectEmpty+0x120
0082603c 773d9b1d USER32!RegisterMessagePumpHook+0x9d9
00826040 773d9bf6 USER32!CreateDialogIndirectParamAorW+0x33
du 07870FE0:
07870fe0 "TestDLL.dll"
lm:
start end module name
00400000 007c5000 GUI C (private pdb symbols) E:\GUI\Debug\GUI.pdb
6aa00000 6aa58000 vfbasics (no symbols)
6cc80000 6ccb8000 odbcint (deferred)
6d180000 6d20a000 ODBC32 (deferred)
70650000 70669000 OLEPRO32 (deferred)
70670000 7068c000 oledlg (deferred)
70690000 706f0000 verifier (deferred)
709f0000 70a1b000 vrfcore (export symbols) C:\Windows\SYSTEM32\vrfcore.dll
71190000 711e1000 WINSPOOL (deferred)
721a0000 721b2000 pnrpnsp (deferred)
721c0000 721d0000 napinsp (deferred)
72230000 72236000 rasadhlp (deferred)
72240000 72248000 winrnr (deferred)
72280000 722a7000 WLIDNSP (deferred)
73420000 73426000 sensapi (deferred)
738e0000 73918000 fwpuclnt (deferred)
73b50000 73b57000 WINNSI (deferred)
73be0000 73bfc000 iphlpapi (deferred)
73ee0000 73ef0000 NLAapi (deferred)
74090000 740c2000 WINMM (deferred)
740d0000 740f1000 ntmarta (deferred)
741e0000 741ed000 rtutils (deferred)
741f0000 74205000 rasman (deferred)
74210000 74262000 RASAPI32 (deferred)
74380000 7438f000 wkscli (deferred)
74390000 743a1000 NETAPI32 (deferred)
745f0000 74603000 dwmapi (deferred)
74b30000 74b70000 uxtheme (deferred)
74b70000 74d0e000 comctl32_74b70000 (deferred)
74fd0000 74fd9000 VERSION (deferred)
75060000 75065000 wshtcpip (deferred)
75320000 75329000 netutils (deferred)
75410000 75454000 dnsapi (deferred)
75540000 75546000 wship6 (deferred)
75550000 7558c000 mswsock (deferred)
75860000 75879000 srvcli (deferred)
75a00000 75a1a000 SspiCli (deferred)
75a70000 75a7c000 CRYPTBASE (deferred)
75b20000 75b2b000 profapi (deferred)
75b90000 75b9c000 MSASN1 (deferred)
75ba0000 75c24000 COMCTL32 (deferred)
75c30000 75c7a000 KERNELBASE (deferred)
75d00000 75e1e000 CRYPT32 (deferred)
75e20000 75e9b000 comdlg32 (deferred)
75ea0000 75f41000 RPCRT4 (deferred)
75f50000 75ff0000 ADVAPI32 (deferred)
75ff0000 761e9000 iertutil (deferred)
76390000 763c5000 WS2_32 (deferred)
763d0000 763e9000 sechost (deferred)
763f0000 7640f000 IMM32 (deferred)
76410000 76455000 WLDAP32 (deferred)
76460000 76595000 urlmon (deferred)
765a0000 771e9000 SHELL32 (deferred)
771f0000 772c4000 kernel32 (deferred)
77300000 773cc000 MSCTF (deferred)
773d0000 77499000 USER32 (export symbols) C:\Windows\system32\USER32.dll
77590000 7763c000 msvcrt (deferred)
77640000 7779c000 ole32 (deferred)
777a0000 7782f000 OLEAUT32 (deferred)
77830000 778ce000 USP10 (deferred)
778d0000 779c4000 WININET (deferred)
779d0000 77b0c000 ntdll (export symbols) C:\Windows\SYSTEM32\ntdll.dll
77b10000 77b1a000 LPK (deferred)
77b20000 77b25000 PSAPI (deferred)
77b30000 77b33000 Normaliz (deferred)
77b40000 77b8e000 GDI32 (deferred)
77b90000 77b96000 NSI (deferred)
77ba0000 77bf7000 SHLWAPI (deferred)
Unloaded modules:
04b00000 04b60000 TestDLL.dll
"Virtual Reservation" presumably refers to the idea that in Windows, you can "reserve" (claim) a range of virtual addresses, without actually allocating physical memory.
e.g., from http://msdn.microsoft.com/en-us/library/windows/desktop/aa366887(v=vs.85).aspx
MEM_RESERVE 0x00002000 Reserves a range of the process's virtual
address space without allocating any actual physical storage in memory
or in the paging file on disk.
So, presumably something in TestDLL.dll called VirtualAlloc, and there was never a corresponding call to VirtualFree. You'd have to include more information about TestDLL for the investigation to proceed further.
Related
I'm using the Intellij IDE for Kotlin. I was trying the compose UI tutorial and when I ran a basic program I get this message 'Failed to choose DirectX12 Adapter. The window opens and appears to be working. What do I need to do to choose the adapter?
import androidx.compose.material.MaterialTheme
import androidx.compose.desktop.ui.tooling.preview.Preview
import androidx.compose.material.Button
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
#Composable
#Preview
fun App() {
var text by remember { mutableStateOf("Hello, World!") }
MaterialTheme {
Button(onClick = {
text = "Hello, Desktop!"
}) {
Text(text)
}
}
}
I used the dxdiag command and it appears DirectX 12 is installed.
System Information
Time of this report: 2/9/2023, 22:18:43
Machine name: DESKTOP-JQ7CR2F
Machine Id: {B31A9997-C49B-4C8D-84B7-67A3C21C6D33}
Operating System: Windows 10 Home 64-bit (10.0, Build 19044) (19041.vb_release.191206-1406)
Language: English (Regional Setting: English)
System Manufacturer: To Be Filled By O.E.M.
System Model: To Be Filled By O.E.M.
BIOS: BIOS Date: 07/27/15 17:53:10 Ver: 04.06.05 (type: BIOS)
Processor: Intel(R) Core(TM) i5-4590 CPU # 3.30GHz (4 CPUs), ~3.3GHz
Memory: 8192MB RAM
Available OS Memory: 8128MB RAM
Page File: 14425MB used, 8359MB available
Windows Dir: C:\Windows
DirectX Version: DirectX 12
DX Setup Parameters: Not found
User DPI Setting: 96 DPI (100 percent)
System DPI Setting: 96 DPI (100 percent)
DWM DPI Scaling: Disabled
Miracast: Not Available
Microsoft Graphics Hybrid: Not Supported
DirectX Database Version: 1.0.8
DxDiag Version: 10.00.19041.2075 64bit Unicode
DxDiag Notes
Display Tab 1: No problems found.
Display Tab 2: No problems found.
Sound Tab 1: No problems found.
Sound Tab 2: No problems found.
Sound Tab 3: No problems found.
Sound Tab 4: No problems found.
Input Tab: No problems found.
DirectX Debug Levels
Direct3D: 0/4 (retail)
DirectDraw: 0/4 (retail)
DirectInput: 0/5 (retail)
DirectMusic: 0/5 (retail)
DirectPlay: 0/9 (retail)
DirectSound: 0/5 (retail)
DirectShow: 0/6 (retail)
Display Devices
Card name: NVIDIA GeForce 210
Manufacturer: NVIDIA
Chip type: GeForce 210
DAC type: Integrated RAMDAC
Device Type: Full Device (POST)
Device Key: Enum\PCI\VEN_10DE&DEV_0A65&SUBSYS_082E196E&REV_A2
Device Status: 0180200A
I want to use:
co_await winrt::resume_foreground(window.DispatcherQueue());
(Type of "window" is: "winrt::Microsoft::UI::Xaml::Window")
But I cannot compile it because
winrt::resume_foreground(Microsoft::System::DispatcherQueue const& dispatcher)
is not defined.
I cannot include #include <winrt/Microsoft.System.h> which contains the DispatcherQueue class.
My environment:
Windows 10 Pro, 21H1, 19043.1083
Visual Studio Community 2019 (16.10.3)
Visual Studio Extension: Project Reunion Version 0.8.0.46122163
Project Template: C++, Blank App, Packaged (WinUI 3 in Desktop)
To reproduce the error I used the Project Template above and added the following method to the "App" class.
App.xaml.h
winrt::Windows::Foundation::IAsyncAction foo();
App.xaml.cpp
winrt::Windows::Foundation::IAsyncAction App::foo()
{
co_await winrt::resume_foreground(window.DispatcherQueue());
}
I get the error message:
D:\Solution\WinUi3 Test\WinUi3 Test\App.xaml.cpp(50,21): error C2039: 'resume_foreground': is not a member of 'winrt'
1>D:\Solution\WinUi3 Test\WinUi3 Test\MainWindow.xaml.h(23): message : see declaration of 'winrt'
1>D:\Solution\WinUi3 Test\WinUi3 Test\App.xaml.cpp(50,38): error C3861: 'resume_foreground': identifier not found
1>Done building project "WinUi3 Test.vcxproj" -- FAILED.
If I try to include #include <winrt/Microsoft.System.h> I get:
1>D:\Solution\WinUi3 Test\WinUi3 Test\pch.h(25,10): fatal error C1083: Cannot open include file: 'winrt/Microsoft.System.h': No such file or directory
1>Done building project "WinUi3 Test.vcxproj" -- FAILED.
If I include #include <winrt/Windows.System.h> and #include <winrt/Windows.UI.Core.h> I get:
1>D:\Solution\WinUi3 Test\WinUi3 Test\App.xaml.cpp(50,63): error C2665: 'winrt::resume_foreground': none of the 2 overloads could convert all the argument types
1>D:\Solution\WinUi3 Test\WinUi3 Test\Generated Files\winrt\Windows.UI.Core.h(2805,31): message : could be 'winrt::resume_foreground::awaitable winrt::resume_foreground(const winrt::Windows::UI::Core::CoreDispatcher &,const winrt::Windows::UI::Core::CoreDispatcherPriority) noexcept' (compiling source file App.xaml.cpp)
1>D:\Solution\WinUi3 Test\WinUi3 Test\Generated Files\winrt\Windows.System.h(4529,31): message : or 'winrt::resume_foreground::awaitable winrt::resume_foreground(const winrt::Windows::System::DispatcherQueue &,const winrt::Windows::System::DispatcherQueuePriority) noexcept' (compiling source file App.xaml.cpp)
1>D:\Solution\WinUi3 Test\WinUi3 Test\App.xaml.cpp(50,63): message : while trying to match the argument list '(winrt::Microsoft::UI::Dispatching::DispatcherQueue)'
1>Done building project "WinUi3 Test.vcxproj" -- FAILED.
Include
#include <winrt/Microsoft.UI.Dispatching.h>
#include <Microsoft.UI.Dispatching.co_await.h>
When updating from 0.8.0 preview to 0.8.0 there was a namespace change from
Microsoft.System to Microsoft.UI.Dispatching and resume_foreground is now defined in Microsoft.UI.Dispatching.co_await.h.
The answer from Markus does not work for me in the WinUI3 1.0 release because the Microsoft.UI.Dispatching.co_await.h header file does not exist. However, the following does work:
#include <wil/cppwinrt.h>
#include <wil/cppwinrt_helpers.h>
co_await wil::resume_foreground(DispatcherQueue());
I have a DLL and OCX pack then I've decided to make an installer.
This is what I have:
ArchitecturesInstallIn64BitMode=x64
[Files]
Source: {syswow64}\*; DestDir: {syswow64}; Flags: onlyifdoesntexist
Source: {sys}\*; DestDir: {sys}; Flags: onlyifdoesntexist
[Run]
Filename: regsvr32.exe; Parameters: """{sys}\zlib1.dll"" /S"; StatusMsg: Registrando: zlib1.dll; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\actskin4.ocx"" /S"; StatusMsg: Registrando: actskin4.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Bassmod.dll"" /S"; StatusMsg: Registrando: Bassmod.dll; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\ChamaleonButton.ocx"" /S"; StatusMsg: Registrando: ChamaleonButton.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.Calendar.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.Calendar.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.Codejock.TaskPanel.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.Codejock.TaskPanel.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.CommandBars.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.CommandBars.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.Controls.Unicode.v13.2.1.ocx"" /S"; StatusMsg: Registrando: Codejock.Controls.Unicode.v13.2.1.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.Controls.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.Controls.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.DockingPane.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.DockingPane.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.Markup.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.Markup.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.PropertyGrid.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.PropertyGrid.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.ReportControl.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.ReportControl.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.ShortcutBar.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.ShortcutBar.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.SkinFramework.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.SkinFramework.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Codejock.SyntaxEdit.v13.4.0.Demo.ocx"" /S"; StatusMsg: Registrando: Codejock.SyntaxEdit.v13.4.0.Demo.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\HookMenu.ocx"" /S"; StatusMsg: Registrando: HookMenu.ocx; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\MSCOMCTL.OCX"" /S"; StatusMsg: Registrando: MSCOMCTL.OCX; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\MSCOMCTL32.OCX"" /S"; StatusMsg: Registrando: MSCOMCTL32.OCX; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\Msvbvm50.dll"" /S"; StatusMsg: Registrando: Msvbvm50.dll; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\msvcr71.dll"" /S"; StatusMsg: Registrando: msvcr71.dll; Flags: RunHidden WaitUntilTerminated
Filename: regsvr32.exe; Parameters: """{syswow64}\zlib1.dll"" /S"; StatusMsg: Registrando: zlib1.dll; Flags: RunHidden WaitUntilTerminated
I've seen the regserver parametter but I'm not sure how it works (I've readed the parametter documentation), I need to know if I can simplify the things by doing only this without needing all the [RUN] section?:
[Files]
Source: {syswow64}\*; DestDir: {syswow64}; Flags: onlyifdoesntexist regserver
Source: {sys}\*; DestDir: {sys}; Flags: onlyifdoesntexist regserver
And also If I do that then I still need to specify the "ArchitecturesInstallIn64BitMode"? for the correct registration of the first x64 dll?
UPDATE:
Maybe this is a better equivalent of the [RUN] section:
[Files]
Source: {syswow64}\*; DestDir: {syswow64}; Flags: onlyifdoesntexist regserver 32bit
Source: {sys}\*; DestDir: {sys}; Flags: onlyifdoesntexist regserver 64bit
The more correct approach would be:
[Files]
Source: C:\yourdlls\x86\*; DestDir: {sys}; Flags: onlyifdoesntexist regserver 32bit
Source: C:\yourdlls\x64\*; DestDir: {sys}; Flags: onlyifdoesntexist regserver 64bit; Check: IsWin64
Note that I've changed the Source dir. That is because it is an amazingly bad idea to source files from your own Windows folder, and even worse to do so with wildcards. You're just asking for something that will completely destroy someone else's Windows installation if you attempt that.
(Also note that you should never install to {syswow64}, especially when using regserver. The lines above will have the same effect of installing into two separate folders but they will actually register things correctly, unlike what you had.)
It looks like some of the files you are trying to install are from Visual Basic 6. The Inno Setup Knowledge Base has/had a special page about how to correctly install VB6 DLLs and OCXs. As of the time of this writing the web page won't load, but you can easily find it in the Wayback machine at this link:
http://web.archive.org/web/20210516171924/https://jrsoftware.org/iskb.php?vb
Here's an excerpt from my own *.iss file showing how to install some DLLs and OCXs. Notice how the files are installed/registered differently in each section:
; begin VB6 system files
Source: "stdole2.tlb"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regtypelib
Source: "msvbvm60.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
Source: "oleaut32.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
Source: "olepro32.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
Source: "asycfilt.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile
Source: "comcat.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
; end VB6 system files
; OCX files the application uses (look at *.vbp file to see which ones are needed):
Source: "ComDlg32.OCX"; DestDir: "{sys}"; Flags: restartreplace sharedfile regserver
Source: "mscomctl.OCX"; DestDir: "{sys}"; Flags: restartreplace sharedfile regserver
; remaining application files:
Source: "..\RSSelect.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\RSSelect.dll"; DestDir: "{app}"; Flags: ignoreversion regserver 32bit
As a final note, a common issue online is "where to get" the VB6 required files. If you don't actually have VB6 installed on your PC, search online to try to find a software package that someone developed in VB6, and install it. You don't even have to run/use the software; just the mere process of installing puts the DLLs on your PC.
I've noticed that programs where usage of System.Timers.Timer object appears is very CPU consumptive (almost 100percent for single CPU core).
I'm using Ubuntu 11.10, here is my version of mono:
mono -V
Mono JIT compiler version 2.10.5 (Debian 2.10.5-1)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)
Here is sample program, which causes unexpected high CPU usage:
using System;
using System.Timers;
namespace MonoCPUTest
{
class Program
{
static Timer _refresh = new Timer();
static void Main(string[] args)
{
_refresh.Interval = 2000;
_refresh.AutoReset = true;
_refresh.Elapsed += (x, y) => refresh();
_refresh.Start();
while (true)
{
Console.WriteLine("loop");
System.Threading.Thread.Sleep(10000);
}
}
static void refresh()
{
Console.WriteLine("refresh");
}
}
}
Thank you very much for any help.
I've just tested (by copy pasting, compiling and executing your code) and cannot reproduce the issue, the CPU load is about 0. I'm using newer version of Mono, specifically the one compiled from the git tree couple days ago; so if there was an issue like that, it was fixed.
I guess upgrading your Mono is not possible without external PPA, but this is what should be done here if you are not forced to use this version for some other reason. You can also compile one from the source, which is as easy, as configure, make, make install ;)
I have created windows vb application running on 32bit machine and packaged through Inno Setup Compiler 5.4.2. Once i install the application in the machine successfully, it doesn't launch the application and log file shows all dependencies are installed successfully.
Can anyone help me to sort out this issue?
Please go through the Inno script
[Setup]
AppId={{32558ED7-C211-4AB1-9D3F-9F36F214531E}
AppName=MyApplication
AppVerName=MyApplication
DefaultDirName={pf}\MyApplication
DefaultGroupName=MyApplication
LicenseFile=F:\README.TXT
OutputDir=F:\setUp
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "MyApp4.0.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "XXX.DLL"; DestDir: "{app}\components"; Flags: ignoreversion
Source: "App.ocx"; DestDir: "{app}\components"; Flags: regserver restartreplace sharedfile
Source: "MSCOMCTL.OCX"; DestDir: {sys}; Flags: regserver restartreplace sharedfile;
Source: "ui.swf"; DestDir: "{app}\ui\"; Flags: ignoreversion
[Icons]
Name: "{group}\MyApplication"; Filename: "{app}\MyApp4.0.exe"
Name: "{commondesktop}\MyApplication"; Filename: "{app}\MyApp4.0.exe"; Tasks: desktopicon
[Run]
Filename: "{app}\MyApp4.0.exe"; Description: "{cm:LaunchProgram,MyApplication}";
Change your [Run] section to the following:
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Where #MyAppExeName is the name of your .exe file.