corruption

double free or corruption 3d array in C

时光怂恿深爱的人放手 提交于 2019-11-28 12:23:34
问题 I get a 'double free or corruption' error while freeing up an 3d array. Can anyone please tell me where is the problem in the code? The size of the array is 2*N*N. Value of N here is 100. Even without casting, same result. Here is the code: // Mallocing double ***h = malloc(2 * (sizeof(double**))); for(i = 0; i < N; i++) { h[i] = malloc(N * sizeof(double*)); for(j = 0; j < N; j++) { h[i][j] = malloc(N * sizeof(double)); } } // Freeing for(i = 0; i < N; i++) { for(j = 0; j < N; j++) { free(h[i

Git responds with 'error in sideband demultiplexer'

瘦欲@ 提交于 2019-11-28 08:20:42
I have two servers set up (as far as I know) exactly the same. On one of them, committing with git has always been fine, however on the second one, I've started getting this error: fatal: The remote end hung up unexpectedly error: error in sideband demultiplexer Everything is the same between the two, including the contents of the .git/hooks/post-receive file. Is there a step in configuration I've missed somewhere, or something? I've tried reinitialising the repo twice now, to no avail. My post-receive file is as follows: #!/bin/sh cd .. env -i git reset --hard VonC On this GitHub support

How to fix possible db corruption?

别等时光非礼了梦想. 提交于 2019-11-28 08:16:27
问题 I'm at a client doing some quick fixes to their access application. It was a while I had a go with access, but I'm recovering quickly. However, I've discovered an interesting problem: For some reports, I get a "Record is deleted" error. I've checked the reports, and it seems like there's a problem with one table. When opening that table, I find a record where all columns are marked "#deleted". So obviously, this row seems to be the culprit. However, when I try to delete that row, nothing

Stack corruption in C++

夙愿已清 提交于 2019-11-28 04:45:21
In C++, in which way the stack may get corrupted. One way I guess is to overwriting the stack variables by accessing an array beyond its boundaries. Is there any other way that it can get corrupted? You could have a random/undefined pointer that ends up pointing to the stack, and write though that. An assembly function could incorrectly setup/modify/restore the stack Cosmic waves could flips bits in the stack. Radioactive elements in the chip's casing could flip bits. Anything in the kernel could go wrong and accidentally change your stack memory. But those are not particular to C++, which

Assistance with openssl blowfish simple example inserting garbage characters

只谈情不闲聊 提交于 2019-11-27 15:21:26
问题 If you have a good example of simply encrypting a file using openssl that is better than this one that I am having issues with I would be very grateful. Update: Myabe the author was correct. Using memset on something I did not allocate reminds me of strtok choking on non-stack variables. Update2: Got the core dump to stop by using malloc. Updated the code. The control Hs are still appearing. Updating the code to reflect this. Update3: The looping structure does not appear correct in the

resolving corruption in SQL Server Compact Edition database files

a 夏天 提交于 2019-11-27 13:12:10
This is not a query. Its a summary of our solution to get around the problem of corruption in SQL Compact Database files with (almost) definite success. SQLCE Corruption is a very common problem. We've received tremendous help from earlier posts in StackOverflow, and hence this post. Our product is a 3-tier architecture with the server running as a Windows Service connected to Rich Clients through .Net Remoting. Our product uses SQLCE since 2006. We have moved from v3.1, to v3.5 and now v4.0. We've a custom OR-Mapping tool for some very specific requirements. We've faced limited problems with

Avoid Android VideoView corruption when rotating back to portrait

拈花ヽ惹草 提交于 2019-11-27 08:29:00
I've managed to write a limited video player able to view a .3gp file from internet. The video will be shown centered full screen, maintaining the video aspect ratio. Also, rotations don't interrupt the video, which keeps playing without problems. Everything seems fine, but... on my HTC Legend when you rotate back to portrait, the video is corrupted, and instead of showing full screen it is displayed at its native pixel size. But rotating again to landscape works and is shown perfectly. Any ideas why? Unfortunately I don't have more hardware to test this on and I've run out of ideas to test.

Repair corrupted Git repository

懵懂的女人 提交于 2019-11-27 07:57:39
My Git repository got corrupted after a couple of hard reboots due to power supply issues and now I'm unable to fix it (I was in the middle of staging some files at the last power failure): $ git status fatal: failed to read object 3d18855708b0f127d40c13c679559d7679228b69: Invalid argument $ git fsck fatal: failed to read object 24377c609184c192f3f3c1733bac7115c1080758: Invalid argument $ git branch -a (...works, lists branches...) $ git checkout someotherbranch fatal: failed to read object 3d18855708b0f127d40c13c679559d7679228b69: Invalid argument $ git log fatal: failed to read object

Git responds with 'error in sideband demultiplexer'

谁说胖子不能爱 提交于 2019-11-27 02:09:32
问题 I have two servers set up (as far as I know) exactly the same. On one of them, committing with git has always been fine, however on the second one, I've started getting this error: fatal: The remote end hung up unexpectedly error: error in sideband demultiplexer Everything is the same between the two, including the contents of the .git/hooks/post-receive file. Is there a step in configuration I've missed somewhere, or something? I've tried reinitialising the repo twice now, to no avail. My

How to recover a corrupt SQLite3 database?

两盒软妹~` 提交于 2019-11-26 19:42:30
This is a follow up question to a previously answered post: Is there a command line utility for validating SQLite databases in Linux? If a database is producing the following error: $ sqlite3 mydata.db "PRAGMA integrity_check" Error: database disk image is malformed Is there any cleanup processing that can be done to recover the database to a usable state? Even at the potential loss of some corrupt records? Thanks If there were any automatic method, SQLite would already be able to do it. Sometimes, the corruption is only or mostly in indexes, in which case it would be possible to get some or