Info Editor prints python errors upside down. #73578

Closed
opened 2020-02-04 11:15:17 +01:00 by tintwotin · 14 comments

System Information
Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: Intel(R) UHD Graphics 600 Intel 4.5.0 - Build 26.20.100.7262

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-20 14:27, hash: blender/blender@26bd5ebd42
Worked: (optional)

Short description of error
Python errors in the Info Editor are printed upside down.
image.png

Exact steps for others to reproduce the error

  • Load a python template.
  • Make an indentation error.

Notice the line order is upside down(compared to the system console) and making the ^ point at nothing:

**System Information** Operating system: Windows-10-10.0.17763 64 Bits Graphics card: Intel(R) UHD Graphics 600 Intel 4.5.0 - Build 26.20.100.7262 **Blender Version** Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-20 14:27, hash: `blender/blender@26bd5ebd42` Worked: (optional) **Short description of error** Python errors in the Info Editor are printed upside down. ![image.png](https://archive.blender.org/developer/F8320507/image.png) **Exact steps for others to reproduce the error** - Load a python template. - Make an indentation error. Notice the line order is upside down(compared to the system console) and making the ^ point at nothing:
Author

Added subscriber: @tintwotin

Added subscriber: @tintwotin
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Indeed. And this actually seems to be the case since forever. I could also reproduce with 2.74. That means it doesn't qualify as bug though.

Indeed. And this actually seems to be the case since forever. I could also reproduce with 2.74. That means it doesn't qualify as bug though.
Member

So looking into this, apparently this is very intentional. I guess the reason is that the info editor used to be placed at the upper screen edge. So dragging it down was supposed to show the most recent messages, with the main error line first. You would scroll up or increase the area size further to see the details.

Obviously this doesn't hold up well when the editor is used differently.
To address that, console_draw_string() will have to be reworked a bit. Actually, the console handles this case fine, even though it uses most of the same or similar code. Not sure what the difference is, but I can't spend much time on this right now.

So looking into this, apparently this is very intentional. I guess the reason is that the info editor used to be placed at the upper screen edge. So dragging it down was supposed to show the most recent messages, with the main error line first. You would scroll up or increase the area size further to see the details. Obviously this doesn't hold up well when the editor is used differently. To address that, `console_draw_string()` will have to be reworked a bit. Actually, the console handles this case fine, even though it uses most of the same or similar code. Not sure what the difference is, but I can't spend much time on this right now.
Author

This is the same error message in 2.83 with far too many icons and far too wide line distance imo.
image.png

This is the same error message in 2.83 with far too many icons and far too wide line distance imo. ![image.png](https://archive.blender.org/developer/F8320641/image.png)

Added subscribers: @Harley, @brecht

Added subscribers: @Harley, @brecht

I think the solution is to have a multiline message here, with a single icon. Then it can be printed in the right order and without excessive line distance.

I think the solution is to have a multiline message here, with a single icon. Then it can be printed in the right order and without excessive line distance.
Member

Why should we have this on the 2.83 board as a bug? The reported issue exists since a long time (since 2.5?). Would of course be nice to improve the multi-line drawing (e.g. removing the duplicated icons) but that's not what this report is about, and it's certainly not a bug.

Why should we have this on the 2.83 board as a bug? The reported issue exists since a long time (since 2.5?). Would of course be nice to improve the multi-line drawing (e.g. removing the duplicated icons) but that's not what this report is about, and it's certainly not a bug.

The excessive line distance is a regression. I don't think it's a showstopper, but still worth looking at before the release.

We could put that in a separate report, but if there is a single solution to both problems it seems pointless.

The excessive line distance is a regression. I don't think it's a showstopper, but still worth looking at before the release. We could put that in a separate report, but if there is a single solution to both problems it seems pointless.
Member

Info Editor is just dealing with each report entry, in order. This looks like seven separate reports, in the wrong order, with some that are blank. Can we not massage that python error as the report is made, so it is one entry? Otherwise not sure how we’d improve this, except for ignoring blank ones.

Of course I might just be thinking about it wrong. No surprise there. LOL

Info Editor is just dealing with each report entry, in order. This looks like seven separate reports, in the wrong order, with some that are blank. Can we not massage that python error as the report is made, so it is one entry? Otherwise not sure how we’d improve this, except for ignoring blank ones. Of course I might just be thinking about it wrong. No surprise there. LOL

Can we not massage that python error as the report is made, so it is one entry?

@Harley, yes, it may well be that simple.

> Can we not massage that python error as the report is made, so it is one entry? @Harley, yes, it may well be that simple.
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Julian Eisel self-assigned this 2020-04-20 01:37:17 +02:00
Member

This was addressed with blender/blender@df032580c1.

This was addressed with blender/blender@df032580c1.
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#73578
No description provided.