Repetier Host 2.0.5 crashes on view gcode generated by Slic3r

edited January 2018 in Bug Reports
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:



'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\Program Files\Repetier-Host\RepetierHost.exe'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\Program Files\Repetier-Host\RepetierHostExtender.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\Program Files\Repetier-Host\OpenTK.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms.resources\v4.0_4.0.0.0_ru_b77a5c561934e089\System.Windows.Forms.resources.dll'. Module was built without symbols.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\Program Files\Repetier-Host\ColorSlider.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\Program Files\Repetier-Host\plugins\CuraEngine\CuraEngine.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\Program Files\Repetier-Host\plugins\RepetierServerConnector\RepetierServerConnector.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\Program Files\Repetier-Host\plugins\RRFirmwares\RRFirmwares.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\Program Files\Repetier-Host\plugins\SlicerSlic3r\SlicerSlic3r.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\Program Files\Repetier-Host\plugins\SlicerSlic3rPE\SlicerSlic3rPE.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceProcess\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.ServiceProcess.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\Program Files\Repetier-Host\Newtonsoft.Json.dll'. Cannot find or open the PDB file.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\Program Files\Repetier-Host\OpenTK.GLControl.dll'. Module was built without symbols.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_ru_b77a5c561934e089\mscorlib.resources.dll'. Module was built without symbols.
'RepetierHost.exe' (CLR v4.0.30319: RepetierHost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.resources\v4.0_4.0.0.0_ru_b77a5c561934e089\System.resources.dll'. Module was built without symbols.
The thread 0x25f8 has exited with code 0 (0x0).
Exception thrown: 'System.AccessViolationException' in OpenTK.dll
Попытка чтения или записи в защищенную память. Это часто свидетельствует о том, что другая память повреждена.

Windows event log message in xml format:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
-
<System>
  <Provider Name="Application Error" />
  <EventID Qualifiers="0">1000</EventID>
  <Level>2</Level>
  <Task>100</Task>
  <Keywords>0x80000000000000</Keywords>
  <TimeCreated SystemTime="2018-01-13T11:58:56.535842100Z" />
  <EventRecordID>2999</EventRecordID>
  <Channel>Application</Channel>
  <Computer>vb-homepc</Computer>
  <Security />
  </System>
- <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

  • See first lines in log. You see it selected the microsoft generic OpenGL driver. That one always crashes sooner or later.

    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.
  • thanks for answer. it's not laptop, it's ordinary desktop pc.
    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
  • by the way, i had launched repetierhost.exe from commad line window and didn't see any output from them to the console. is it writes a log to some file? or i have to explicitly eneble tracing by a command line switch?

  • I mean the log window in host, the lower part with the output. there you see it used generic 1.1. Host requires 1.5 or higher to work good. Not sure why OpenTK sometimes does not choose a available good OpenTK driver. That is the library we use for OpenGL visualization. Cura is written in a different language and uses a different library. All I can say is that this often happens when a pc has 2 graphic cards and on laptops and that graphic card and power saving settings can have an influence on it.
  • edited January 2018
    oh, i see - i didn't find most obvious place :)

    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)







  • Intersting. I was using OpenTK.Next which was the official "hot" version with most improvements. Seems like it is not hot any more. Have send you a pm with a test version using OpenTK 2.0. Please test if it works. We use GLControl and not GameWindow so it might still have problems or hopefully not.
  • thank you very much for support, especially on weekend :)
    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

  • That would be great, because I have no pc with that problem. When I'm back I will post you how it gets initialized at the moment.
  • Here what I use:

                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.

  • Just forgot, there is no official GLControl working with 2.0 so I used OpenTK.GLControl_IK which matches and works (ok for me:-).
  • hi
    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

  • that's funny. i have changed initilization code as yours, but it still work properly.


    i can make guess that may be an additional componet (GDI+?) in your project indirectly initiliaze opengl and then opentk fails
  • byt the way. i had tested repetier host you had gave me on my work PC. it corretly detected opengl 4.5 on intel hd 630
  • Have rechecked it and I have 2 versions and copied it from the unused :-(

    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.
  • First, thanks for an awesome printer application! 

    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
  • What does slic3r crashes application mean? Crashes slic3r or does host crash when reading the sliced result?

    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.
  • hi
    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):




  • edited January 2018
    so it looks like now it's not blame of RH. i guess something wrong with Windows or Intel's OpenGL, but i'm not sure.
    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




  • I only remember it happening with intel HD 3000 graphic cards. Have also an other intel graphic card that works without the problem. So at least this driver is prone of the problem.

    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.
  • edited January 2018
    i changed depth to 16 and samples to 0 in my code. it still works
    and enabling AA in RH doesn't help
  • haha!! i have solved it! :)
    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)  


  • Great work.

    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?

  • i have tried with various manifests. even with almost empty like that:
    <?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


  • My application works with manifest. RH work only without manufest. i don;t know why


  • Ok, so since I need it for more other computers for the dpi settings, i will investigate how to make it an external file so users can delete it. I might add a warning on startup if it detects the microsoft gdi driver, so users are aware of the problem. Or I delete the file myself and restart host, but with the permission problems in program folder  I think it might be a problem. So I might better stick to the hint and open explorer in right directory.
  • edited January 2018
    you have a few ways. you may try to make manifest as an external file.
    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.




  • Ok, will investigate and think about it.

    Anyway a big thank for your help and finding a solution, also we do not understand why that has an influnce on OpenGL selection.
  • Thanks for your suggestion of disabling the filament and travel visualization, it works. It crashes after reading the sliced result, when visualization is enabled.
Sign In or Register to comment.