PR# 18578 Pretty printer not working
Problem Report Summary
Submitter: manus_eiffel
Category: EiffelStudio
Priority: Medium
Date: 2013/04/18
Class: Bug
Severity: Serious
Number: 18578
Release: 7.3
Confidential: No
Status: Analyzed
Responsible: ted_eiffel
Environment: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
Synopsis: Pretty printer not working
Description
It only fails when running eweasel test#pretty001. When done manually it works fine. I've fixed this in rev#92459 by protecting the call, however it does not explain why the conversion from UTF_32 to the console encoding fails when it should not fail for our ASCII strings. The exception message is : EILSEQ error in `iconv'. Input conversion stopped due to an input byte that does not belong to the input codeset.: CONVERSION_FAILURE raised ISE Eiffel: Session aborted Exception tag: last_conversion_successful ec: system execution failed. Following is the set of recorded exceptions: ******************************** Thread exception ***************************** In thread Root thread 0x0 (thread id) ******************************************************************************* ------------------------------------------------------------------------------- Class / Object Routine Nature of exception Effect ------------------------------------------------------------------------------- ENCODING last_converted_string_8 @1 last_conversion_successful: <0000000116BBD758> Precondition violated. Fail ------------------------------------------------------------------------------- PRETTY_PRINTER_OUTPUT_STREAM inline-agent#1 of make_file @3 <0000000116BBC9C8> Routine failure. Fail ------------------------------------------------------------------------------- PROCEDURE fast_call <0000000116BBCAA8> Routine failure. Fail ------------------------------------------------------------------------------- PROCEDURE call @5 <0000000116BBCAA8> Routine failure. Fail ------------------------------------------------------------------------------- PRETTY_PRINTER_OUTPUT_STREAM put_string @2 <0000000116BBC9C8> Routine failure. Fail ------------------------------------------------------------------------------- PRETTY_PRINTER print_string @2 <0000000116BBCBA8> Routine failure. Fail ------------------------------------------------------------------------------- PRETTY_PRINTER print_new_line @2 <0000000116BBCBA8> Routine failure. Fail ------------------------------------------------------------------------------- PRETTY_PRINTER process_and_print_eiffel_list @22 <0000000116BBCBA8> Routine failure. Fail ------------------------------------------------------------------------------- PRETTY_PRINTER print_list_indented @3 <0000000116BBCBA8> Routine failure. Fail ------------------------------------------------------------------------------- PRETTY_PRINTER process_indexing_clause_as @4 <0000000116BBCBA8> Routine failure. Fail ------------------------------------------------------------------------------- INDEXING_CLAUSE_AS process @2 <0000000116BB4718> Routine failure. Fail ------------------------------------------------------------------------------- PRETTY_PRINTER safe_process_and_print @6 <0000000116BBCBA8> Routine failure. Fail ------------------------------------------------------------------------------- PRETTY_PRINTER process_class_as @4 <0000000116BBCBA8> Routine failure. Fail ------------------------------------------------------------------------------- CLASS_AS process @2 <0000000116BBC218> Routine failure. Fail ------------------------------------------------------------------------------- E_SHOW_PRETTY generate_output @5 <0000000116BA6A48> Routine failure. Fail ------------------------------------------------------------------------------- E_SHOW_PRETTY print_output_file @11 <0000000116BA6A48> Routine failure. Rescue ------------------------------------------------------------------------------- E_SHOW_PRETTY make_file @6 <0000000116BA6A48> Routine failure. Fail ------------------------------------------------------------------------------- EWB_PRETTY execute @3 <0000000116BA6858> Routine failure. Fail ------------------------------------------------------------------------------- ES_BATCH execute @24 <00000001196AD948> (From ES) Routine failure. Rescue ------------------------------------------------------------------------------- ES_BATCH make @13 <00000001196AD948> (From ES) Routine failure. Fail -------------------------------------------------------------------------------
To Reproduce
Problem Report Interactions
This is anther issue. But indeed the exception is not optimal.
I'm fine with UTF-32 not being supported, but why raising an exception all the time. This happens on Mac OS X and each time we print out something on the console it raises the exception, I think this could cause some slow down.
It is possible in some system, UTF-32 is not supported. But usually UTF-8 is. So in LOCALIZED_PRINTER we give it a second try. Convert to UTF-8 first then to the target encoding.