Tuesday, March 3, 2015

Trying to do some multi-platform programming

So, I purchased Delphi XE7 for a pile of money (around 1000euros) hoping to do all the wonderful things they advertised.
After struggling with their grandiose (read as 'scarce' or 'almost nonexistent') user manual I managed compiling my 32 bit application for Windows 64.

Since Delphi is 32 bit and my Windows machine is also 32 bit you need to somehow deploy your app on Windows 64 and run/debug it there. This is what PAServer (debugger platform assistant) is supposed to do.
However, PAServer keeps crashing as soon you press the Run button in Delphi. Sometimes this error is shown:


Error setting debug exception hook.

[223ADB5B]{win32debugide210.bpl} Win32Debug.TNativeProcess.SetDelphiTracingLevel (Line 2324, "Win32Debug.pas" + 5) + $11
[223AD5ED]{win32debugide210.bpl} Win32Debug.TNativeProcess.InitExceptRanges (Line 2195, "Win32Debug.pas" + 3) + $4
[223ADFB8]{win32debugide210.bpl} Win32Debug.TNativeProcess.DoSetExceptOption (Line 2436, "Win32Debug.pas" + 2) + $6
[203620D0]{dbkdebugide210.bpl} Debug.TDebugger.SetProcess (Line 11394, "Debug.pas" + 31) + $10
[20363397]{dbkdebugide210.bpl} Debug.TProcess.SetExceptOption (Line 11709, "Debug.pas" + 1) + $4
[203574BF]{dbkdebugide210.bpl} Debug.TThread.ntfyThread (Line 6355, "Debug.pas" + 58) + $6
[1B76C593]{bordbk210.dll} Unknown function at @isDbkLoggingOn$qv + $626BB
[1B79C22A]{bordbk210.dll} Unknown function at @isDbkLoggingOn$qv + $92352
[1B79680A]{bordbk210.dll} Unknown function at @isDbkLoggingOn$qv + $8C932
[1B76B927]{bordbk210.dll} Unknown function at @isDbkLoggingOn$qv + $61A4F
[1B76C593]{bordbk210.dll} Unknown function at @isDbkLoggingOn$qv + $626BB
[1B793703]{bordbk210.dll} Unknown function at @isDbkLoggingOn$qv + $8982B
[1B79C4D7]{bordbk210.dll} Unknown function at @isDbkLoggingOn$qv + $925FF
[1B709D72]{bordbk210.dll} Unknown function at DllUnregisterServer + $17EF6
[1B76B8CC]{bordbk210.dll} Unknown function at @isDbkLoggingOn$qv + $619F4
[505C2850]{vcl210.bpl  } Vcl.Controls.TControl.Perform (Line 7010, "Vcl.Controls.pas" + 10) + $8
[1B76C7FC]{bordbk210.dll} Unknown function at @isDbkLoggingOn$qv + $62924
[1B714263]{bordbk210.dll} Unknown function at @isDbkLoggingOn$qv + $A38B
[505C76E2]{vcl210.bpl  } Vcl.Controls.TWinControl.WndProc (Line 10038, "Vcl.Controls.pas" + 153) + $6
[505C2850]{vcl210.bpl  } Vcl.Controls.TControl.Perform (Line 7010, "Vcl.Controls.pas" + 10) + $8
[505C5E7E]{vcl210.bpl  } Vcl.Controls.TWinControl.GetControl (Line 9130, "Vcl.Controls.pas" + 4) + $A
[505CA48F]{vcl210.bpl  } Vcl.Controls.TWinControl.CMInvalidate (Line 12012, "Vcl.Controls.pas" + 10) + $4
[505C2C15]{vcl210.bpl  } Vcl.Controls.TControl.WndProc (Line 7232, "Vcl.Controls.pas" + 91) + $6
(0003C651){CnWizards_DXE7.dll} [0DCCD651]
(0003C6B8){CnWizards_DXE7.dll} [0DCCD6B8]
(0003C769){CnWizards_DXE7.dll} [0DCCD769]
(00039EF6){CnWizards_DXE7.dll} [0DCCAEF6]
[500636D0]{rtl210.bpl  } System.@FinalizeArray (Line 31435, "System.pas" + 139) + $0
[500636C0]{rtl210.bpl  } System.@FinalizeArray (Line 31423, "System.pas" + 127) + $0
[50716363]{vcl210.bpl  } Vcl.Forms.TApplication.ProcessMessage (Line 10354, "Vcl.Forms.pas" + 25) + $1
[5071639E]{vcl210.bpl  } Vcl.Forms.TApplication.HandleMessage (Line 10382, "Vcl.Forms.pas" + 1) + $4
[507166D1]{vcl210.bpl  } Vcl.Forms.TApplication.Run (Line 10520, "Vcl.Forms.pas" + 26) + $3



Some people suggested that if you set your connection (the network connection between the 32 bit debugging machine and 64 bit debugged machine) without a password it may not work! I have tried that but with no success.


UPDATE

I tried to fix this and I spend too much time. In the end I gave up and installed Delphi in a second computer (yes, and did all the madness about installing all tools, libraries, etc) that has Win64 bits.


I also contacted Embarcadero support about this issue. They said that somebody will call me but I never heard from them. They know they can't fix the problem.

The conclusion is that Delphi is not even by far ready for multi-platform development. It has some multi-platform capabilities but I would say it doesn't go beyond the 'experimental' or 'beta' stage. Multi-platform (FMX included) is not ripe yet. Maybe in a couple of years. But then if it is too wait that long (and pay lots of money for upgrades) we should also consider Lazarus. 

8 comments:

  1. I think PAServer is only supposed to be used on a Mac so that you can run your IOS applications via xcode. I don't think it is meant to be installed on a windows 64 machine.

    ReplyDelete
  2. There is a Win executable available.
    Also, do read the documentation. It says that it PAServer should work on Win64 also.

    ReplyDelete
  3. Hi all,

    I'm having a similar issue when trying to run/execute my application in Win64. In 32bit works fine
    Im working with Embarcadero XE7 in a Windows 8.1 64 bits.

    Any idea what might be? Thanks in advance.

    Ignasi

    ReplyDelete
  4. I tried to fix this and I spend too much time. In the end I gave up and installed Delphi in a second computer (yes, and did all the madness about installing all tools, libraries, etc) that has Win64 bits.

    ReplyDelete
  5. Thanks for your response Guru.

    The problem is that I'm already working on a 64bit Windows 8.1 ...

    The only idea I have is to rebuild completely all my cbproj, but not sure it would make any diference...

    I'll keep trying and if I found something post it here.

    Thanks again,

    Ignasi

    ReplyDelete
    Replies
    1. What is the problem? What error msg you get when running on Win64?

      Delete
  6. Hi again Guru,

    My problem persists. Whenever I try to execute/debug my app for Win64 target, it shows the "Error setting debug hook".
    But the application works correctly when targeting Win32, and my system is Windows 8.1 64bit

    I've even tried to rebuild completely my project, and the problem doesn't go away...

    I've also contacted with Embarcadero, but no response at all...

    Any idea?

    Thanks in advance,

    Ignasi

    ReplyDelete
    Replies
    1. I gave up on trying to produce multiplatform (64 bit) apps with Delphi. As I said Delphi seems not ripe for this. Maybe in the next versions....
      Sorry.

      Delete