2.x,3.x iOS static build: Fatal Python error: exceptionsbootstrapping error.

Discussion in 'Python' started by angeljanai@gmail.com, May 21, 2012.

  1. Guest

    Hello!

    I'm trying to embed a part of python (core+some modules) in my iOS application for internal scripting. I started from compiling original unmodified Python source. Tried both 2.7.3 and 3.x latest source code. As I found no easy way to configure it, just tried to run configure from Mac OS X(10.7) and it was successful.
    After that I created XCode project and added all necessary files from after-configure source. There were some minor problems, but compilation and linkerrors were fixed very quickly.
    Finally I tried to create a test program, which has just this:
    ....
    Py_NoSiteFlag=1;
    Py_Initialize();
    Py_Finalize();
    ....
    When I run it I getting "Fatal Python error: exceptions bootstrapping error.."
    Call stack is:
    #0 0x300cba1c in __pthread_kill ()
    #1 0x362e43ba in pthread_kill ()
    #2 0x362dcbfe in abort ()
    #3 0x00127d96 in Py_FatalError at /Users/mac_user/Downloads/Python-3.2.3/IOS/pythoncore/../../Python/pythonrun.c:2169
    #4 0x00155328 in _PyExc_Init at /Users/mac_user/Downloads/Python-3.2.3/IOS/pythoncore/../../Objects/exceptions.c:2042
    #5 0x00127ad4 in Py_InitializeEx at /Users/mac_user/Downloads/Python-3.2.3/IOS/pythoncore/../../Python/pythonrun.c:272
    #6 0x0012846a in Py_Initialize at /Users/mac_user/Downloads/Python-3.2.3/IOS/pythoncore/../../Python/pythonrun.c:332
    #7 0x000d6242 in testpython at /Users/mac_user/Downloads/Python-3.2.3/IOS/test/test/testmac.c:15
    #8 0x000d618e in -[ViewController viewDidLoad] at /Users/mac_user/Downloads/Python-3.2.3/IOS/test/test/ViewController.m:23
    #9 0x3283ff0e in -[UIViewController view] ()
    #10 0x3283e2b4 in -[UIWindow addRootViewControllerViewIfPossible] ()
    #11 0x3283a332 in -[UIWindow _setHidden:forced:] ()
    #12 0x3283e28e in -[UIWindow _orderFrontWithoutMakingKey] ()
    #13 0x3284cc60 in -[UIWindow makeKeyAndVisible] ()
    #14 0x000d5ffe in -[AppDelegate application:didFinishLaunchingWithOptions:]at /Users/mac_user/Downloads/Python-3.2.3/IOS/test/test/AppDelegate.m:35
    #15 0x3283e820 in -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] ()
    #16 0x32838b64 in -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] ()
    #17 0x3280d7d6 in -[UIApplication handleEvent:withNewEvent:] ()
    #18 0x3280d214 in -[UIApplication sendEvent:] ()
    #19 0x3280cc52 in _UIApplicationHandleEvent ()
    #20 0x322b7e76 in PurpleEventCallback ()
    #21 0x3113ba96 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
    #22 0x3113d83e in __CFRunLoopDoSource1 ()

    XCode version is 4.3.2.
    I tried to debug, and unfortunately I don't understand why this error is occured.
    Also tried source from here: http://stackoverflow.com/a/4177748/1337666.
    But no luck, same problem.
    Porting Python core will be very helpful for my iOS application.
    Any hint will be appreciated.
    Best Regards
     
    , May 21, 2012
    #1
    1. Advertising

  2. Guest

    , May 22, 2012
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron Natalie
    Replies:
    2
    Views:
    1,569
    WahJava
    Mar 2, 2005
  2. Andrew Ellem
    Replies:
    1
    Views:
    562
    John Paquin
    Aug 27, 2003
  3. Massimo Soricetti

    (help) Runtime error in ifstream/ios class

    Massimo Soricetti, Jan 13, 2006, in forum: C++
    Replies:
    2
    Views:
    442
    Massimo Soricetti
    Jan 14, 2006
  4. mmacrobert
    Replies:
    1
    Views:
    428
    Thomas Heller
    Aug 31, 2007
  5. Laszlo Nagy
    Replies:
    0
    Views:
    357
    Laszlo Nagy
    Jan 12, 2009
Loading...

Share This Page