Announcement

Collapse
No announcement yet.

JK-IDE Version 2.0 including Visual Designer V 1.0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Same result, other copy is the same.

    As said, I never had any strange experiences with JK-Ide until now. Only thing that happens now and then:
    I get "resource file error" (in programs that don't even have a resourcefile). Compile again and all is well...
    Regards,
    Peter

    Comment


    • Did you try 'Compile (Trace)' ?

      Comment


      • Yes.

        Click image for larger version

Name:	FTH.png
Views:	221
Size:	3.9 KB
ID:	784200
        Regards,
        Peter

        Comment


        • Peter,

          FTH, this means that the operating system "does things" to prevent future crashes, because this app did crash several times before! I once had problems debugging an app i had no explanation for. Until i found out that FTH had been activated for this app.

          I would read this (https://devblogs.microsoft.com/oldne...125-00/?p=8463) and would remove all entries for jk-ide.exe and test.exe (and whichever name of an executable you compiled) in
          HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\
          and
          HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\,
          not only the "Fault­Tolerant­Heap" entry.


          Maybe this helps,


          JK

          Comment


          • There's only one JK-Ide entry, and that seems OK...

            Click image for larger version  Name:	Error.png Views:	0 Size:	3.0 KB ID:	784205

            To be sure, I stopped FTH alltogether, no difference (only FTH message is gone now)
            For those who also want to disable FTH:

            3. Disabling FTH completely for the entire system:

            Set the REG_DWORD value HKEY_LOCAL_MACHINE\Software\Microsoft\FTH\Enabled to 0.
            Regards,
            Peter

            Comment


            • Blimey, what a carry on!

              Comment


              • So still no "Bingo". After all what we tried lately this would have been a very good candidate for "where you never would have expected it".

                Just to be sure, did you remove the entry for jk-ide.exe for a test or did you just disable FTH entirely with out removing the entry for jk-ide.exe? Is there a similar entry for pbedit.exe or for test.exe or any other program, which doesn´t run properly from jk-ide?

                Another thought - are you able to kill "test.set" in Z.\temp from a program compiled and run from jk-ide?


                JK

                Comment


                • PbEdit has the same entry (so have a lot of programs)
                  Yes, I can kill test.set without errors... (from a compile/run within jk-ide)
                  Regards,
                  Peter

                  Comment


                  • A program that has a corrupt shortcut could cause this. Please try killing the shortcut and recreate it.

                    Comment


                    • Problem is also there without shortcut use...
                      Regards,
                      Peter

                      Comment


                      • Is Windows Version 1903 (OS Build 18362.295) ?
                        Hoping you did a clean install from Windows 7.

                        Windows may not update all device drivers and this takes a long time.
                        Might first check the NAS driver.
                        I have seen a dozen drivers updated this way.
                        In device manager right click on every driver and click update.




                        Comment


                        • So it´s only "OPEN ... FOR OUTPUT", which keeps failing. BTW i assume this is compiled with PBWIN not with PBCC, is this correct? Did you have a look at process rights with process explorer (see post #196) ?

                          Comment


                          • Full rights in Process explorer:

                            Click image for larger version  Name:	rights.png Views:	0 Size:	19.5 KB ID:	784216

                            Compiler is PbWin10
                            Quick workaround for now:

                            Code:
                            Function OpenFileForOutput(FName As String) As Long
                              Local lhFile As Long
                              If IsFile(FName) Then KILL FName
                              lhFile = FreeFile
                              Open fName For APPEND As #lhFile
                              If Err Then FUNCTION = 0 Else FUNCTION = lhFile
                            End Function
                            Regards,
                            Peter

                            Comment


                            • At the moment Windows version 1803, will update tonight (too slow process for now, takes all day... )
                              Don't think NAS is the problem, then more programs must have problems with it...
                              Regards,
                              Peter

                              Comment


                              • Peter,
                                Did you try creating a new Administrator account?

                                Comment


                                • I can try but don't see it as cause.
                                  I can read/write/delete anything, only OUTPUT fails...
                                  Regards,
                                  Peter

                                  Comment


                                  • You could use code like this for further investigation


                                    Code:
                                    #Compile Exe
                                    #Dim All
                                    #Debug Error On
                                    #Debug Display On
                                    
                                    
                                    #include "win32api.inc"
                                    
                                    
                                    Function PBMain () As Long
                                      Local lhFile, lCnt As Dword, lBuff As String
                                      '------------------------------------------------------------------------------------------------
                                      lhFile = FreeFile
                                    
                                    
                                      test                                                'try Windows API with different access rights
                                    
                                    
                                      Open "Test.set" For Output As #lhFile
                                      For lCnt = 1 To 4
                                        lBuff = "Test line " & Format$(lCnt)
                                        Print #lhFile, lBuff
                                      Next
                                      Close #lhFile
                                    
                                    
                                      msgbox "Done"
                                    
                                    
                                    End Function
                                    
                                    
                                    '***********************************************************************************************
                                    
                                    
                                    sub test
                                    '***********************************************************************************************
                                    '%DELETE                         = (&H00010000)
                                    '%READ_CONTROL                   = (&H00020000)
                                    '%WRITE_DAC                      = (&H00040000)
                                    '%WRITE_OWNER                    = (&H00080000)
                                    '%SYNCHRONIZE                    = (&H00100000)
                                    '
                                    '%STANDARD_RIGHTS_REQUIRED       = (&H000F0000)
                                    '
                                    '%STANDARD_RIGHTS_READ           = (%READ_CONTROL)
                                    '%STANDARD_RIGHTS_WRITE          = (%READ_CONTROL)
                                    '%STANDARD_RIGHTS_EXECUTE        = (%READ_CONTROL)
                                    '
                                    '%STANDARD_RIGHTS_ALL            = (&H001F0000)
                                    '
                                    '%SPECIFIC_RIGHTS_ALL            = (&H0000FFFF)
                                    '***********************************************************************************************
                                    
                                    
                                      call test2(%DELETE)
                                      call test2(%READ_CONTROL)
                                      call test2(%WRITE_DAC)
                                      call test2(%WRITE_OWNER)
                                      call test2(%SYNCHRONIZE)
                                    
                                      call test2(%STANDARD_RIGHTS_REQUIRED)
                                    
                                      call test2(%STANDARD_RIGHTS_READ)
                                      call test2(%STANDARD_RIGHTS_WRITE)
                                      call test2(%STANDARD_RIGHTS_EXECUTE)
                                    
                                      call test2(%STANDARD_RIGHTS_ALL)
                                    
                                      call test2(%SPECIFIC_RIGHTS_ALL)
                                    
                                    
                                    end sub
                                    
                                    
                                    '***********************************************************************************************
                                    
                                    
                                    sub test2(r as dword)
                                    '***********************************************************************************************
                                    ' try to open with access rights (r)
                                    '***********************************************************************************************
                                    local hfile as dword
                                    LOCAL szh   AS ASCIIZ * 1024
                                    
                                    
                                      hFile = CreateFile("Test.set", _
                                                          r,           _                  '// dwDesiredAccess
                                                          0,                       _      '// dwShareMode
                                                          byval 0,                 _      '// lpSecurityAttributes
                                                          %CREATE_ALWAYS,          _      '// dwCreationDisposition
                                                          %FILE_ATTRIBUTE_NORMAL,  _      '// dwFlagsAndAttributes
                                                          byval 0                  _      '// hTemplateFile
                                                        )
                                    
                                      if hFile = %INVALID_HANDLE_VALUE then
                                        CALL FormatMessage(%FORMAT_MESSAGE_FROM_SYSTEM OR %FORMAT_MESSAGE_IGNORE_INSERTS, _
                                                           BYVAL %NULL, getlasterror, 0, szh, 1023, BYVAL %NULL )
                                    
                                        MSGBOX szh,,"Handle: " + str$(hfile) + "  r: " + hex$(r)
                                      end if
                                    
                                    
                                      CloseHandle hFile
                                    
                                    
                                    end sub
                                    
                                    
                                    '***********************************************************************************************

                                    JK

                                    Comment


                                    • A long shot...

                                      I checked HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\
                                      on my computer and there I found C:\PB\WC10\bin\PBEDIT.EXE = REG_SZ "ELEVATECREATEPROCESS"

                                      Maybe adding the same for jk-ide?

                                      /Mikael

                                      Comment


                                      • Curious if this works:
                                        OPEN "test.set" FOR OUTPUT SHARED AS #1
                                        ? STR$(ERR)

                                        Comment


                                        • I haven´t seen this one before, but seems worth a try. Thanks Mikael and thanks to all others contributing!


                                          JK

                                          Comment

                                          Working...
                                          X