Repetier Host 2.0.5 crashes on view gcode generated by Slic3r
hi
Repetier host crashes on my pc when i sliced with Slic3r.
Steps:
- load the gcode file (as example see link below)
- try to zoom-in/zoom-out with wheel
Also it creashes immediatelly after a model sliced.
PC:
Windows 10 pro x64, 1709 16299.192
Graphics - on board Intel HD 3000 in Core i7 2600K
STL:
https://drive.google.com/open?id=1taZkUBap93edxAVGjujmfIik9kjdLP3f
Gcode:
https://drive.google.com/open?id=1zQwIqV2EWzwsf4qtyY1F9B4XpkpDfBgA
Screenshots:
Repetier host crashes on my pc when i sliced with Slic3r.
Steps:
- load the gcode file (as example see link below)
- try to zoom-in/zoom-out with wheel
Also it creashes immediatelly after a model sliced.
PC:
Windows 10 pro x64, 1709 16299.192
Graphics - on board Intel HD 3000 in Core i7 2600K
STL:
https://drive.google.com/open?id=1taZkUBap93edxAVGjujmfIik9kjdLP3f
Gcode:
https://drive.google.com/open?id=1zQwIqV2EWzwsf4qtyY1F9B4XpkpDfBgA
Screenshots:
- <EventData>
<Data>RepetierHost.exe</Data>
<Data>1.0.0.0</Data>
<Data>597f4ac2</Data>
<Data>KERNELBASE.dll</Data>
<Data>10.0.16299.15</Data>
<Data>4736733c</Data>
<Data>c000041d</Data>
<Data>00000000000b67e2</Data>
<Data>e3c</Data>
<Data>01d38c65a5edb319</Data>
<Data>C:\Program Files\Repetier-Host\RepetierHost.exe</Data>
<Data>C:\WINDOWS\System32\KERNELBASE.dll</Data>
<Data>0b6c286a-ffa3-466a-abd5-1a3b8c4e497a</Data>
<Data />
<Data />
</EventData>
</Event>
Comments
So th ebig question is how to convince OpenTK to select the OpenGL driver of your graphic card. On laptops this often depends on the energy saving settings or graphic driver setting. If you set it to full powe rit often switches to use the right driver instead.
i had guess that it looks like some issue with opengl, but it's interesting that when the application shows STL model or gcode sliced by Cura - it works almost well, no issues with rendering. only gcode produced by slic3r inspires crash
that's interesting. i don't know how to you initialized and used the opentk, i'm not familiar with opengl and don't use c# last years.
but simplest opentk sample i have made on my pc (added opentk as nuget package) shows that it looks like opentk can use intel's opengl 3.1 on my machine.
And it's true - open gl extension viewer 5.0.9 also says that supported version is 3.1 (driver 9.17.10.4459 from 19/05/2016)
the opentk dll that nuget downloads has version 2.0.0.0
the opentk shipped with repetierhost looks like has version 1.2.2336.6514
may be it's the reason
(i had mean gcode files generated by cura, not cura application itself. those gcodes don't inspire the crash)
i have got your file. it's really has opentk and glcontrol ver 2.0, repetierhost loads it (i checked with process explorer)
unfortunatelly this doesn't help.
glcontrol still initialized to use opengl 1.1.
thank you anyway
later i will try to find an example how to build simplest application with glcontrol. i will share results
if (Main.main != null && Main.main.ThreeDSettings.AntiAlias)
mode = new GraphicsMode(mode.ColorFormat.BitsPerPixel, 16, 0, 4, 0, 2, false);
mode = new GraphicsMode(mode.ColorFormat.BitsPerPixel, 32, 0, 4, 0, 2, false);
gl = new OpenTK.GLControl(mode,1,5,GraphicsContextFlags.ForwardCompatible);
differs if antialias is on or off (hope you have it off).
Important part is double buffering and RGB color.
I have made the sample. it looks like it works well.
I also had used GLControl_IK
packed solution https://drive.google.com/open?id=1Tpteo_T3JTOvEd0RDWubGEaLLkNhJUIg
i can make guess that may be an additional componet (GDI+?) in your project indirectly initiliaze opengl and then opentk fails
Th eone used uses just new GLControl(mode); that has opengl context 1.0 as default so 1.1 would match. Have now changed it to use 1.5 forward compatible in the hope that it then is forced to use the real driver, which seems to work for you so my hope is that this is the reason.
Have send you a pm with download link for testing.
Unfortunately, I also have this problem, it worked previously, but no longer for some reason. My CuraEngine slicer works fine, but Slic3r crashes the application.
I use an older computer together with my 3d Printer with an Intel Core I3 M 330, running Windows 10.
Intel no longer supports this processor and hence not a driver for the CPU build-in graphic adapter on Windows 10 so that it can run OpenGL. So I have no way of Getting Open GL up and running, or don't know how.
Is it not possible to handle the exception in the application. Or, alternatively implement a 'top level exception handler' so that the application does not crash?
I also use Repetier Host v2.0.5
In the later case you can disable filament and travel visualization (in toolbar the 2 eyes) and it will not try to show them and should hence not crash. Drawback of course you see no preview but that can only be solved by having a OpenGL driver > 1.5. For printing you should confider using repetier-server so a crash of host does not stop printing. Host can print and connect to printer through the server.
unfortunatelly new version dosn't help
the issue somewhere deeper. You properly init GLControl, but WGL somewhy doesn't properly get entry opints of GL functions and doesn't load intel's GL dll
Repeater host (GL control constructor, obtaining entry points, loaded modules):
Test application (i ensured that it also worked as x64 process):
I made a test:
1. renamed original repetierhost.exe -> repetierhost1.exe
2. copied my application to C:\Program Files\Repetier-Host and renamed it to repetierhost.exe
3. started both.
Also i copied entire RH to D :\Repetier-Host. didn't help
so it not path, not bitness, not opentk dlls. i have no idea at the moment
Question is still why it works for your test and not host. In your sample you had samples =4 which is not the case for the host unless you enable anti alias in preferences and restart. Maybe worth a try.
The way to wgl entry points seems identical but result differs, so really hard to say why both behave different if everything else seems the same.
and enabling AA in RH doesn't help
i thought that windows somehow "banned" RH from using opengl. by hash, version info or something else.
so i took resource hacker and removed version info (by the way it would be nice to properly fill it). it didn't help. then i replaced manifest (took from my application) - didn't help.
then i restored the file and just removed manifest at all. it helps!!
i don't know yet how to make proper manifest for RH. at least you may deploy it as external .manifest file (so people with issue may try to just remove it)
https://github.com/LWJGL/lwjgl/issues/119#issuecomment-173983180
https://github.com/libretro/RetroArch/issues/4580#issuecomment-358012766
Found where the version info is stored and set it for next update.
One solution for manifest I found is removing windows 10 from compatible versions:
<!-- for windows 10 This Id value indicates the application supports Windows Threshold functionality-->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
Seems to work for HD3000.
Main reason on the other side for the manifest is to mark the app as dpi aware
<dpiAware>true</dpiAware>
so it works on higher dpi devices with sharp images.
Can you try if removing windows 10 compatibilty helps getting it run under W10?
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="RepetierHost.exe" type="win32" processorArchitecture="Amd64" />
</asmv1:assembly>
for me nothing works.
only removing the manifestresource
suddenly microsoft isn't too clear with this
https://msdn.microsoft.com/ru-ru/library/windows/desktop/aa374191(v=vs.85).aspx
because they define "file name syntax". and same time say that "Application manifests should be included as a resource in the application's EXE file or DLL."
so you can put 2 binaries to the installation (you can try to make small exe and move out entire code to repetierhost.dll).
or even make separate installationn for people who faced the issue.
i don't know which way is better.
Anyway a big thank for your help and finding a solution, also we do not understand why that has an influnce on OpenGL selection.