Permanently deleting a page containing an invalid advanced query from the recycle bin causes the graph to crash

Abierto
#1,517 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

  • #14000 de @tiensonqin — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Área
database

Línea de trabajo

Start by reproducing the crash with the incomplete advanced query ({} or { :query [] }) in a DB graph, then deleting that page from the Recycle bin. The payload names no files or tests, so locate the recycle-bin permanent-delete path and find where it loads or renders the page's blocks. Done means permanent deletion succeeds without the graph crashing, and a regression test covers deleting a page that holds an invalid advanced query.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Search first
  • I searched and no similar issues were found
What Happened?

I encountered this issue when trying to permanently delete a problematic page (loading the page causes the graph to crash) from the Recycle bin since I wanted to reuse the old name without logseq automatically repopulating the newly created page with the problematic contents.

The page in question contained an incomplete advanced query that causes the graph to crash whenever the page is opened (see my comment on the related issue )

Reproduce the Bug
  1. Create a DB graph (happens on an existing one too)
  2. create a new page and add an 'Advanced query" to a block inside it
  3. Inside the code block for the query type either of the following: {} or { :query [] } and click onto an empty block
  4. Observe the graph crashing with the "Something went wrong" page requiring a restart.
  5. Delete the page with the problematic query, sending it to the 'Recycle' as Logseq calls it.
  6. Delete the page from the Recycling bin.
  7. Observe the graph crashing with the "Something went wrong" page requiring a restart.
  8. Upon restart the page is deleted and the graph works perfectly.
Expected Behavior

A deleted page (that causes a graph to crash) is deleted and subsequently moved to the "Recycle" as Logseq calls it, should be deletable form the recycling bin without it being loaded in such a way as to cause a crash.

Screenshots
Image

Example of an advanced query code body that casues the crash the moment I click of of the query.

Desktop or Mobile Platform Information

EDIT: App version: 2.0.2
OS: Fedora Linux 44
Desktop Environment: KDE version 6.8.2

CPU: Intel® Core™ i7-10700K
GPU: AMD Radeon RX 6700 XT

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.
  • I'm willing to submit a PR (Thank you!)
Lenguaje dominante
Sin datos de lenguaje
Estrellas
29
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de logseq/db-test

Todos los issues de logseq/db-test

Issues similares

Más issues de Databases

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.