Page 1 of 1

Configure crashes with assertion failure

Posted: 2006-11-24T12:52:35-07:00
by el_supremo
I was going to try to sort out the problem with pict images as posted in http://redux.imagemagick.org/discussion ... light=pict
I downloaded the windows source for 6.3.0-6 and built the configure program but when it is executed it crashes with an assertion failure as shown here:
http://members.shaw.ca/el_supremo/configure_crash.png
This problem was mentioned recently on the magick-users list but I can't post there. As was mentioned in a reply on that list, the configure project hasn't changed for a long time. The compiler and the runtime DLLs have. I used Visual C++.net 2003 but still have the V6.0 compiler installed so I tried compiling "configure" with that and it crashes in the same way. This suggests that a runtime DLL has changed but I don't know how to sort out which one it is.

Pete

Posted: 2006-11-24T17:42:23-07:00
by magick
The configure program was contributed, we did not write it. We also cannot reproduce the problem. It works for us consistently. Its possible the configure program has a bug tickled by recent updates by Microsoft or perhaps there is a bug in the Microsoft compiler or runtime environment. We'll investigate further but we may need to rely on the user community to track and fix this bug.

Posted: 2006-11-24T22:29:31-07:00
by el_supremo
I don't know why it works but I have a workaround for the problem. I added some MessageBox statements to the configure.cpp code to try to find out where it was crashing and to my surprise the program started working! I wittled it down to just one additional MessageBox statement and configure still works.
In configure.cpp in CConfigureApp::InitInstance() after this statement:

Code: Select all

  int nResponse = wizard.DoModal();
add the statement:

Code: Select all

MessageBox(NULL,"B","info",MB_OK);
This statement never got executed but the program runs to completion. I can't post to magick-users so could you relay this - maybe it'll help.

Pete

Posted: 2006-11-24T22:50:48-07:00
by magick
We posted your message to magick-users. Thanks for the patch.

Posted: 2006-11-24T23:29:40-07:00
by rmabry
magick wrote: We posted your message to magick-users. Thanks for the patch.


Many thanks, indeed! It fixed the same problem for me.

By the way, Pete, I'm curious as to why you "can't post to magic-users". I'm having intermittent trouble myself, but that's a bug of another color. I may just switch to this place.

Rick

Posted: 2006-11-24T23:37:17-07:00
by magick
Although Pete's patch works, its a hack. It does not identify the real source of the problem. Try replacing MessageBox() with sleep(1). See if its a timing problem. If not, MessageBox() might be initializing something in the MFC. If someone finds another solution to the problem, post it here. Thanks.

Posted: 2006-11-25T00:10:10-07:00
by el_supremo
I'm curious as to why you "can't post to magic-users"

When I first got on the list I was blocked because my ISP's domain was in the SORBS database and imagemagick doesn't post messages from anyone who posts from a domain in SORBS. Actually, I haven't checked recently to see if they're still on SORBS. I'll have a look sometime.

Pete

Posted: 2006-11-25T01:14:32-07:00
by rmabry
magick wrote: Although Pete's patch works, its a hack. It does not identify the real source of the problem. Try replacing MessageBox() with sleep(1). See if its a timing problem. If not, MessageBox() might be initializing something in the MFC. If someone finds another solution to the problem, post it here. Thanks.


In Windoze I needed Sleep(1000) in place of sleep(1), but in any case, it did not work. I also tried Sleep(1) and Sleep(10000) with the same results.

Rick

Posted: 2006-11-25T01:23:28-07:00
by rmabry
el_supremo wrote:
I'm curious as to why you "can't post to magic-users"

When I first got on the list I was blocked because my ISP's domain was in the SORBS database and imagemagick doesn't post messages from anyone who posts from a domain in SORBS. Actually, I haven't checked recently to see if they're still on SORBS. I'll have a look sometime.


I was able to post once today and then I got SORBS'd also. So I replied to our host's current email address there (<omicron******8@imagemagick.org>). The first message passed successfully (the reply to which lead me here) the next one got me SPAM-canned again.

Rick

Posted: 2006-11-25T10:12:56-07:00
by el_supremo
Another data point to ponder. The project's default configuration is to build a debug version. Changing it to a release version will produce an exe that does not crash.

Pete

Posted: 2006-11-25T11:32:01-07:00
by rmabry
el_supremo wrote: Another data point to ponder. The project's default configuration is to build a debug version. Changing it to a release version will produce an exe that does not crash.

Pete


You're zeroing in.

I watched what showed up in the the debug log file (configure.log) and found that it ran okay until it got to the first instance of

waitdlg.Pumpit();

I commented out the line

Pump();

in Pumpit() and it didn't crash, the log was written and all seems well (in the Debug version).

I don't really know what Pump() does yet...

Rick