Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

SyntaxEdit "A call to an OS function failed." error message

A user reported this error message. It must have been in the component for a LONG time.

I was able to reproduce it in the SyntaxEdit demo. It seems to only happen when word wrap is OFF (at least in my application) and there is one or more very long lines (like over 10,000 characters).


Then view the page source, copy it to the clipboard, and then into SyntaxEdit with word wrap off. I suspect you will see the error message.

Can you fix?

Thanks.
Tagged:

Comments

  • 6 Comments sorted by Votes Date Added
  • I cannot connect to https://www.fibt.com (name not resolved or other errors occures). Can you please attach the file here?
  • Interesting... maybe they are blocking.

    Please try this:
  • The file contains a line of 47000 chars. Even WinAPI function rejects to handle it. Actually, I can't imagine what can be done here.
  • edited September 24 Posts: 193Vote Up0Vote Down
    Yes, it is a ridiculously long line, but some websites remove line breaks to minimize the size, and other editors don't throw up error messages and will handle it just fine. There's got to be something you can do otherwise someone may think my software is crap if they get this failure/error message especially if it is shown over and over and they can't use the software.

    Hopefully you can do something? Even turning on word wrap automatically would be better than showing this failure/error message (if you do that then maybe call an event function?). Sometimes the message is shown over and over making it difficult or impossible to effectively use my software.

    Thanks.

  • We disscussed this previously long time ago. As I proposed, you can implement a fast scan of the file before opening it in the editor. And if it contains long lines then you can insert line breaks or simply truncate lines with some warning dialog for the user. Like in Delphi:

    image
    png
    png
    изображение_2024-09-24_160613497.png
    3K
  • edited September 25 Posts: 193Vote Up0Vote Down
    I thought this may have come up before... my memory is not the best so I did not remember details.

    But I am not happy/satisfied with those solutions. I would be upset if an editor did such things (like truncating lines)... and I wouldn't think it was a very good editor.

    And at exactly at what point does a line become 'too long' and cause this error? Do you know?

    Thanks.

Sign In or Register to comment.