[fpc-devel] Misterious error

José Mejuto joshyfun at gmail.com
Sat Dec 31 15:52:44 CET 2011

Hello FPC,

Saturday, December 31, 2011, 3:39:59 PM, you wrote:

SG> r19668 affects codegeneration of constructors and custom enumerators, and fixes
SG> http://bugs.freepascal.org/view.php?id=20827
SG> The reported location of crash in your case is likely
SG> unrelated to the actual location of problem. 
SG> At least, function WindowProc from win32callback.inc is not
SG> affected by r19668, as it isn't a 
SG> constructor and doesn't involve exception handling in unmodified form.
SG> If your code contains constructors which use interfaces, I'd
SG> suggest them as the place to look at or 
SG> try to modify.

Reverting this change in r19668, line 700:

            { Constructors need the destroy-on-exception code even if they don't
              use managed variables/temps. }
            //if (cs_implicit_exceptions in current_settings.moduleswitches) and
            //   (is_class(procdef.struct) and (procdef.proctypeoption=potype_constructor)) then
            //  maybe_add_constructor_wrapper(code,true)

Makes everything work fine again. The if..else was added by you in
19668. Maybe a forgotten situation to generate stackframe ?
Best regards,

More information about the fpc-devel mailing list