Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boot() function failure since upgrade to laravel 4.1 (blank screen, no errors) #58

Closed
oliverkaiser opened this issue Dec 26, 2013 · 13 comments

Comments

@oliverkaiser
Copy link

Since I've upgraded to Laravel 4.1 I am getting a blank screen and no errors at all. Finally I went through every line of code and came to this package as point of failure.

Something seems to be wrong during the boot process at the moment of calling the boot() function of the service provider again on my server.

https://github.com/barryvdh/laravel-debugbar/blob/master/src/Barryvdh/Debugbar/ServiceProvider.php#L24

My Apache log also only says
[Thu Dec 26 13:40:36 2013] [notice] child pid 2909 exit signal Segmentation fault (11)

If you need any more information let me know. I have no more idea what I could do.

@barryvdh
Copy link
Owner

So you upgraded your entire app to 4.1 and it stopped working, or just updated this package?

Can you disable all of the datacollectors (publish the config and set all to false) and see of the errors persists? If not, try enabling one by one.
Does this problem also occur on older versions of the debugbar (required 1.0 for instance, insteaf of 1.*)

@barryvdh
Copy link
Owner

And when you create a new 4.1 projects with just this package, does it also occur?

@GrahamCampbell
Copy link
Contributor

In my experience, this usually happens when we try to create an instance of something with an instance of itself in the constructor.

@oliverkaiser
Copy link
Author

upgrade my app to 4.1

will try out disabling collectors, an older version and fresh installation later today or tomorrow.

@jaketoolson
Copy link

I was just having a similar issue actually! White screen, no errors. I was triggering a simple filter with a redirect:

Route::filter('admin_auth', function()
{
    if ( ! Sentry::check())
    {
        // if not logged in, redirect to login
        return Redirect::to('users/login');
    }
});

The redirect failed regardless of what I tried to add to the redirect. So I looked at the log:

[2013-12-26 13:59:42] log.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Allowed memory size of 134217728 bytes exhausted (tried to allocate 41555547 bytes)' in /vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php:234
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleShutdown()
#1 {main} [] []

When looking for an issue, I happened upon a different and separate github issue (https://github.com/juy/profiler/issues/21) that referenced "profiler" (not debugbar). Again, this has no connection to debugbar but for testing I very quickly disabled the debugbar and I no longer incur a whitescreen and all is well, so it's a very curious problem.

@barryvdh
Copy link
Owner

Could you also try and disable the data collectors (through config) and enable them ony by one and see when the error occurs? (and possibly older version of the debugbar) Will try to look into it tomorrow but have no idea what is causing this yet.

@oliverkaiser
Copy link
Author

ok sorry, it seems like it has to do with my own "mailer extension". (deactivating the mail collector helped, also changing back to the native laravel mail functionality ...)

@barryvdh
Copy link
Owner

Okay, if you find out what was causing it exactly, let me know so I can perhaps create a patch.

@jaketoolson your error is probably something related to stacking the data on a redirect, can you open a new issue, when you find the collector that kills it?

@foysalit
Copy link

hi, I'm having the same issue as @jaketoolson and here's the log entry -

[2014-01-10 23:16:57] local.ERROR: exception 'DebugBar\DebugBarException' with message 'Session must be started before using stack data in the debug bar' in /var/www/themiss/vendor/maximebf/debugbar/src/DebugBar/DebugBar.php:413
Stack trace:
#0 /var/www/themiss/vendor/maximebf/debugbar/src/DebugBar/DebugBar.php(304): DebugBar\DebugBar->initStackSession()
#1 /var/www/themiss/vendor/barryvdh/laravel-debugbar/src/Barryvdh/Debugbar/LaravelDebugBar.php(268): DebugBar\DebugBar->stackData()
#2 /var/www/themiss/vendor/barryvdh/laravel-debugbar/src/Barryvdh/Debugbar/Middleware.php(35): Barryvdh\Debugbar\LaravelDebugbar->modifyResponse(Object(Illuminate\Http\Request), Object(Illuminate\Http\RedirectResponse))
#3 /var/www/themiss/vendor/laravel/framework/src/Illuminate/Http/FrameGuard.php(38): Barryvdh\Debugbar\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#4 /var/www/themiss/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(58): Illuminate\Http\FrameGuard->handle(Object(Illuminate\Http\Request), 1, true)
#5 /var/www/themiss/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#6 /var/www/themiss/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#7 /var/www/themiss/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#8 /var/www/themiss/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(552): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#9 /var/www/themiss/public/index.php(49): Illuminate\Foundation\Application->run()
#10 {main} [] []

I tried disabling the data collectors one by one but nothing seems to fix it. the package works great everywhere and the issue occurs only when I return a "Redirect".

Let me know if I should open a new issue or if you need any other info from my end. Oh, and great job on the package :)

@foysalit
Copy link

Okay, So I figured out the reason. The error log said it has something to do with the session and in fact I was doing some session work on the before the redirect. Turned out, if I remove the Session::save(); call in my code, the error doesn't occur anymore. Thought this might give you an insight?

@barryvdh
Copy link
Owner

Okay So this only occurs on Redirects, when saving something in the session? Otherwise it is fine?

barryvdh added a commit that referenced this issue Jan 11, 2014
Make sure session is started before saving it.
Fixes #58
@barryvdh
Copy link
Owner

I pushed a new version to dev-master (see commit above), does that fix it for you?

@foysalit
Copy link

Yes, it was only happening on redirects after saving the session and with the dev-master seems to be working great 👍
thanks a bunch for the quick fix, you're awesome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants