Elvas Tower: Significant differences between SVN builds and automatic builds? - Elvas Tower

Jump to content

  • 7 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Significant differences between SVN builds and automatic builds? Rate Topic: -----

#11 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 12 April 2014 - 01:36 PM

Carlo,

I think if
var xd = (x.XNAMatrix.Translation - XNAViewerPos).Length() - x.RenderPrimitive.SortIndex;

fails, then the most possible cause is that x.RenderPrimitive is null, or something similar.

#12 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,999
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 12 April 2014 - 02:13 PM

This is what I have traced after the exception:
arning: Exception message = IComparer (o i metodi IComparable su cui questo si basa) non ha restituito zero quando Array.Sort ha chiamato x.CompareTo(x).  x: ''. Tipo di x: 'RenderItem'. IComparer: 'ORTS.Viewer3D.RenderItem+Comparer'.

Warning: sequenceMaterial.Key = EmptyMaterial, sequenceMaterial.Value.Count = 4, renderItemComparer.XNAViewerPos = {X:-566,4696 Y:562,159 Z:46,89798}

Warning: sequenceMaterial.Value[0].Material = SceneryMaterial(c:\saveroutes\train simulator bernina\trains\trainset\rhb_ew_iv\\pass_glas.ace:00000005:0) ,  sequenceMaterial.Value[0].RenderPrimitive.SortIndex = 21, sequenceMaterial.Value[0].XNAMatrix.Translation = {X:-565,4244 Y:562,8322 Z:50,28863}

Warning: sequenceMaterial.Value[1].Material = SceneryMaterial(c:\saveroutes\train simulator bernina\trains\trainset\rhb_ew_iv\\pass_glas.ace:00000005:0) ,  sequenceMaterial.Value[1].RenderPrimitive.SortIndex = 19, sequenceMaterial.Value[1].XNAMatrix.Translation = {X:-567,3919 Y:562,8322 Z:47,30493}

Warning: sequenceMaterial.Value[2].Material = SceneryMaterial(c:\saveroutes\train simulator bernina\trains\trainset\rhb_ew_iv\\pass_glas.ace:00000005:0) ,  sequenceMaterial.Value[2].RenderPrimitive.SortIndex = 20, sequenceMaterial.Value[2].XNAMatrix.Translation = {X:-566,4082 Y:562,8322 Z:48,79678}

Warning: sequenceMaterial.Value[3].Material = SceneryMaterial(c:\saveroutes\train simulator bernina\trains\trainset\rhb_ew_iv\\pass_glas.ace:00000005:0) ,  sequenceMaterial.Value[3].RenderPrimitive.SortIndex = 22, sequenceMaterial.Value[3].XNAMatrix.Translation = {X:-565,4244 Y:562,8322 Z:50,28863}


I don't see strange things, apart from the fact that the position of the first and the last object is the same.
This is the full log
Attached File  OpenRailsLog_sort.zip (3.5K)
Number of downloads: 309

I have made a basic and working proposal for solution. I don't have other ones and give up.

PS: Peter, I have seen now your hint, thank you very much. However, looking at the data I have collected, that does not seem the case.

#13 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,490
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 13 April 2014 - 01:01 AM

View PostCsantucci, on 12 April 2014 - 02:13 PM, said:

I don't see strange things, apart from the fact that the position of the first and the last object is the same.


That is exactly why we have the SortIndex, to ensure such items are always drawn in the correct order. :sign_thanks:

#14 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,999
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 13 April 2014 - 01:09 AM

This patch here avoids the crash and uses the original comparing algorithm. The comparison has only been compacted. I hope it can be accepted
Attached File  RenderFrame.cs.patch.zip (406bytes)
Number of downloads: 294

#15 User is offline   gpz 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,772
  • Joined: 27-October 12
  • Gender:Male
  • Location:Budapest
  • Simulator:OpenRails
  • Country:

Posted 13 April 2014 - 02:20 AM

:) Interesting! This is the evil in the machine. :)
(I'm just wondering if the Math.Sign() is necessary there. I think it can be removed to save a couple of CPU instructions, since for compare it doesn't matter if the result is e.g. 1 or 8526. No need to normalize.)

#16 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,999
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 13 April 2014 - 08:19 AM

Yes, I really think I found something a bit evil :) ; referring to Math.Sign() I tried to remove it, but the fact is that the result must be an integer, else C# complains. So I think it's faster to derive a sign than to make a conversion, and therefore I would leave the Math.Sign().

#17 Inactive_fastlars_*

  • Group: Status: Passengers (Obsolete)

Posted 13 April 2014 - 09:30 AM

Hey Csantucci!

That patch looks interesting. Maybe that's really the solution for the crash down series on most german routes. The SVN builds were the only ones that worked here properly, now unavailable...
Since most of us are not that deeply involved as you guys are, could you give us a brief explanation how to use the patch?

Greeting from Germany!

fastlars

#18 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,999
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 13 April 2014 - 11:12 AM

Hello fastlars,
my patch can make miracles, however, before explaining how to use the patch, I attach here a runactivity.exe related to release 2176 and patched with the above patch. Check it by replacing the runactivity.exe you have, and if your problem is solved, we can go some step further :)
Attached File  RunActivity.zip (512.93K)
Number of downloads: 308

#19 Inactive_fastlars_*

  • Group: Status: Passengers (Obsolete)

Posted 13 April 2014 - 12:55 PM

@ Csantucci:

Yap, that's it...

I just downloaded latest build (X2177). I tried that one first without any changes and I got, as expected, the Crash. Just made a qick check on 2 different routes (ICE H-B V3 and HTB), as I have 2 certain "Test"-Locations there.

Then I took your runactivity.exe into the programm Folder, but same result as above. Next step: I deleted the runactivityLAA.exe. Now it works, no crash !!
Further step: I copied the original runactivity.exe from X2177 back to the programm Folder (overwriting yours) but kept the runactivtyLAA.exe out of it. Result: Crash!
Last test: Yours back in the Folder (overwriting original): works fine!

Conclusion: Your edited Version works fine without runactivityLAA.exe in the folder.

Hope that helps to step ahead...

Cheers
fastlars

#20 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,490
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 13 April 2014 - 12:59 PM

View Postfastlars, on 13 April 2014 - 12:55 PM, said:

Conclusion: Your edited Version works fine without runactivityLAA.exe in the folder.


I suspect you've enabled the "Use large address aware binaries" option, which causes RunActivityLAA to be preferred to RunActivity, confusing your testing.

  • 7 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users