Configure crashes with assertion failure

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Configure crashes with assertion failure

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post 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.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

We posted your message to magick-users. Thanks for the patch.
User avatar
rmabry
Posts: 148
Joined: 2004-04-13T11:25:27-07:00

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post 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.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Post 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
User avatar
rmabry
Posts: 148
Joined: 2004-04-13T11:25:27-07:00

Post 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
User avatar
rmabry
Posts: 148
Joined: 2004-04-13T11:25:27-07:00

Post 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
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Post 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
User avatar
rmabry
Posts: 148
Joined: 2004-04-13T11:25:27-07:00

Post 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
Post Reply