News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Crashes on rotating

Started by Colin, May 14, 2009, 11:33:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Colin

Also still getting random crashes especially when rotating the map.
Petty I know but it's frustrating.

Moderator: Split this topic as it did not relate to the topic from which it was split.
I may not agree with what you say, but I will defend to the death your right to say it

Thought for the day

When you are up to your backside in alligators, it is difficult to remind yourself that your initial objective was to drain the swamp.

jamespetts

Colin,

are you sure that this is a problem specific to Simutrans-Experimental? I have not done anything to the code relating to rotation, or the display of objects on the map at all. It would be very surprising if this problem was caused by any of the changes that I have made to other areas of the code.
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.

Dwachs

hello James,

if you introduce new variables in classes like koord, koord3, etc this variables have to be rotated as well. I dont know if this applies to ST-experimental.
Parsley, sage, rosemary, and maggikraut.

jamespetts

I really don't think that I have changed koord or koord3d...
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.

knightly

James,

Just a thought. Maybe Dwachs is saying that, if you use koord or koord3d in your new features (e.g., halts for waiting times), you need to translate those koord or koord3d objects to fit into the new, rotated coordinate plane in karte_t::rotate90().

jamespetts

I don't think that that's what Dwachs is saying, and I'm not sure what sort of use that you imagine here - how would one "rotate", for example, a passing reference to a co-ordinate in a method?
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.

Dwachs

Like Knightly said,

When simutrans rotates a map, everything is rotated. Especially coordinates will change. That is, if you have in your class member variables like koord etc, you have to ensure to rotate these member variables in the rotate function too. That means, after rotation unrotated koords will point to the wrong location.

Parsley, sage, rosemary, and maggikraut.

knightly

Quote from: jamespetts on May 17, 2009, 09:58:51 AM
I don't think that that's what Dwachs is saying, and I'm not sure what sort of use that you imagine here

This is the International Simutrans Forum, and many people are not native English speakers as you do. Thus, when you read other people's posts, you cannot expect everyone to express their point in English as clearly as you do, and sometimes you need to guess what other people actually mean and be patient.

When I expressed to you my understanding of Dwachs's previous post, I did that out of kindness, and I don't think I deserve a rude comment like "what sort of use that you imagine here". Actually, it seems to me that it is you who fail to understand my point, and that is not my fault.


Quote
- how would one "rotate", for example, a passing reference to a co-ordinate in a method?

I haven't read all your ST EXP code, but at least with respect to waiting times, you do record koords for directly reachable halts. You record those halts' koords as a key and record a fixed list of waiting times for those halts, and save these key-data pairs in the hashtables of waiting_times[c]. They are even saved in the save game. So, can you say that you don't need to translate those koords when the map is rotated? I am not saying that this is the cause of Colin's crashes, but at least this is a bug that need to be fixed, and it serves to illustrate Dwachs' point.

jamespetts

Knightly,

I was not intending to be rude - I think that you misunderstand me. I was only stating that I did not really understand what you meant, and that what you wrote did not appear to me to be what Dwachs had meant. Apologies if it came accross the wrong way.

In fact, you are right about the co-ordinate storage for the waiting times lists: I have added a method to rotate those. There were some other rotation issues, too, that I could not trace back to any Simutrans-Experimental specific code, but have put in place work-arounds so that rotation no longer crashes, which will be available in the next release.

Thank you to all those who have helped to track down the problem :-)
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.

Isaac Eiland-Hall

Knightly - I didn't read his phrase as rude -- I think it's a misunderstanding. :)

knightly

Thanks for your explanation, Issac. I am not a native English speaker myself, so I will trust your expert opinion ;). In any case, I am not unhappy anymore after reading James' reply.

James, my apologies for misinterpreting your post. :-[

z9999

Back to the topic, Colin's savegame, (Experimental 3.4.2.sve) which was uploaded before, still crash on rotating in v3.9.

jamespetts

Z9999,

thank you for the report. Hmm, this is a difficult one to track down...
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.

tick tock

James -

I don't know if you've yet determined whether this bug is due to ST Exp or not, but just to let you know, I still experience a crash in v3.10 when trying to rotate the map.  (Actually, the game just freezes up.)  I was able to rotate 180 degrees fine, but now I can't rotate it back at all.  Very disorienting, having to view the map from 180 degrees difference when you've played for hours looking at it from a particular viewpoint.   :D

jamespetts

If you save and reload, can you rotate again?
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.

tick tock


jamespetts

#16
Hmm, sorry that you're having problems. I'm afraid that this one is very hard to track down...
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.

tick tock

At least it's playable.  Thanks for your efforts, is there any more information I can provide that might help?

jamespetts

Can you upload your saved game for diagnostic purposes?
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.

tick tock

#19
Sure.  I used a pak128+pak128.Britain mix in this particular game, but I think you can still open it using pak128.  I tested it that way and it opens fine, but many vehicles/stations are missing or replaced with other versions.  I still experienced the rotation bug though.  (Also, the notes in simuconf say that savegame compatibility is affected by using different catchment values, so if it does make a difference, I use "2" instead of your default "3".)

Save is now uploaded:   http://simutrans-germany.com/files/upload/1907.sve

jamespetts

Tick Tock,

thank you very much for uploading that. I have had another go at fixing the problem in 3.11, which seems to work for your saved game. Could you give it a try? Thank you very much for your testing and reporting.
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.

tick tock

Yes, it seems to work fine now!  Thanks, as always, for the quick response.

jamespetts

Excellent - glad that it works for you :-)
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.