Visual studio generating corrupt (or maybe empty) library file - visual-studio-2019

This was all working a few days ago. Not sure what changed.
I have a bunch of 32 bit library files which I am building on Windows 10 with VS2019. When I try to link with them, I get an error saying that the library file is corrupt. I've tried rebuilding, repairing visual studio, and rebooting.
1>CVTRES : fatal error CVT1107: 'C:\sandbox\debug\WinIPC.lib' is corrupt
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
Looking at one particular library, it is 40 megs in size which seems reasonable. Dumpbin /all, however, shows this
File Type: COFF OBJECT
FILE HEADER VALUES
0 machine (Unknown)
0 number of sections
0 time date stamp
0 file pointer to symbol table
0 number of symbols
0 size of optional header
0 characteristics
Summary
I have four library files that show this problem and several that don't. I don't see any difference in the way that they are built.
I do see from the dumpbin output that the libraries that don't work are file type "COFF OBJECT" while the ones which do work are "Library"
In the release build, visual studio does NOT complain about the file being corrupt, but it does complain about the symbols that should be in the library being unresolved, and dumpbin still shows that the file is empty.
Anyone have any suggestions?

Related

SSIS Truncation in Flat file source

I am new to SSIS, I am importing a flat file data into SQL Server. It throws error while importing data in the flat file source task.
[Flat File Source [60]] Error: Data conversion failed. The data conversion for column "DCN_NAME" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
[Flat File Source [60]] Error: The "Flat File Source.Outputs[Flat File Source Output].Columns[DCN_NAME]" failed because truncation occurred, and the truncation row disposition on "Flat File Source.Outputs[Flat File Source Output].Columns[DCN_NAME]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Flat File Source returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
How to solve this issue. I don't have problem in destination.Is it possible to change the source field length?
I changed the source length in source connection manager. It works fine now.
You have not provided enough information to answer your question. Here is what I can gleam from what you have provided.
Your SSIS package is read a flat file and it assumes DCN_Name is data DT_STR
(type char). Confirm the origin and the destination have the same data type. If they do not, use a [Data Conversion] function which is found on the left side on the screen under Data Flow.
Be mindful that while SQL uses varchar and nvarchar, SSIS uses DT_WSTR and DT_STR. It can get confusing. In the link below you will find a SSIS to SQL Data Type Conversion
enter link description here
The errors generated by SSIS are counter intuitive.
The solution was use a data conversion because the source and destination were different data types.

Xamarin.Android binding generation giving "Type X was not found" errors for classes new in JDK 1.8

