#2858 closed defect (fixed)
[PATCH] Error: Failed to load image from file "ICON_ScenarioEditor"
Reported by: | StanW | Owned by: | njm |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 18 |
Component: | Atlas editor | Keywords: | ICON_ScenarioEditor patch |
Cc: | Patch: |
Description
When I try to open/save as any file in the Scenario Editor, I get the following message (with timestamp):
12:37:57: can't open file 'ICON_ScenarioEditor' (error 2: No such file or directory) 12:37:57: Failed to load image from file "ICON_ScenarioEditor".
I am running fresh install of Linux Mint 17 on a Dell D820 This error was also in versions 15, 16, and 16 build Oct 2, 2014 (15829 development). The error was also before the fresh install.
I verified the file path for "tools/atlas/icons/ScenarioEditor.ico"
0AD run fine, only the Scenario Editor throwing errors.
Thanks, Stan
Attachments (2)
Change History (18)
by , 10 years ago
Attachment: | ScenarioEditor.png added |
---|
comment:2 by , 10 years ago
I ran wx-config --version and I got:
The program 'wx-config' can be found in the following packages:
- libwxbase2.8-dbg
- libwxbase2.8-dev
- libwxbase3.0-dev
- libwxgtk2.8-dbg
- libwxgtk2.8-dev
- libwxgtk3.0-dev
For kicks, I Installed: libwxbase2.8-dev, libwxgtk2.8-dev, wx2.8-headers, and reinstalled 0AD but it did not fix the issue
I also forgot to mention that the editor crashes/locks up with the error and then I have to kill it manually.
Thanks, Stan
comment:4 by , 10 years ago
Please explain, "clean the workspaces..." I'm not sure I understand. Thanks, Stan
follow-up: 11 comment:5 by , 10 years ago
This error appears in the dialog but not in the ScenarioEditor, because there is a platform dependent handling for this icon in the main frame, but not in the MapDialog. ScenarioEditor.cpp:
#if defined(__WXMSW__) SetIcon(wxIcon(_T("ICON_ScenarioEditor"))); // load from atlas.rc #else { const wxString relativePath (_T("tools/atlas/icons/ScenarioEditor.ico")); wxFileName filename (relativePath, wxPATH_UNIX); filename.MakeAbsolute(Datafile::GetDataDirectory()); SetIcon(wxIcon(filename.GetFullPath(), wxBITMAP_TYPE_ICO)); } #endif
Some questions:
- Is it really necessary to load the icon in the MapDialog or is it inherited from the main frame?
- Is this platform dependent handling necessary or can this be solved by compiling with different versions of wxWidgets?
by , 10 years ago
Attachment: | ScenarioEditorDialogsIcon.patch added |
---|
njm's first patch for the error that says that ICON_ScenarioEditor could not be loaded.
comment:6 by , 10 years ago
Keywords: | review patch added |
---|---|
Milestone: | Backlog → Alpha 17 |
Owner: | set to |
Summary: | Error: Failed to load image from file "ICON_ScenarioEditor" → [PATCH] Error: Failed to load image from file "ICON_ScenarioEditor" |
comment:7 by , 10 years ago
I compiled under Kubuntu 14.04 with wxWidgets 3.0.2 that got released on 2014-10-06. This is my very first patch. :-)
follow-up: 12 comment:8 by , 10 years ago
Milestone: | Alpha 17 → Alpha 18 |
---|
comment:10 by , 10 years ago
Replying to agentx:
Great, does the colorpicker work too?
The icon of the colorpicker is not yet shown. If wished for, I'll also do it at this ticket here.
follow-up: 14 comment:11 by , 10 years ago
Replying to njm:
This error appears in the dialog but not in the ScenarioEditor, because there is a platform dependent handling for this icon in the main frame, but not in the MapDialog.
That was a mistake on my part, I don't even remember encountering that code, so perhaps I wanted something to work quickly and forget to change it after testing. It certainly wasn't intentional.
follow-up: 13 comment:12 by , 10 years ago
Replying to njm: Does this mean that if I want the fix that I need to compile now or wait until Alpha 18?
comment:13 by , 10 years ago
comment:14 by , 10 years ago
Replying to historic_bruno:
Replying to njm:
This error appears in the dialog but not in the ScenarioEditor, because there is a platform dependent handling for this icon in the main frame, but not in the MapDialog.
That was a mistake on my part, I don't even remember encountering that code, so perhaps I wanted something to work quickly and forget to change it after testing. It certainly wasn't intentional.
Is atlas mostly your work? Thanks for that! :-)
comment:16 by , 10 years ago
Keywords: | review removed |
---|
Thanks for the patch. I didn't like having to call SetIcon on each instance of the dialog, so I made it a required constructor parameter instead.
At least on Windows, only the standard file open/save dialogs use the app icon, so I wouldn't worry about the other dialogs in Atlas.
I had that too on Ubuntu Gnome A16/A17SVN, but it's gone since recompilation with wxWidgets 2.8. related: http://trac.wildfiregames.com/ticket/2805
There seems to be a race condition, because if the open/save dialog appears in front of the crash dialog the editor remains usable.