Skip to content

Conversation

@Davidy22
Copy link

@Davidy22 Davidy22 commented Sep 17, 2023

Decorators don't exist, but annotations look like them and can use their style.

Change is identical to the one given by rdipardio in geany#3441 (comment), my aesthetic blindness missed the results of missing this line.

Recent news in unity land reminded me that I had an notification ping that I left for too long that I needed to get back to. From the conversation it seemed like we'd prefer to have this folded into the scintilla update instead of being part of the main geany PR queue.

Decorators don't exist, but annotations use their style
@kugel- kugel- force-pushed the scintilla branch 2 times, most recently from 75d528d to 35b244b Compare October 4, 2023 20:42
kugel- pushed a commit that referenced this pull request Oct 2, 2024
When Geany is opened with no open document, the following warning
appears:
```
(geany:1735619): Geany-CRITICAL **: 10:49:58.729: document_get_notebook_child: assertion 'doc != NULL' failed
```

The corresponding stack trace when using `--g-fatal-warnings` is:
```
#5  0x0000fffff7c232c8 in document_get_notebook_child (doc=<optimized out>)
    at document.c:269
#6  0x0000fffff7c24140 in document_get_notebook_page (doc=<optimized out>)
    at document.c:291
#7  0x0000fffff7c25198 in document_show_tab (doc=0x0) at document.c:1269
#8  0x0000fffff7c4b24c in configuration_open_files
    (session_files=<optimized out>) at keyfile.c:1390
geany#9  0x0000fffff7c4b354 in configuration_open_default_session ()
    at keyfile.c:1404
geany#10 0x0000fffff7c4dfb0 in load_startup_files (argv=0xffffffffeef8, argc=1)
    at libmain.c:987
```

This patch fixes that.
kugel- pushed a commit that referenced this pull request Oct 2, 2024
The check `page_num >= documents_array->len` isn't correct as
`documents_array->len` isn't the number of open documents. This array
never shrinks and closed documents are only marked as invalid.

Without this patch, when closing a Geany project and the default session
doesn't contain any document, the following warning appears:
```
(geany:1740553): Geany-CRITICAL **: 11:02:39.105: document_get_from_notebook_child: assertion 'GTK_IS_BOX(page)' failed
```

The corresponding stack trace when using `--g-fatal-warnings` is:
```
#5  0x0000fffff7c241d0 in document_get_from_notebook_child
    (page=<optimized out>) at document.c:335
#6  0x0000fffff7c242a4 in document_get_from_page (page_num=<optimized out>)
    at document.c:361
#7  0x0000fffff7c4b248 in configuration_open_files
    (session_files=<optimized out>) at keyfile.c:1390
#8  0x0000fffff7c4b354 in configuration_open_default_session ()
    at keyfile.c:1404
geany#9  0x0000fffff7c5e430 in destroy_project (open_default=1) at project.c:480
geany#10 0x0000fffff7c5e4d8 in project_close (open_default=1) at project.c:435
```

This patch fixes that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant