write_HTML failed because it tried to write in the wrong directory

Bug #902079 reported by Angelo Locritani
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

trunk 6149
calling ./widelands --write_HTML=yes --editor generates the following error:

terminate called after throwing an instance of '_wexception'
  what(): [/home/angelo/widelands/working_tree/src/io/filesystem/disk_filesystem.cc:484] could not open index_it_IT.UTF-8.xhtml (/tribes/barbarians/trainingscamp/index_it_IT.UTF-8.xhtml) for writing

The problem is that it is trying to write in /tribes/barbarians (absolute path) instead of writing in tribes/barbarians (relative path)

this is the backtrace:

#0 0x0012d416 in __kernel_vsyscall ()
#1 0x00508651 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0x0050ba82 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0x0046252f in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/libstdc++.so.6
#4 0x00460465 in ?? () from /usr/lib/libstdc++.so.6
#5 0x004604a2 in std::terminate() () from /usr/lib/libstdc++.so.6
#6 0x004605e1 in __cxa_throw () from /usr/lib/libstdc++.so.6
#7 0x085a3a0f in RealFSImpl::Write (this=0xbfffd1ac, fname=...,
    data=0x995e510, length=30844)
    at /home/angelo/widelands/working_tree/src/io/filesystem/disk_filesystem.cc:484
#8 0x086839a4 in basic_FileWrite<StreamWrite>::Write (this=0xbfffd188,
    fs=..., filename=0x9674b4c "index_it_IT.UTF-8.xhtml")
    at /home/angelo/widelands/working_tree/src/io/basic_filewrite.h:63
#9 0x087baf07 in Widelands::Tribe_Descr::writeHTMLBuildings (this=0x91b0da0,
    directory=...) at /home/angelo/widelands/working_tree/src/writeHTML.cc:255
#10 0x085f0c2f in Tribe_Descr (this=0x91b0da0, tribename=..., egbase=...)
    at /home/angelo/widelands/working_tree/src/logic/tribe.cc:333
#11 0x085d3964 in Widelands::Editor_Game_Base::manually_load_tribe (
    this=0xbfffd90c, tribe=...)
    at /home/angelo/widelands/working_tree/src/logic/editor_game_base.cc:170
#12 0x0848b901 in Editor_Interactive::run_editor (filename=...)
    at /home/angelo/widelands/working_tree/src/editor/editorinteractive.cc:581
#13 0x08470db8 in WLApplication::run (this=0x8ad46c8)
    at /home/angelo/widelands/working_tree/src/wlapplication.cc:340
#14 0x0846f0f9 in main (argc=4, argv=0xbffff484)
    at /home/angelo/widelands/working_tree/src/main.cc:48

Related branches

Revision history for this message
Jens Beyer (qcumber-some) wrote :

Confirmed, happens also for me on trunk.

Changed in widelands:
status: New → Confirmed
Revision history for this message
Jens Beyer (qcumber-some) wrote :

Additional info: happens with WL_PORTABLE=yes and WL_PORTABLE=no, it's not depending on the path settings in config.h

Revision history for this message
SirVer (sirver) wrote :

Is someone really using this help? I am unhappy with it and still suggest ripping it out of the code.

Revision history for this message
Angelo Locritani (alocritani) wrote :

Just in case you decide not to rip it, I found that in code the command constructs documentation have translatable strings:

writeHTML:1153

fw.Text(_("Documentation for program command check_map"));
fw.Text("\">");
fw.Text(_("check_map")); <-- translatable string
fw.Text("</a>");
 if (m_feature) {
 char buffer[32];
 if (m_feature == SEAFARING)
            snprintf(buffer, sizeof(buffer), _("Seafaring"));
        fw.Text(buffer);

I think this is not nice, because documentation should keep the english construct name

Revision history for this message
Angelo Locritani (alocritani) wrote :

fixed in r6279

Changed in widelands:
status: Confirmed → Fix Committed
Changed in widelands:
milestone: none → build17-rc1
Revision history for this message
Astuur (wolfsteinmetz) wrote :

Thanks Angelo for fixing this!

@ SirVer: Not sure for what reason you so cordially dislike it.
But at least while we are working on the ingame help, it is a nice way for quickly looking up and comparing some facts (it's linked!)
in an up-to-date version.

Revision history for this message
Angelo Locritani (alocritani) wrote :

@#6

This was not fixed by me but by Jari Hautio (solving another bug) - I just found that, after his bugfixing, this bug was also solved.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

then thank you ,Jari :)
... and pardon my mistake.

Revision history for this message
SirVer (sirver) wrote :

Released in build17-rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.