Jump to content

Context:Screenshot() crashes in published projects


Recommended Posts

Calling it with no parameters it writes to the %appdata% (on windows) folder with a default filename, and this works fine when ran from the editor.

When called from a published project it creates the file ok, but then crashes.

 

To test just add something like this in App:Loop()

if self.window:KeyHit(Key.F5) then
self.context:Screenshot()
end

 

 

Output from running in editor:

Executing "F:\LeadwerksProjects\BugTest_ScreenshotCrash\BugTest_ScreenshotCrash.exe"...
Initializing Lua...
Executing file "F:/LeadwerksProjects/BugTest_ScreenshotCrash/Scripts/Error.lua"
Executing file "F:/LeadwerksProjects/BugTest_ScreenshotCrash/Scripts/App.lua"
Initializing OpenGL4 graphics driver...
OpenGL version 441
GLSL version 430
Device: AMD Radeon R9 200 Series
Loading map "F:/LeadwerksProjects/BugTest_ScreenshotCrash/Maps/temp.map"...
Loading material "F:/LeadwerksProjects/BugTest_ScreenshotCrash/materials/developer/bluegrid.mat"...
Loading texture "F:/LeadwerksProjects/BugTest_ScreenshotCrash/materials/developer/BlueGrid.tex"...
Loading shader "F:/LeadwerksProjects/BugTest_ScreenshotCrash/Shaders/Model/diffuse.shader"...
Loading material "F:/LeadwerksProjects/BugTest_ScreenshotCrash/materials/developer/orangegrid.mat"...
Loading texture "F:/LeadwerksProjects/BugTest_ScreenshotCrash/materials/developer/orangegrid.tex"...
Loading texture "F:/LeadwerksProjects/BugTest_ScreenshotCrash/Materials/Common/bfn.tex"...
Loading shader "F:/LeadwerksProjects/BugTest_ScreenshotCrash/Shaders/Misc/occlusionquery.shader"...
Loading shader "F:/LeadwerksProjects/BugTest_ScreenshotCrash/Shaders/Model/Shadow/shadow.shader"...
Loading shader "F:/LeadwerksProjects/BugTest_ScreenshotCrash/Shaders/Lighting/directionallight.shader"...
Writing screenshot "C:\Users\Ben\AppData\Local/BugTest_ScreenshotCrash/Screenshots/screenshot1.tga"...
Saved screenshot "C:\Users\Ben\AppData\Local/BugTest_ScreenshotCrash/Screenshots/screenshot1.tga".
Setting breakpad minidump AppID = 251810
Steam_SetMinidumpSteamID: Caching Steam ID: 76561198056655896 [API loaded no]
Process Complete.

 

 

Output from running published project (tried both encrypted and unencrypted):

 

Initializing Lua...
Warning: Lua sandboxing disabled.
Executing file "C:/Users/Ben/Desktop/BugTest_ScreenshotCrash_unencrypted/Scripts/Error.lua"
Executing file "C:/Users/Ben/Desktop/BugTest_ScreenshotCrash_unencrypted/Scripts/App.lua"
Initializing OpenGL4 graphics driver...
OpenGL version 441
GLSL version 430
Device: AMD Radeon R9 200 Series
Loading map "C:/Users/Ben/Desktop/BugTest_ScreenshotCrash_unencrypted/Maps/start.map"...
Loading material "C:/Users/Ben/Desktop/BugTest_ScreenshotCrash_unencrypted/materials/developer/bluegrid.mat"...
Loading texture "C:/Users/Ben/Desktop/BugTest_ScreenshotCrash_unencrypted/materials/developer/BlueGrid.tex"...
Loading shader "C:/Users/Ben/Desktop/BugTest_ScreenshotCrash_unencrypted/Shaders/Model/diffuse.shader"...
Loading material "C:/Users/Ben/Desktop/BugTest_ScreenshotCrash_unencrypted/materials/developer/orangegrid.mat"...
Loading texture "C:/Users/Ben/Desktop/BugTest_ScreenshotCrash_unencrypted/materials/developer/orangegrid.tex"...
Loading texture "C:/Users/Ben/Desktop/BugTest_ScreenshotCrash_unencrypted/Materials/Common/bfn.tex"...
Loading shader "C:/Users/Ben/Desktop/BugTest_ScreenshotCrash_unencrypted/Shaders/Misc/occlusionquery.shader"...
Loading shader "C:/Users/Ben/Desktop/BugTest_ScreenshotCrash_unencrypted/Shaders/Model/Shadow/shadow.shader"...
Loading shader "C:/Users/Ben/Desktop/BugTest_ScreenshotCrash_unencrypted/Shaders/Lighting/directionallight.shader"...
Writing screenshot "C:\Users\Ben\AppData\Local/BugTest_ScreenshotCrash/Screenshots/screenshot3.tga"...

It stops there and pops up with

post-12570-0-01570500-1415341871.png

The screenshot file is created ok but the program stops running.

 

 

 

In the attached project press F5 and it should trigger it.

 

 

 

EDIT: Just changed back to the non-beta branch and it is the same, crashes for me but the screenshot is written ok.

post-12570-0-01570500-1415341871.png

BugTest_ScreenshotCrash_published.zip

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...