I'm trying to get Xamarin.Android to generate bindings for a library supplied as an AAR. JAR2XML is giving me a lot of "can't find type" errors, so I thought I'd try class-parse, but in addition to some library references I'm trying to track down, I'm getting a couple of these:
1> Error while processing '[Method] java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal temporal, long newValue)' in '[Class] java.time.temporal.ChronoField': Type 'java.time.temporal.Temporal' was not found. (TaskId:69)
1> Error while processing '[Method] java.time.temporal.Temporal addTo(java.time.temporal.Temporal temporal, long amount)' in '[Class] java.time.temporal.ChronoUnit': Type 'java.time.temporal.Temporal' was not found. (TaskId:69)
Now, java.time.temporal.Temporal is a new type in JDK 1.8, so I'm wondering if maybe that's part of my problem here (ie. maybe the types that can't load are using other new-in-1.8 types). Running bin\javac -version in the path specified in Options-Xamarin-Android Settings says I'm using "1.8.0_172". My project is targeting "Android 8.1 (Oreo)" - ie. api level 27. Is there some other option I need to set to make sure I'm using 1.8?

Windows Error Reporting insists on NOT creating full dumps on software crashes

I'm trying to debug my application on a production machine. It crashes about once every 2 days and I don't know why.
I've been trying for days now to make that production machine produce full crash dumps whenever a program crashes. Sometimes it does, but sometimes, instead of producing full crash dumps, it creates short text files that simply list all modules loaded and says that the program crashed. These short files are saved in %LOCALAPPDATA%\Microsoft\Windows Error Reporting\ReportArchive.
For the life of me, I cannot understand why this is happening! I can't ask these users to run adplus or windbg or something like that. I just need to create a crash dump every time the program crashes, period.
Can anyone please help? I'm attaching the full registry settings for WER. These exist both on HKEY_LOCAL_MACHINE\Software\Wow6432Node and on the 64 bit node. As you can see, the LocalDumps key points to C:\ProgramData\Microsoft\Windows\WER\LocalDumps to save crash dumps, and yes, everyone has full permission for this folder.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting]
"ErrorPort"="\\WindowsErrorReportingServicePort"
"MaxQueueSizePercentage"=dword:00000001
"PurgeThreshholdValueInKB"=dword:0000000a
"Disabled"=dword:00000000
"MaxQueueCount"=dword:00000032
"DisableQueue"=dword:00000000
"LoggingDisabled"=dword:00000000
"DontSendAdditionalData"=dword:00000000
"AutoApproveOSDumps"=dword:00000001
"MaxQueueSize"=dword:00000400
"ForceQueue"=dword:00000001
"DontShowUI"=dword:00000001
"ConfigureArchive"=dword:00000002
"MaxArchiveCount"=dword:000001f4
"DisableArchive"=dword:00000000
"LastQueuePesterTime"=hex(b):57,18,42,be,ba,81,d0,01
"LastLiveReportFlushTime"=hex(b):87,cf,56,3d,bc,81,d0,01
"LastQueueNoPesterTime"=hex(b):4d,39,bb,3a,51,97,d0,01
"LastRateLimitedDumpGenerationTime"=hex(b):87,84,74,9b,90,85,d0,01
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting\BrokerUp]
"WWAJSE"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting\Consent]
"SQLException64"=dword:00000004
"SQLException"=dword:00000004
"DefaultConsent"=dword:00000004
"DefaultOverrideBehavior"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting\Debug]
"ExceptionRecord"=hex:de,fa,ed,0e,01,00,00,00,00,00,00,00,98,45,4d,75,07,00,00,\
00,81,f8,46,00,dc,37,49,00,88,37,49,00,00,00,00,00,c0,fe,18,00,fc,fe,18,00,\
1c,f9,18,00,02,00,00,00,04,f9,18,00,00,00,00,00,0c,f9,18,00,96,27,40,00,da,\
3b,40,00,f0,0c,45,00,e2,31,40,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting\HeapControlledList]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting\HeapControlledList\dwm.exe]
"EnableHeapThrottle"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps]
"DumpFolder"="C:\\ProgramData\\Microsoft\\Windows\\WER\\LocalDumps"
"DumpCount"=dword:0000000a
"DumpType"=dword:00000002
"CustomDumpFlags"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting\RuntimeExceptionHelperModules]
"C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscordacwks.dll"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting\WMR]
"Disable"=dword:00000001
Move the values you've added to
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\Windows Error Reporting\LocalDumps]
to
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\ProgramName.exe]
For example:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\Snagit32.exe]
"CustomDumpFlags"=dword:00000000
"DumpCount"=dword:00000003
"DumpFolder"=hex(2):25,00,4c,00,4f,00,43,00,41,00,4c,00,41,00,50,00,50,00,44,\
00,41,00,54,00,41,00,25,00,5c,00,54,00,65,00,63,00,68,00,53,00,6d,00,69,00,\
74,00,68,00,5c,00,53,00,6e,00,61,00,67,00,69,00,74,00,5c,00,43,00,72,00,61,\
00,73,00,68,00,44,00,75,00,6d,00,70,00,73,00,00,00
"DumpType"=dword:00000002
You've set "DontShowUI"=dword:00000001 in (as shown) the 32-bit version of HKLM's Windows Error Reporting key, but this will be overridden by the value in HKCU, for example:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting]
<other entries not shown>
"DontShowUI"=dword:00000000
Be sure that you are not disabling WER for your process by calling
SetErrorMode(SEM_NOGPFAULTERRORBOX);
The SEM_NOGPFAULTERRORBOX setting will prevent Windows Error Reporting from handling the crash, so omit this flag if you call SetErrorMode.
Windows Error Reporting will honor the LocalDumps key if WER is not disabled by the registry or SetErrorMode. Setting DontShowUI to 1 will prevent the crash dialog from appearing but will not prevent LocalDumps from being created if WER is enabled.
My Two cents (even if old.. but maybe useful)
Tested under windows7 AND win10 64 bit. it does work.
A tip: keys are saved in Hex, but you can also simply use:
(saved in *.REG file)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]
"DumpCount"=dword:0000000a
"DumpType"=dword:00000002
"DumpFolder"="c:\\CrashDumps"

What would cause a compiler to fail randomly?

I am using the clang compiler on windows. I used the installer from the LLVM website. Sometimes it gives me a compiler error.
clang -I./include main.c CoreFoundation.dll
it gives:
In file included from main.c:4:
In file included from ./include\CoreFoundation/CFNumberFormatter.h:110:
./include\CoreFoundation/CFXMLParser.h:159:81: error: unknown type name 'CFXMLNodeRef'
typedef void * (*CFXMLParserCreateXMLStructureCallBack)(CFXMLParserRef parser,
CFXMLNodeRef nodeDesc, void *info);
...
and sometimes this..
In file included from main.c:4:
In file included from ./include\CoreFoundation/CoreFoundation.h:86:
./include\CoreFoundation/CFDateFormatter.h:104:105: error: unknown type name 'CFDateRef'; did you mean 'CFDataRef'?
CFStringRef CFDateFormatterCreateStringWithDate(CFAllocatorRef allocator, CFDateFormatterRef formatter, CFDateRef date) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
...
...and other similar warnings, seemingly randomly choosing where to stop. Sometimes it compiles through without error. When it gives an error, they seem to be be about not finding a symbol from an included file. It doesn't complain about not finding the file. But it doesn't consistently stop at the same point and sometimes compiles successfully.
I can reproduce this "error" under Linux with gcc. I even get the "report this compiler bug pls" message.
When it gives an error, they seem to be be about not finding a symbol from an included file
You can get this:
if you compile with multiple threads (eg. make -j8)
if you abort the compile and then start it again without "cleaning" all obj files
if you compiled your source, changed something and compile without "cleaning"
if your compiler/make/build process changes the order every time... (had this with cmake and opencv 3 source)

Touching "Debug\opencvhaifa.unsuccessfulbuild".LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

I am doing my project entraint end of study I try to implement this code in visual studio 2010 based on opencv 2.4.7 ais several times while I trouse same mistake I made ​​all the config...

Resources