The Skyscraper Simulator Forum

General Category => Download Skyscraper Simulator => Topic started by: eventhorizon on September 27, 2024, 11:30:00 am

Title: Re: New build: 9/27/24 build
Post by: eventhorizon on September 28, 2024, 10:41:17 am
I managed to reproduce the bug in the SBC building, so I'll be working on a fix right now.
Title: Re: New build: 9/27/24 build
Post by: eventhorizon on September 27, 2024, 11:54:12 pm
From my testing, the issue is only in this build and the previous one, not the 9/19 build nor the ones before it.

That should help (at least it narrows it down to a build), I'll go through the code and commit history to see if I can find out what's going on.

Update: after studying the commits, I think I might've found what might've broken it, I just now need to find the bug itself.  Basically for the VR support, instead of having 1 camera in Skyscraper, I made an array of cameras, in VR mode it uses 2 cameras.  That's the only thing that touched the engine context code in the last two builds.
Title: Re: New build: 9/27/24 build
Post by: MultiMonorail on September 27, 2024, 11:43:54 pm
Can you check if the issue is in the 9/19 build and not in the 8/24 build?  9/19 is the one with the code move, the only thing that I suspect could've caused it.

From my testing, the issue is only in this build and the previous one, not the 9/19 build nor the ones before it.
Title: Re: New build: 9/27/24 build
Post by: eventhorizon on September 27, 2024, 11:13:55 pm
Can you check if the issue is in the 9/19 build and not in the 8/24 build?  9/19 is the one with the code move, the only thing that I suspect could've caused it.

Here's the code line that prevents movement from outside of the current sim engine.  It's supposed to hand off to the neighboring engine, but I don't yet know why it might be malfunctioning.  I'd be able to fix it very fast if I could reproduce it :)  This line creates the "invisible wall".
https://github.com/eventhorizon5/skyscraper/blob/master/src/frontend/vm.cpp#L353
Title: Re: New build: 9/27/24 build
Post by: eventhorizon on September 27, 2024, 10:31:10 pm
This is happening in the 9/25/24 as well.

That's good to know, it might've been related to when I moved the code that handles the engine contexts.

Reloading buildings with prims is now fixed, I was confused about it earlier, but realized tonight that I forgot to delete the prims when done with them haha.
Title: Re: New build: 9/27/24 build
Post by: MultiMonorail on September 27, 2024, 10:03:42 pm
Is this only happening on this build?  I'm mainly wondering what code would've affected it.
This is happening in the 9/25/24 as well.
Title: Re: New build: 9/27/24 build
Post by: eventhorizon on September 27, 2024, 06:10:00 pm
I've been testing this issue, and the invisible wall is a problem for me as well.

I also found an interesting issue: If I load into a building with CutLandscape set to false (SBC for example), and then I load into a building without the CutLandscape parameter (Simple - Multiple Buildings), all of the building's landscapes will not be cut even though by default, it should be set to true.

Is this only happening on this build?  I'm mainly wondering what code would've affected it.
The old builds are here if you need to test:
https://download.skyscrapersim.net/dev/old/
Title: Re: New build: 9/27/24 build
Post by: MultiMonorail on September 27, 2024, 04:06:01 pm
Maybe I could wait and see if other people will have a problem with Engine Contexts or not.

I've been testing this issue, and the invisible wall is a problem for me as well.

I also found an interesting issue: If I load into a building with CutLandscape set to false (SBC for example), and then I load into a building without the CutLandscape parameter (Simple - Multiple Buildings), all of the building's landscapes will not be cut even though by default, it should be set to true.
Title: Re: New build: 9/27/24 build
Post by: eventhorizon on September 27, 2024, 03:13:10 pm
The buildings with escalators are working fine now, but Engine Contexts is still broken; the "invisible wall" issue at each building's boundary still persists.

So far during testing, the engine contexts feature appears to be working fine.  Is it intermittent with you, where it changes if you restart the simulator?  I also noticed a crash on shutdown on Windows that isn't happening on Mac or Linux.  I'll keep testing though.  I also ran the simulator through the Valgrind memory checker, when testing the "Simple - Multiple Buildings" building, and it checked out fine.

The engine contexts code wasn't touched for the recent work, so I'm not yet sure what could be going on.
Title: Re: New build: 9/27/24 build
Post by: Mn10 on September 27, 2024, 02:11:05 pm
Quote
I've re-uploaded the packages, try them now and see if it's working fine.  The engine context boundary issue might've been related to memory corruption from the previous bug.
The buildings with escalators are working fine now, but Engine Contexts is still broken; the "invisible wall" issue at each building's boundary still persists.

Affected Engine Contexts complexes: (This will need to be tested more, in case it may be related to each building's details.)
Title: Re: New build: 9/27/24 build
Post by: eventhorizon on September 27, 2024, 02:00:14 pm
I've re-uploaded the packages, try them now and see if it's working fine.  The engine context boundary issue might've been related to memory corruption from the previous bug.

Changelog from fixed build:
-Added a prism primitive shape
-Fixed some string type malfunctions from a recent commit
Title: Re: New build: 9/27/24 build
Post by: eventhorizon on September 27, 2024, 01:40:10 pm
those crashes are related to this commit https://github.com/eventhorizon5/skyscraper/commit/d3058d3f59f3f74bd6c3e26f4a0533e9b7af4e6b
not sure exactly what is up,but,that is the line that its crashing on

The crash issues should be fixed now.  That commit was related to changes I was making to the mesh object code, I forgot to revert a few changes I made previously.  I'll re-upload once I finish testing a number of buildings.
Title: Re: New build: 9/27/24 build
Post by: Fennz(cd7890) on September 27, 2024, 01:24:31 pm
those crashes are related to this commit https://github.com/eventhorizon5/skyscraper/commit/d3058d3f59f3f74bd6c3e26f4a0533e9b7af4e6b
not sure exactly what is up,but,that is the line that its crashing on
Title: Re: New build: 9/27/24 build
Post by: eventhorizon on September 27, 2024, 01:24:08 pm
I'll check those things, the testing I did was fairly basic, mostly with the Simple building and Glass Tower.
Title: Re: New build: 9/27/24 build
Post by: Mn10 on September 27, 2024, 12:46:34 pm
Quote
Eventually I'll get texture mapping functions for it, since it just does a simple texture map over the whole object right now.  Also I found that buildings with primitives don't reload due to an issue, this will be fixed.
I also noticed that buildings with moving escalators or travelators no longer work on this build. The sim will either freezes at the escalator creation code or display a crash, like the following from Terrace V3. Note that this occurs only when loading the entirety of Terrace complex or Terrace Border towers. (Simply loading either Terrace Border PG or SW Andersville Library still works.)
Code: [Select]
*** Unhandled Exception
   ExpCode: 0xC0000005
   ExpFlags: 0
   ExpAddress: 0x3339DE83

SymInit: Symbol SearchPath: '.', symOptions: 530,

OS Version: 6.2.9200 ()

Loading symbols...

Call stack:
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\xstring (2557): std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> >
C:\skyscraper\src\sbs\step.cpp (31): SBS::Step::Step
C:\skyscraper\src\sbs\escalator.cpp (74): SBS::Escalator::Escalator
C:\skyscraper\src\sbs\floor.cpp (1542): SBS::Floor::AddEscalator
C:\skyscraper\src\script\floors.cpp (2335): Skyscraper::ScriptProcessor::FloorSection::Run
C:\skyscraper\src\script\scriptproc.cpp (244): Skyscraper::ScriptProcessor::Run
C:\skyscraper\src\frontend\enginecontext.cpp (131): Skyscraper::EngineContext::Run
C:\skyscraper\src\frontend\vm.cpp (194): Skyscraper::VM::Run
C:\skyscraper\src\frontend\skyscraper.cpp (1100): Skyscraper::Skyscraper::Loop
C:\skyscraper\src\frontend\mainscreen.cpp (208): Skyscraper::MainScreen::OnIdle
00007FFD31BA3884 (wxbase32u_vc_custom): (filename not available): wxAppConsoleBase::CallEventHandler
00007FFD31CA71AF (wxbase32u_vc_custom): (filename not available): wxEvtHandler::ProcessEventIfMatchesId
00007FFD31CA6D7C (wxbase32u_vc_custom): (filename not available): wxEventHashTable::HandleEvent
00007FFD31CA804D (wxbase32u_vc_custom): (filename not available): wxEvtHandler::TryHereOnly
00007FFD31CA7113 (wxbase32u_vc_custom): (filename not available): wxEvtHandler::ProcessEvent
00007FFD31CA7C2A (wxbase32u_vc_custom): (filename not available): wxEvtHandler::SafelyProcessEvent
00007FFD32010307 (wxmsw32u_core_vc_custom): (filename not available): wxWindowBase::SendIdleEvents
00007FFD31F1E06A (wxmsw32u_core_vc_custom): (filename not available): wxAppBase::ProcessIdle
00007FFD31BD99C9 (wxbase32u_vc_custom): (filename not available): wxEventLoopBase::ProcessIdle
00007FFD31BD9795 (wxbase32u_vc_custom): (filename not available): wxEventLoopManual::DoRun
00007FFD31BD9A4A (wxbase32u_vc_custom): (filename not available): wxEventLoopBase::Run
00007FFD31BA61B7 (wxbase32u_vc_custom): (filename not available): wxAppConsoleBase::MainLoop
00007FFD31C29F1C (wxbase32u_vc_custom): (filename not available): wxEntryReal
00007FFD31D06458 (wxbase32u_vc_custom): (filename not available): wxEntry
C:\skyscraper\src\frontend\skyscraper.cpp (187): main
D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (288): __scrt_common_main_seh
00007FFD7CB9257D (KERNEL32): (filename not available): BaseThreadInitThunk
00007FFD7DB2AF28 (ntdll): (filename not available): RtlUserThreadStart

Simulator State Dump
--------------------------
Platform: Windows x86 64-bit
Renderer: OpenGL
Frontend version: 2.0.0.3193
SBS version: 1.0.0.3193
Instance number: 0
Building Name: Terrace
Building Filename: Terrace V3.bld
Building Version: 3
InStairwell: false
InElevator: false
InShaft: false
CameraFloor: 0
ElevatorNumber: 1
CarNumber: 1
ElevatorSync: false
Running Time: 0
BuildingsEnabled: false
ExternalEnabled: false
LandscapeEnabled: false
SkyboxEnabled: false
Verbose: false
InterfloorOnTop: false
Object Count: 63832
Camera Floor: 0
Camera Position: 0, 0, 0
Line number: 3157
In included file: ObjectPlus/Scripts/OP_Script2.txt
Context: Floor -1
Function: OP_Escalator
Function call line: 845
Line text: AddEscalator CTFCUp, 1, 1.1, EG881Sounds2/Escalators/westinghouseescalator1.wav, EscalatorZ, EscalatorZB, front, -242.5, -99 - ((((24 + 4) / 2) - 1) * 0.833333) + 0.5, 3.333333, 0.500000, 0.833333, 24 + 4, 0.041667, 1, 1

--------------------------
Copy and paste the above information (select it and press CTRL-C)
and either post it to the Skyscraper forum at http://forum.skyscrapersim.net
or email to ryan@skyscrapersim.net

Press OK to close Skyscraper
(Older buildings that have only non-moving escalators created with Escalator2011 still run fine.)

Additionally, the Engine Contexts function seems to be broken. When I load SBC, I could walk through the bounds into Building 3 normally. However, upon taking an elevator down to level A and walking through a door to Building 2, the sim won't switch the engine as intended, acting like there were an invisible wall at the annex tunnel linking the buildings.
Title: Re: New build: 9/27/24 build
Post by: eventhorizon on September 27, 2024, 12:20:08 pm
The primitive shape feature is a nice addition. It will make the buildings' interiors more complete with different objects.

Eventually I'll get texture mapping functions for it, since it just does a simple texture map over the whole object right now.  Also I found that buildings with primitives don't reload due to an issue, this will be fixed.

Some of the other features Ogre Procedural has are multishapes, paths/splines (good for roads), a prism shape, SVG file import, texture functions, tracks, and a triangulator, so I'll eventually try to get those into Skyscraper also.
Title: Re: New build: 9/27/24 build
Post by: Mn10 on September 27, 2024, 12:10:14 pm
Quote
This build has a large feature added, the addition of the Ogre Procedural library.  Some new commands have been created for this.  What this does is it lets you create more advanced types of geometry in the simulator, such as spheres, cylinders, cones, capsules, etc.  The library features more things, so I'll eventually try to add the rest of the features.  For now, it does shape/prim creation.  The attached screenshot shows the new "Simple - Primitives" building, which demonstrates how to make prims.  A new texture command has been added too, SetCulling, which sets the side of a material that is culled by the renderer, which determines which side of the texture you can see, this is used in the Primitives demo.  This build also has some internal sim engine enhancements and fixes.
The primitive shape feature is a nice addition. It will make the buildings' interiors more complete with different objects.
Title: Build: 9/27/24 build
Post by: eventhorizon on September 27, 2024, 11:30:00 am
This build has a large feature added, the addition of the Ogre Procedural library.  Some new commands have been created for this.  What this does is it lets you create more advanced types of geometry in the simulator, such as spheres, cylinders, cones, capsules, etc.  The library features more things, so I'll eventually try to add the rest of the features.  For now, it does shape/prim creation.  The attached screenshot shows the new "Simple - Primitives" building, which demonstrates how to make prims.  A new texture command has been added too, SetCulling, which sets the side of a material that is culled by the renderer, which determines which side of the texture you can see, this is used in the Primitives demo.  This build also has some internal sim engine enhancements and fixes.

For information on the addition of the experimental VR feature, see the forum post about it:
https://skyscrapersimulatorforum.createaforum.com/download-skyscraper-simulator/new-build-92524-build/



Windows x64 Patch:
https://download.skyscrapersim.net/dev/patch-092724-x64.zip



Downloads:
https://www.skyscrapersim.net

GitHub repository:
https://github.com/eventhorizon5/skyscraper

Script guide:
https://www.skyscrapersim.net/guide



Changelog:

-Don't show main menu when in VR mode
-Added first-run detection to the frontend
-Added OgreProcedural dependency
-added Geometry Controller, which interfaces with the Ogre Procedural library
-Add support for setting material on mesh object directly
-Enable Windows app icon on new build system
-Made CreatePrim script command
-Added PrimAttach command
-Create colliders for procedural meshes
-Fixed an issue where objects would only return the parent's number and not their own
-Added PrimTexture command
-Give the prim script commands the ability to add prims to the SBS root
-added PrimShape command
-Added "Simple - Primitives" demo building
-Updated guide for new prim commands
-Add SetCulling texture command

Bugfix re-upload:
-Added a prism primitive shape
-Fixed some string type malfunctions from a recent commit