Opened 6 years ago

Closed 14 months ago

#2158 closed defect (worksforme)

temporal modules crash wxGUI

Reported by: martinl Owned by: grass-dev@…
Priority: normal Milestone: 7.0.7
Component: Temporal Version: svn-trunk
Keywords: Cc:
CPU: Unspecified Platform: All

Description

Launching any temporal module from wxGUI causes GUI crash.

D1/1: Start messenger server
D1/1: Inititate the temporal database
D1/1: SQLDatabaseInterfaceConnection constructor
D1/1: Start C-interface server

GRASS_INFO_MESSAGE(22113,1): ERROR: Unsupported temporal database. Version mismatch.

GRASS_INFO_MESSAGE(22113,1): Supported temporal database version is: 2
GRASS_INFO_END(22113,1)
D1/1: Stop messenger server
D1/1: Stop C-interface server

Change History (18)

comment:1 Changed 6 years ago by huhabla

This is related to an incompatible version of the temporal database. You need to delete your temporal database. A new one will be created if any temporal module is called.

However, the GUI should not crash if a fatal error was invoked in a temporal module. I have updated the temporal framework to support the raise of a grass.pygrass.messenger.FatalError exception in case a module calls fatal() in the messenger interface.

The error behavior can be set using grass.temporal.set_raise_on_error(True) in the temporal framework. In addition, the raise on error setting of the Python script library will be inherited if the temporal init() function is called. Hence, a grass.pygrass.messenger.FatalError exception will be raised instead of calling sys.exit() in case of a fatal error, if the grass.script.set_raise_on_error(True) was called first and after that grass.temporal.init().

I made the version mismatch error message more descriptive, so that the chosen SQL database and the path/database string will be printed as well.

Changes were made in r58652 and r58653.

Does the GUI still crashes?

comment:2 in reply to:  1 ; Changed 6 years ago by martinl

Replying to huhabla:

Changes were made in r58652 and r58653.

Does the GUI still crashes?

Unfortunately still crashes.

D1/5: grass.script.core.start_command(): t.connect -c
D2/5: G_file_name(): path = /opt/grassdata/zod/landamar-2000
D1/5: grass.script.core.start_command(): t.connect -pg
D2/5: G_file_name(): path = /opt/grassdata/zod/landamar-2000
D1/5: grass.script.core.start_command(): g.gisenv -n
D1/5: grass.script.core.start_command(): g.gisenv -n
D1/5: Start messenger server
D1/5: Inititate the temporal database
D1/5: SQLDatabaseInterfaceConnection constructor
D1/5: Start C-interface server
D1/5: SQLDatabaseInterfaceConnection constructor

GRASS_INFO_MESSAGE(30370,1): ERROR: Unsupported temporal database. Version mismatch.

GRASS_INFO_MESSAGE(30370,1): Supported temporal database version is: 2

GRASS_INFO_MESSAGE(30370,1): Please remove your old temporal database. 

GRASS_INFO_MESSAGE(30370,1): A new one will be created automatically.

GRASS_INFO_MESSAGE(30370,1): Current temporal database info:

GRASS_INFO_MESSAGE(30370,1): DBMI interface:..... sqlite3

GRASS_INFO_MESSAGE(30370,1): Temporal database:.. /opt/grassdata/zod/PERMANENT/tgis/sqlite.db
GRASS_INFO_END(30370,1)
D1/5: Stop messenger server
D1/5: Stop C-interface server

comment:3 in reply to:  2 ; Changed 6 years ago by huhabla

Replying to martinl:

Replying to huhabla:

Changes were made in r58652 and r58653.

Does the GUI still crashes?

Unfortunately still crashes.

[snip]

Nooooooooooooooo ... .

I only tested this with g.gui.animation. Can you please point me to a documentation howto put the temporal modules into the GUI and to the GUI code that starts the temporal modules from the GUI, so that i can test it better and fix it?

comment:4 in reply to:  3 Changed 6 years ago by martinl

Replying to huhabla:

I only tested this with g.gui.animation. Can you please point me to a documentation howto put the temporal modules into the GUI and to the GUI code that starts the temporal modules from the GUI, so that i can test it better and fix it?

I just went to 'Search modules' tab in Layer Manager and chose any module from 'Temporal' section.

comment:5 Changed 6 years ago by huhabla

Should be fixed in r58673, please test.

comment:6 in reply to:  5 Changed 6 years ago by martinl

Resolution: fixed
Status: newclosed

Replying to huhabla:

Should be fixed in r58673, please test.

confirmed, thanks for quick fix! Closing the ticket.

comment:7 Changed 6 years ago by wenzeslaus

What about the message itself?

GRASS_INFO_MESSAGE(30370,1): ERROR: Unsupported temporal database. Version mismatch.

GRASS_INFO_MESSAGE(30370,1): Supported temporal database version is: 2

GRASS_INFO_MESSAGE(30370,1): Please remove your old temporal database. 

GRASS_INFO_MESSAGE(30370,1): A new one will be created automatically.

GRASS_INFO_MESSAGE(30370,1): Current temporal database info:
...

Sentences Please remove your old temporal database. A new one will be created automatically. could seem that you just remove the old file and the new one will be created. It isn't that simple, you will loose your temporal data. This detail should be mentioned in the message.

Shouldn't the message say something like Please backup and then remove your old temporal database.? Maybe with some suggestion how to backup. Or do you have some other idea, how to deal with this?

comment:8 Changed 6 years ago by neteler

Resolution: fixed
Status: closedreopened

comment:9 in reply to:  7 Changed 6 years ago by neteler

Platform: LinuxAll

(reopened to get the message issue solved)

Replying to wenzeslaus: ...

Shouldn't the message say something like Please backup and then remove your old temporal database.? Maybe with some suggestion how to backup. Or do you have some other idea, how to deal with this?

The improved message should include the full path to the file which also gives a hint at backing it up. Alternative: rename the old V2 file to file_tgrass_v2.db or similar in order to keep it but unblock the situation.

comment:10 Changed 6 years ago by wenzeslaus

Message added in r58952. But it seems that it is not translatable (_("...")).

comment:11 in reply to:  10 Changed 6 years ago by neteler

Replying to wenzeslaus:

Message added in r58952. But it seems that it is not translatable (_("...")).

IMHO the message in line 564 etc ("backup_howto = ...") is way to long and should simply point to a link to the manual where the procedure is clearly explained (also typo: grass version -> GRASS GRASS 7 version).

comment:12 Changed 4 years ago by martinl

Milestone: 7.0.07.0.5

comment:13 Changed 3 years ago by martinl

Last comment is 3 years old, still the issue?

comment:14 Changed 3 years ago by neteler

Milestone: 7.0.57.0.6

comment:15 Changed 21 months ago by neteler

Milestone: 7.0.67.0.7

comment:16 Changed 21 months ago by veroandreo

last comment was 4 years ago, can we close this?

comment:17 Changed 14 months ago by lucadelu

I take the freedom to close it, please reopen if needed

comment:18 Changed 14 months ago by martinl

Resolution: worksforme
Status: reopenedclosed
Note: See TracTickets for help on using tickets.