Thread: creating minidump generates zero byte files

  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    330

    creating minidump generates zero byte files

    Hello,

    Im using windebug.dll to generate a minidump file but sometimes a zero size file is written. I can reproduce this when creating 2 threads that crash immediately even though there is a critical section around the function that generates the file. Does anybody know what the problem can be here?

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Could you provide a small console program that reproduces the issue?

    gg

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    What is windebug.dll? Never heard of that. For minidumps you should call MiniDumpWriteDump() from dbghelp.dll.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  4. #4
    Registered User
    Join Date
    Jan 2007
    Posts
    330
    Never mind, the problem was that the process containing the windows exception handler that generated the dump file was the same process as what caused the crash which can cause problems. Solution is to send the exception data to another process with WM_COPYDATA

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. reading files byte by byte
    By cpsc in forum C++ Programming
    Replies: 12
    Last Post: 01-07-2011, 03:54 PM
  2. Creating Bitmap from byte[]
    By xds4lx in forum C# Programming
    Replies: 4
    Last Post: 01-15-2010, 04:03 PM
  3. Creating Files
    By Halo2Master in forum C++ Programming
    Replies: 3
    Last Post: 07-20-2005, 02:49 PM
  4. Creating Files
    By Seb in forum C++ Programming
    Replies: 5
    Last Post: 06-15-2003, 08:11 PM
  5. creating .DAT files
    By breed in forum C Programming
    Replies: 3
    Last Post: 11-30-2001, 09:09 AM