News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

CTD with Click on the minimap

Started by wernieman, May 31, 2009, 12:24:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wernieman

Hey,

with this Savegame:
http://simutrans-germany.com/files/upload/Test 62.sve
I get a Problem when I Click on the button, how open the Minimap
Then the Minimap don't show, the game CTD

Simutrans Version (Testet): 2493/2489
PAK: Clean PAK 64, rev 155

Could the Game be rescue?

Werner
I hope you understand my English

jamespetts

That's odd - it works fine for me.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

wernieman

Wich simutransversion?

Edit:
When I open it 3-4x, at now it "only" CDT in 10-20%
I hope you understand my English

jamespetts

I was using the latest version of Simutrans-Experimental (3.14).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

whoami

I tried with ST-main r2489 Windows-SDL with Pak64 r155, and haven't seen a crash with this savegame yet.

I see that there are no trees outside of a rectangular area of the map. Have you used the map resizer?

wernieman

After loading the Game you must Try it  .. not waiting a little time ...

make some test and so I see, when you wait a little bit and scroll a little bit, you can open it without a problem.

But when you load an open without waiting/scrolling, it cashed.

I think there is a variable not set at loading .. but after a little time ..
I hope you understand my English

z9999

Default view of minimap is different for each person. It is saved in settings.xml.
It crashed only when default view is something related station - e.g. Passengers, Stop status, Origin etc..

How to reproduce:
1. Start simutrans
2. Open minimap and click "Passengers"
3. Load Test 62.sve
4. Open minimap as fast as possible

Result:
Crash

wernieman

O.K. .. If have Aktivate " Waiting" ...
I hope you understand my English

whoami

With the button "passengers" being pressed in the minimap, I can reproduce the crash, also in r2502.

Quote from: whoami on June 04, 2009, 08:37:23 PM
I see that there are no trees outside of a rectangular area of the map. Have you used the map resizer?
What about this? The reason for the crash might be related to map resizing, if it happened. Rotation, esp. in combination with resizing, is another thing to check.

wernieman

I rezise the Map. I don't know if I rotate the map.

What I dont understand:
If you wait a litte, after loading, you could open the game, so it could be a Problem of a not initialized variable
I hope you understand my English

wernieman

I check it with older savegames. After resizing I don't have the Problem. I get it with "newer" savegames .... but a this Moment there was the rezising a "little big" old. It only could a Problem of rotating
I hope you understand my English

Dwachs

I could not reproduce this bug inside a debugger (Visual Studio) :/ Can anyone try with gdb and provide a back-trace?
Parsley, sage, rosemary, and maggikraut.

z9999

Not so useful, sorry.
calc_map is not yet called and relief is NULL ?

Quote
Program received signal SIGSEGV, Segmentation fault.
0x00613344 in array2d_tpl<unsigned char>::get_width() const (this=0x5b80a1)
    at gui/../tpl/array2d_tpl.h:44
44                      return w;
Current language:  auto; currently c++
(gdb) bt
#0  0x00613344 in array2d_tpl<unsigned char>::get_width() const (this=0x5b80a1)
    at gui/../tpl/array2d_tpl.h:44

Quote
sim.exe caused an Access Violation at location 00613424 in module sim.exe Reading from location 00000004.

Registers:
eax=00000000 ebx=0000002d ecx=0023e8b4 edx=00000032 esi=01c9e844 edi=da0ce78e
eip=00613424 esp=0023e87c ebp=0023fa18 iopl=0         nv up ei pl nz ac po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000216

Call stack:
00613424  sim.exe:00613424  array2d_tpl<unsigned char>::get_width() const  array2d_tpl.h:44
   ...
   
   unsigned int get_width() const {
>   return w;
   }
   
   ...

005B8181  sim.exe:005B8181  WinMain  simsys_w16.cc:774
00401247  sim.exe:00401247
00401298  sim.exe:00401298
7C817077  kernel32.dll:7C817077  RegisterWaitForInputIdle

z9999

#13
I don't know this is  a correct patch or not. Please test it.

[EDIT]
Replace the patch


diff --git a/gui/karte.cc b/gui/karte.cc
index 66468a4..4713043 100644
--- a/gui/karte.cc
+++ b/gui/karte.cc
@@ -586,6 +586,7 @@ void reliefkarte_t::calc_map()
cur_off = new_off;
cur_size = new_size;
needs_redraw = false;
+ is_visible = true;

// redraw the map
if(  !rotate45  ) {
@@ -707,7 +708,7 @@ void reliefkarte_t::set_welt(karte_t *welt)
}
rotate45 = false;
needs_redraw = true;
-// is_visible = false;
+ is_visible = false;

if(welt) {
calc_map_groesse();
diff --git a/gui/map_frame.cc b/gui/map_frame.cc
index d7e5f79..881be4c 100644
--- a/gui/map_frame.cc
+++ b/gui/map_frame.cc
@@ -290,7 +290,6 @@ void map_frame_t::infowin_event(const event_t *ev)
{
if(ev->ev_class == INFOWIN) {
if(ev->ev_code == WIN_OPEN) {
- reliefkarte_t::get_karte()->is_visible = true;
reliefkarte_t::get_karte()->set_xy_offset_size( koord(0,0), koord(0,0) );
}
else if(ev->ev_code == WIN_CLOSE) {
--
1.6.3.msysgit.0