Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   [FMX] TIdHTTP Absturz auf Mac (https://www.delphipraxis.net/164366-%5Bfmx%5D-tidhttp-absturz-auf-mac.html)

wurzelzwerg 9. Nov 2011 17:46

[FMX] TIdHTTP Absturz auf Mac
 
Moin,
ich habe ein Problem mit TIdHTTP wenn kein Netztwerkkabel angescteckt ist. Auf Windows ist alles ok, betrifft nur Mac.
Bei einem Get stürzt das Programm ab (Exception Type: EXC_BAD_ACCESS (SIGBUS)), es wird keine Exception ausgelöst die man abfangen könnte.
Mit Netzwerkabel und z.b. falscher URL funktionerts wie erwartet(Exception).
Das blöde ist ja das ich ohne Netzwerk nicht durch den Code steppen kann.

Habe dann TIdHTTP in einem Testprojekt probiert. Da es dort funktioniert habe ich meine Klassen auskommentiert, hat nix gebracht. Eigene Geschichten passieren also nicht, einziger Unterschied zu nem einfachen Projekt sind halt mehr Controls auf dem Form.
Keine Ahnung wo und wie ich da noch suchen soll.

Sehr seltsam ist auch wenn ich das Programm nach dem Absturz erneut starte fliegt es sofort nach Start mit "EXC_ARITHMETIC (SIGFPE)" ab. Das passiert von da ab ständig, man bekommt das nur weg indem das Projekt unter neuem Name gespeichert wird. Löschen in scratch-dir hilft nichts, es muss ein anderer Name sein.
Wird da irgendwo noch etwas gespeichert, ausserhalb scratch-dir?

Hat jemand ne Idee wie man den Fehler finden kann?

Hier ist mal die Fehlerausgabe vom Mac. Vielleicht kann jemand damit was anfangen:
Code:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000018

VM Regions Near 0x18:
--> __ZERO                0000000000000000-0000000000010000 [   64K] ---/--- SM=NUL /Users/USER/*/LProg.app/Contents/MacOS/LProg
    __TEXT                0000000000010000-00000000002c6000 [ 2776K] r-x/rwx SM=COW /Users/USER/*/LProg.app/Contents/MacOS/LProg

Application Specific Information:
objc[8560]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   LProg                           0x0024567d catch_exception_raise_state_identity + 2173521 (IdStackVCLPosix.pas:783)
1   LProg                           0x00247d6a catch_exception_raise_state_identity + 2183486 (IdStack.pas:573)
2   LProg                           0x0025507c catch_exception_raise_state_identity + 2237520 (IdIOHandlerStack.pas:314)
3   LProg                           0x00259875 catch_exception_raise_state_identity + 2255945 (IdIOHandlerSocket.pas:335)
4   LProg                           0x0029d810 catch_exception_raise_state_identity + 2534372 (IdHTTP.pas:1662)
5   LProg                           0x0029de37 catch_exception_raise_state_identity + 2535947 (IdHTTP.pas:1786)
6   LProg                           0x002a0c18 catch_exception_raise_state_identity + 2547692 (IdHTTP.pas:2629)
7   LProg                           0x002a09f2 catch_exception_raise_state_identity + 2547142 (IdHTTP.pas:2598)
8   LProg                           0x002a0880 catch_exception_raise_state_identity + 2546772 (IdHTTP.pas:2586)
9   LProg                           0x0029b67e catch_exception_raise_state_identity + 2525778 (IdHTTP.pas:1064)
10  LProg                           0x002aaa3a catch_exception_raise_state_identity + 2588174 (main.pas:352)
11  LProg                           0x00222747 catch_exception_raise_state_identity + 2030363 (FMX.Types.pas:10767)
12  LProg                           0x000df12e catch_exception_raise_state_identity + 705794 (FMX.Controls.pas:1010)
13  LProg                           0x00235e99 catch_exception_raise_state_identity + 2110061 (FMX.Forms.pas:1291)
14  LProg                           0x001be94d catch_exception_raise_state_identity + 1621281 (FMX.Platform.Mac.pas:653)
15  LProg                           0x00169ef2 catch_exception_raise_state_identity + 1274566 (Macapi.ObjectiveC.pas:1357)
16  com.apple.AppKit                0x908d98af -[NSWindow sendEvent:] + 7787
17  com.apple.AppKit                0x908716ff -[NSApplication sendEvent:] + 4788
18  com.apple.AppKit                0x90802c82 -[NSApplication run] + 1007
19  LProg                           0x0016a0bb catch_exception_raise_state_identity + 1275023 (Macapi.ObjectiveC.pas:1411)
20  LProg                           0x001bd39f catch_exception_raise_state_identity + 1615731 (FMX.Platform.Mac.pas:366)
21  LProg                           0x002afceb catch_exception_raise_state_identity + 2609343 (LProg.dpr:15)

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib          0x995b590a kevent + 10
1   libdispatch.dylib               0x9b6adc58 _dispatch_mgr_invoke + 969
2   libdispatch.dylib               0x9b6ac6a7 _dispatch_mgr_thread + 53

Thread 2:
0   libsystem_kernel.dylib          0x995b2c22 mach_msg_trap + 10
1   libsystem_kernel.dylib          0x995b21f6 mach_msg + 70
2   LProg                           0x00032786 @DbgEvalFrame + 110030 (System.Internal.MachExceptions.pas:111)
3   libsystem_c.dylib               0x9a23aed9 _pthread_start + 335
4   libsystem_c.dylib               0x9a23e6de thread_start + 34

Thread 3:
0   libsystem_kernel.dylib          0x995b502e __workq_kernreturn + 10
1   libsystem_c.dylib               0x9a23cccf _pthread_wqthread + 773
2   libsystem_c.dylib               0x9a23e6fe start_wqthread + 30

Thread 4:
0   libsystem_kernel.dylib          0x995b502e __workq_kernreturn + 10
1   libsystem_c.dylib               0x9a23cccf _pthread_wqthread + 773
2   libsystem_c.dylib               0x9a23e6fe start_wqthread + 30

Thread 5:
0   libsystem_kernel.dylib          0x995b502e __workq_kernreturn + 10
1   libsystem_c.dylib               0x9a23cccf _pthread_wqthread + 773
2   libsystem_c.dylib               0x9a23e6fe start_wqthread + 30

Thread 0 crashed with X86 Thread State (32-bit):
  eax: 0x00000000  ebx: 0x00000000  ecx: 0x00000000  edx: 0x00427dc0
  edi: 0xffffffff esi: 0x00000000  ebp: 0xbffff208  esp: 0xbffff1a0
   ss: 0x00000023  efl: 0x00010293  eip: 0x0024567d  cs: 0x0000001b
   ds: 0x00000023   es: 0x00000023   fs: 0x00000000   gs: 0x0000000f
  cr2: 0x00000018
Logical CPU: 0

daywalker9 9. Nov 2011 22:21

AW: [FMX] TIdHTTP Absturz auf Mac
 
Kannst Du dein Testprojekt hier mal evtl hochladen?

Habe das grade bei mir ausprobiert und kann diesen Fehler nicht nachvollziehen, ich bekomme ohne Netzwerkkabel eine Exception, kann aber das Programm danach ohne Fehler starten.

wurzelzwerg 9. Nov 2011 22:54

AW: [FMX] TIdHTTP Absturz auf Mac
 
Mein Testprojekt funktioniert ja.
Nur in meinem "richtigen" Projekt gehts nicht. Stürzt bei Get ab, der except Teil wird nicht aufgerufen.
Ich dachte es liegt an meinem Code(irgendwo im Speicher rumgeschmiert) aber das hab ich jetzt deaktiviert. (Da sind auch nur dynamische arrays drin)
Wie gesagt einziger Unterschied zum funktionierenden Test sind viele Controls. :roll:

wurzelzwerg 12. Nov 2011 11:30

AW: [FMX] TIdHTTP Absturz auf Mac
 
So, ich hab jetzt mal ein neues Projekt gemacht und den Code nach und nach reinkopiert.
Irgendwann tritt der Fehler dann auf obwohl mein Code definitiv nicht ausgeführt wird(überall ein exit am Anfang), dass er da ist reicht.
Es scheint also ab einer gewissen Projektgrösse zu passieren.

Hat jemand die Möglichkeit in ein grösseres Projekt IdHTTP hinter nen Button zu packen um das zu testen?
Mein Projekt kann ich hier leider nicht veröffentlichen.


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:15 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz