Author Topic: Skyscraper closes when reloading a building  (Read 279 times)

Offline elevator1512

  • Contributor Level I
  • *
  • Posts: 120
  • Elevator1512 Productions
    • View Profile
    • Elevator1512 Productions
Skyscraper closes when reloading a building
« on: February 02, 2025, 05:51:09 pm »
I've noticed this a few times, but under certain conditions Skyscraper randomly closes without a crash report if pressing Ctrl+R to reload the building. I've tried but haven't been able to consistently reproducer the issue. Any suggestions?

Offline eventhorizon

  • Administrator
  • Contributor Level II
  • *****
  • Posts: 594
  • Location: Chicago, IL
    • View Profile
    • Ryan Thoryk's Website
Re: Skyscraper closes when reloading a building
« Reply #1 on: February 02, 2025, 08:32:52 pm »
I've noticed this a few times, but under certain conditions Skyscraper randomly closes without a crash report if pressing Ctrl+R to reload the building. I've tried but haven't been able to consistently reproducer the issue. Any suggestions?

Can you try it again, and see if there's something you're doing that might be causing the crash, or what you were doing right before the crash?

Offline elevator1512

  • Contributor Level I
  • *
  • Posts: 120
  • Elevator1512 Productions
    • View Profile
    • Elevator1512 Productions
Re: Skyscraper closes when reloading a building
« Reply #2 on: February 02, 2025, 08:37:56 pm »
I've noticed this a few times, but under certain conditions Skyscraper randomly closes without a crash report if pressing Ctrl+R to reload the building. I've tried but haven't been able to consistently reproducer the issue. Any suggestions?

Can you try it again, and see if there's something you're doing that might be causing the crash, or what you were doing right before the crash?
I was working on my latest building project and had it open in a separate .BLD file, and had the application running that same building. Making a few changes to the code and then saving the .BLD file and then pressing Ctrl+R to reload causes it to close unexpectedly. Not sure what's causing this as I couldn't reproduce the issue when just simply pressing Ctrl+R immediately after loading a building without modifying the .BLD file for that building.

Offline elevator1512

  • Contributor Level I
  • *
  • Posts: 120
  • Elevator1512 Productions
    • View Profile
    • Elevator1512 Productions
Re: Skyscraper closes when reloading a building
« Reply #3 on: February 06, 2025, 04:35:18 pm »
So I found out that the application doesn't close when reloading a building that I saved changes to in between the initial load and reload if no changes have occurred in the particular view area. For example, I changed some elevator configurations on the upper floors of my latest tower project and set the camera to one floor below, then reloaded the building, that didn't crash the software. If I did that on the same floor where I changed the elevator configuration, the application closes. I'm not sure why, but I found this after I played around with the building.

Offline elevator1512

  • Contributor Level I
  • *
  • Posts: 120
  • Elevator1512 Productions
    • View Profile
    • Elevator1512 Productions
Re: Skyscraper closes when reloading a building
« Reply #4 on: February 07, 2025, 08:24:43 pm »
Update: I got a crash report when reloading the Line Tower after modifying one of the elevator shafts in the .bld file:

*** Unhandled Exception
   ExpCode: 0xC0000005
   ExpFlags: 0
   ExpAddress: 0x00000000

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

OS Version: 6.2.9200 ()

Loading symbols...

Call stack:
C:\ogre-14.2.6\OgreMain\src\OgreHardwarePixelBuffer.cpp (95): Ogre::HardwarePixelBuffer::lock
C:\skyscraper\src\sbs\texture.cpp (1843): SBS::TextureManager::WriteToTexture
C:\skyscraper\src\sbs\texture.cpp (795): SBS::TextureManager::AddTextToTexture
C:\skyscraper\src\script\textures.cpp (285): Skyscraper::ScriptProcessor::TexturesSection::Run
C:\skyscraper\src\script\scriptproc.cpp (265): Skyscraper::ScriptProcessor::Run
C:\skyscraper\src\vm\enginecontext.cpp (146): Skyscraper::EngineContext::Run
C:\skyscraper\src\vm\vm.cpp (290): Skyscraper::VM::RunEngines
C:\skyscraper\src\vm\vm.cpp (578): Skyscraper::VM::Run
C:\skyscraper\src\frontend\skyscraper.cpp (427): Skyscraper::Skyscraper::Loop
C:\skyscraper\src\frontend\mainscreen.cpp (217): Skyscraper::MainScreen::OnIdle
00007FFFA6D63884 (wxbase32u_vc_custom): (filename not available): wxAppConsoleBase::CallEventHandler
00007FFFA6E671AF (wxbase32u_vc_custom): (filename not available): wxEvtHandler::ProcessEventIfMatchesId
00007FFFA6E66D7C (wxbase32u_vc_custom): (filename not available): wxEventHashTable::HandleEvent
00007FFFA6E6804D (wxbase32u_vc_custom): (filename not available): wxEvtHandler::TryHereOnly
00007FFFA6E67113 (wxbase32u_vc_custom): (filename not available): wxEvtHandler::ProcessEvent
00007FFFA6E67C2A (wxbase32u_vc_custom): (filename not available): wxEvtHandler::SafelyProcessEvent
00007FFFA3E40307 (wxmsw32u_core_vc_custom): (filename not available): wxWindowBase::SendIdleEvents
00007FFFA3D4E06A (wxmsw32u_core_vc_custom): (filename not available): wxAppBase::ProcessIdle
00007FFFA6D999C9 (wxbase32u_vc_custom): (filename not available): wxEventLoopBase::ProcessIdle
00007FFFA6D99795 (wxbase32u_vc_custom): (filename not available): wxEventLoopManual::DoRun
00007FFFA6D99A4A (wxbase32u_vc_custom): (filename not available): wxEventLoopBase::Run
00007FFFA6D661B7 (wxbase32u_vc_custom): (filename not available): wxAppConsoleBase::MainLoop
00007FFFA6DE9F1C (wxbase32u_vc_custom): (filename not available): wxEntryReal
00007FFFA6EC6458 (wxbase32u_vc_custom): (filename not available): wxEntry
C:\skyscraper\src\frontend\skyscraper.cpp (135): main
D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (288): __scrt_common_main_seh
00007FFFFBB97034 (KERNEL32): (filename not available): BaseThreadInitThunk
00007FFFFDAE2651 (ntdll): (filename not available): RtlUserThreadStart

