Opened 11 years ago

Closed 6 years 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 by huhabla, 11 years ago

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?

in reply to:  1 ; comment:2 by martinl, 11 years ago

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

in reply to:  2 ; comment:3 by huhabla, 11 years ago

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?

in reply to:  3 comment:4 by martinl, 11 years ago

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 by huhabla, 11 years ago

Should be fixed in r58673, please test.

in reply to:  5 comment:6 by martinl, 11 years ago

Resolution: fixed
Status: newclosed

Replying to huhabla:

Should be fixed in r58673, please test.

confirmed, thanks for quick fix! Closing the ticket.

comment:7 by wenzeslaus, 11 years ago

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 by neteler, 11 years ago

Resolution: fixed
Status: closedreopened

in reply to:  7 comment:9 by neteler, 11 years ago

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 by wenzeslaus, 11 years ago

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

in reply to:  10 comment:11 by neteler, 11 years ago

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 by martinl, 9 years ago

Milestone: 7.0.07.0.5

comment:13 by martinl, 8 years ago

Last comment is 3 years old, still the issue?

comment:14 by neteler, 8 years ago

Milestone: 7.0.57.0.6

comment:15 by neteler, 7 years ago

Milestone: 7.0.67.0.7

comment:16 by veroandreo, 7 years ago

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

comment:17 by lucadelu, 6 years ago

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

comment:18 by martinl, 6 years ago

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