Simulator State Dump
--------------------------
Platform: Windows x86 64-bit
Renderer: Direct3D9
Frontend version: 2.0.0.3552
SBS version: 1.0.0.3552
Instance number: 0
Building Name:
Building Filename: Line Tower (beta).bld
Building Version:
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: 15
Camera Floor: 0
Camera Position: 0, 0, 0
Line number: 151
Context: Textures
Line text: AddTextRange 1, 180, enumber, enumber2, kone_kss570.ttf, 50, 2, -1, -1, -1, -1, center, center, 255, 255, 255

--------------------------
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

The fact that a crash report generated that time while the application simply closed the previous few times means that something's not right here.

Offline eventhorizon

  • Administrator
  • Contributor Level II
  • *****
  • Posts: 594
  • Location: Chicago, IL
    • View Profile
    • Ryan Thoryk's Website
Re: Skyscraper closes when reloading a building
« Reply #5 on: February 08, 2025, 01:04:46 am »
Update: I got a crash report when reloading the Line Tower after modifying one of the elevator shafts in the .bld file:

It might be the renderer you're using, try using one of the OpenGL ones, they might work better.

Offline elevator1512

  • Contributor Level I
  • *
  • Posts: 120
  • Elevator1512 Productions
    • View Profile
    • Elevator1512 Productions
Re: Skyscraper closes when reloading a building
« Reply #6 on: February 08, 2025, 08:31:19 am »
Update: I got a crash report when reloading the Line Tower after modifying one of the elevator shafts in the .bld file:

It might be the renderer you're using, try using one of the OpenGL ones, they might work better.
I'll have to check later as I'm not sure about finding renderers. I did download the latest build, but only that patch version that doesn't have any new renderers.

Offline eventhorizon

  • Administrator
  • Contributor Level II
  • *****
  • Posts: 594
  • Location: Chicago, IL
    • View Profile
    • Ryan Thoryk's Website
Re: Skyscraper closes when reloading a building
« Reply #7 on: February 08, 2025, 04:24:15 pm »
I'll have to check later as I'm not sure about finding renderers. I did download the latest build, but only that patch version that doesn't have any new renderers.

You can delete the ogre.cfg file and change renderers, just delete it and re-run Skyscraper and the Ogre menu should pop up.

Offline elevator1512

  • Contributor Level I
  • *
  • Posts: 120
  • Elevator1512 Productions
    • View Profile
    • Elevator1512 Productions
Re: Skyscraper closes when reloading a building
« Reply #8 on: February 08, 2025, 10:34:59 pm »
I'll have to check later as I'm not sure about finding renderers. I did download the latest build, but only that patch version that doesn't have any new renderers.

You can delete the ogre.cfg file and change renderers, just delete it and re-run Skyscraper and the Ogre menu should pop up.
I got the menu to pop up after deleting the file, is there a specific version required? There are three options for OpenGL, OpenGL Rendering, OpenGL 3+ Rendering, and OpenGL ES 2.x Rendering. I'm curious on what the differences are between those three.

Offline elevator1512

  • Contributor Level I
  • *
  • Posts: 120
  • Elevator1512 Productions
    • View Profile
    • Elevator1512 Productions
Re: Skyscraper closes when reloading a building
« Reply #9 on: February 11, 2025, 11:26:54 pm »
I tried using the first OpenGL option (Open GL Rendering) and skyscraper doesn't close when reloading a building more than once. I'm still not sure what the other two OpenGL versions do, though.